11 while [[ $# -gt 0 ]]; do
14 codegen_channel=release
18 sysroot_channel=release
21 --no-default-features)
22 flags="$flags --no-default-features"
27 flags="$flags --features $1"
31 echo "Unknown option $1"
37 if [ -f ./gcc_path ]; then
38 export GCC_PATH=$(cat gcc_path)
40 echo 'Please put the path to your custom build of libgccjit in the file `gcc_path`, see Readme.md for details'
44 export LD_LIBRARY_PATH="$GCC_PATH"
45 export LIBRARY_PATH="$GCC_PATH"
47 if [[ "$codegen_channel" == "release" ]]; then
48 export CHANNEL='release'
49 CARGO_INCREMENTAL=1 cargo rustc --release $flags
52 export CHANNEL='debug'
58 rm -r target/out || true
59 mkdir -p target/out/gccjit
61 echo "[BUILD] sysroot"
62 if [[ "$sysroot_channel" == "release" ]]; then
63 time ./build_sysroot/build_sysroot.sh --release
65 time ./build_sysroot/build_sysroot.sh