Merge pull request #143 from yvt/sysroot-profile
Add `--release-sysroot` flag to `build.sh`
This commit is contained in:
commit
a22e15b954
29
build.sh
29
build.sh
@ -3,6 +3,26 @@
|
|||||||
#set -x
|
#set -x
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
codegen_channel=debug
|
||||||
|
sysroot_channel=debug
|
||||||
|
|
||||||
|
while [[ $# -gt 0 ]]; do
|
||||||
|
case $1 in
|
||||||
|
--release)
|
||||||
|
codegen_channel=release
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--release-sysroot)
|
||||||
|
sysroot_channel=release
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unknown option $1"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
if [ -f ./gcc_path ]; then
|
if [ -f ./gcc_path ]; then
|
||||||
export GCC_PATH=$(cat gcc_path)
|
export GCC_PATH=$(cat gcc_path)
|
||||||
else
|
else
|
||||||
@ -21,7 +41,7 @@ if [[ "$1" == "--features" ]]; then
|
|||||||
shift
|
shift
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$1" == "--release" ]]; then
|
if [[ "$codegen_channel" == "release" ]]; then
|
||||||
export CHANNEL='release'
|
export CHANNEL='release'
|
||||||
CARGO_INCREMENTAL=1 cargo rustc --release $features
|
CARGO_INCREMENTAL=1 cargo rustc --release $features
|
||||||
else
|
else
|
||||||
@ -36,4 +56,9 @@ rm -r target/out || true
|
|||||||
mkdir -p target/out/gccjit
|
mkdir -p target/out/gccjit
|
||||||
|
|
||||||
echo "[BUILD] sysroot"
|
echo "[BUILD] sysroot"
|
||||||
time ./build_sysroot/build_sysroot.sh $CHANNEL
|
if [[ "$sysroot_channel" == "release" ]]; then
|
||||||
|
time ./build_sysroot/build_sysroot.sh --release
|
||||||
|
else
|
||||||
|
time ./build_sysroot/build_sysroot.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user