build-msix-packaging.sh (1220B)
1 #!/bin/bash 2 set -x -e -v 3 4 cd $MOZ_FETCHES_DIR/msix-packaging 5 6 export PATH=$MOZ_FETCHES_DIR/clang/bin:$PATH 7 8 # makelinux.sh invokes `make` with no parallelism. These jobs run on hosts with 9 # 16+ vCPUs; let's try to take advantage. 10 export MAKEFLAGS=-j16 11 12 ./makelinux.sh --pack -- \ 13 -DCMAKE_SYSROOT=$MOZ_FETCHES_DIR/sysroot \ 14 -DCMAKE_EXE_LINKER_FLAGS_INIT='-fuse-ld=lld -Wl,-rpath=\$ORIGIN' \ 15 -DCMAKE_SHARED_LINKER_FLAGS_INIT='-fuse-ld=lld -Wl,-rpath=\$ORIGIN' \ 16 -DCMAKE_SKIP_BUILD_RPATH=TRUE 17 18 mkdir msix-packaging 19 cp .vs/bin/makemsix msix-packaging 20 cp .vs/lib/libmsix.so msix-packaging 21 22 # The `msix-packaging` tool links against libicu dynamically. It would be 23 # better to link statically, but it's not easy to achieve. This copies the 24 # needed libicu libraries from the sysroot, and the rpath settings above allows 25 # them to be loaded, which means the consuming environment doesn't need to 26 # install libicu directly. 27 LD_LIBRARY_PATH=$MOZ_FETCHES_DIR/sysroot/usr/lib/x86_64-linux-gnu \ 28 ldd msix-packaging/libmsix.so | awk '$3 ~ /libicu/ {print $3}' | xargs -I '{}' cp '{}' msix-packaging 29 30 tar caf msix-packaging.tar.zst msix-packaging 31 32 mkdir -p $UPLOAD_DIR 33 cp msix-packaging.tar.zst $UPLOAD_DIR