9 while [[ $# -gt 0 ]]; do
12 codegen_channel=release
16 sysroot_channel=release
20 echo "Unknown option $1"
26 if [ -f ./gcc_path ]; then
27 export GCC_PATH=$(cat gcc_path)
29 echo 'Please put the path to your custom build of libgccjit in the file `gcc_path`, see Readme.md for details'
33 export LD_LIBRARY_PATH="$GCC_PATH"
34 export LIBRARY_PATH="$GCC_PATH"
38 if [[ "$1" == "--features" ]]; then
40 features="--features $1"
44 if [[ "$codegen_channel" == "release" ]]; then
45 export CHANNEL='release'
46 CARGO_INCREMENTAL=1 cargo rustc --release $features
49 export CHANNEL='debug'
55 rm -r target/out || true
56 mkdir -p target/out/gccjit
58 echo "[BUILD] sysroot"
59 if [[ "$sysroot_channel" == "release" ]]; then
60 time ./build_sysroot/build_sysroot.sh --release
62 time ./build_sysroot/build_sysroot.sh