build-xar-linux.sh (710B)
1 #!/bin/bash 2 set -x -e -v 3 4 # This script is for building xar for Linux. 5 mkdir -p $UPLOAD_DIR 6 7 export PATH=$PATH:$MOZ_FETCHES_DIR/clang/bin 8 cd $MOZ_FETCHES_DIR/xar/xar 9 10 ./autogen.sh --prefix=/builds/worker --enable-static 11 12 # Force statically-linking to libcrypto. pkg-config --static will tell 13 # us the extra flags that are needed (in practice, -ldl -pthread), 14 # and -lcrypto, which we need to change to actually link statically. 15 CRYPTO=$(pkg-config --static --libs libcrypto | sed 's/-lcrypto/-l:libcrypto.a/') 16 sed -i "s/-lcrypto/$CRYPTO/" src/Makefile.inc 17 18 make_flags="-j$(nproc)" 19 make $make_flags 20 21 cd $(mktemp -d) 22 mkdir xar 23 24 cp $MOZ_FETCHES_DIR/xar/xar/src/xar ./xar/xar 25 tar caf $UPLOAD_DIR/xar.tar.zst ./xar