5 export CHANNEL
="release"
8 while [[ $# != 0 ]]; do
11 export CHANNEL
="debug"
21 echo "Unknown flag '$1'"
22 echo "Usage: ./build.sh [--debug] [--without-sysroot] [--target-dir DIR]"
29 export RUSTFLAGS
="-Zrun_dsymutil=no"
30 if [[ "$CHANNEL" == "release" ]]; then
38 cp -a target
/$CHANNEL/cg_clif
{,_build_sysroot
} target
/$CHANNEL/*rustc_codegen_cranelift
* $target_dir/
39 cp -a rust-toolchain
scripts
/config.sh
scripts
/cargo.sh
$target_dir
41 if [[ "$build_sysroot" == "1" ]]; then
42 echo "[BUILD] sysroot"
43 export CG_CLIF_INCR_CACHE_DISABLED
=1
46 time $dir/build_sysroot
/build_sysroot.sh