File tree 2 files changed +27
-12
lines changed
2 files changed +27
-12
lines changed Original file line number Diff line number Diff line change 3
3
4
4
# Settings
5
5
export CHANNEL=" release"
6
- build_sysroot=1
6
+ build_sysroot=" clif "
7
7
target_dir=' build'
8
8
oldbe=' '
9
9
while [[ $# != 0 ]]; do
10
10
case $1 in
11
11
" --debug" )
12
12
export CHANNEL=" debug"
13
13
;;
14
- " --without-sysroot" )
15
- build_sysroot=0
14
+ " --sysroot" )
15
+ build_sysroot=$2
16
+ shift
16
17
;;
17
18
" --target-dir" )
18
19
target_dir=$2
@@ -23,7 +24,7 @@ while [[ $# != 0 ]]; do
23
24
;;
24
25
* )
25
26
echo " Unknown flag '$1 '"
26
- echo " Usage: ./build.sh [--debug] [--without- sysroot] [--target-dir DIR] [--oldbe]"
27
+ echo " Usage: ./build.sh [--debug] [--sysroot none|clif|llvm ] [--target-dir DIR] [--oldbe]"
27
28
exit 1
28
29
;;
29
30
esac
@@ -62,10 +63,24 @@ if [[ "$TARGET_TRIPLE" == "x86_64-pc-windows-gnu" ]]; then
62
63
cp $( rustc --print sysroot) /lib/rustlib/$TARGET_TRIPLE /lib/* .o " $target_dir /lib/rustlib/$TARGET_TRIPLE /lib/"
63
64
fi
64
65
65
- if [[ " $build_sysroot " == " 1" ]]; then
66
- echo " [BUILD] sysroot"
67
- dir=$( pwd)
68
- cd " $target_dir "
69
- time " $dir /build_sysroot/build_sysroot.sh"
70
- cp lib/rustlib/* /lib/libstd-* lib/
71
- fi
66
+ case " $build_sysroot " in
67
+ " none" )
68
+ ;;
69
+ " llvm" )
70
+ cp -r $( rustc --print sysroot) /lib/rustlib/$TARGET_TRIPLE /lib " $target_dir /lib/rustlib/$TARGET_TRIPLE /"
71
+ ;;
72
+ " clif" )
73
+ echo " [BUILD] sysroot"
74
+ dir=$( pwd)
75
+ cd " $target_dir "
76
+ time " $dir /build_sysroot/build_sysroot.sh"
77
+ cp lib/rustlib/* /lib/libstd-* lib/
78
+ ;;
79
+ * )
80
+ echo " Unknown sysroot kind \` $build_sysroot \` ."
81
+ echo " The allowed values are:"
82
+ echo " none A sysroot that doesn't contain the standard library"
83
+ echo " llvm Copy the sysroot from rustc compiled by cg_llvm"
84
+ echo " clif Build a new sysroot using cg_clif"
85
+ exit 1
86
+ esac
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -e
3
3
4
- ./build.sh --without- sysroot " $@ "
4
+ ./build.sh --sysroot none " $@ "
5
5
6
6
rm -r target/out || true
7
7
You can’t perform that action at this time.
0 commit comments