5 SRC_DIR="$(dirname "$(rustup which rustc)")/../lib/rustlib/src/rust/"
8 if [ ! -e "$SRC_DIR" ]; then
9 echo "Please install rust-src component"
14 mkdir -p $DST_DIR/library
15 cp -a "$SRC_DIR/library" $DST_DIR/
23 git commit -m "Initial commit" -q
24 for file in $(ls ../../patches/ | grep -v patcha); do
25 echo "[GIT] apply" "$file"
26 git apply ../../patches/"$file"
28 git commit --no-gpg-sign -m "Patch $file"
32 git clone https://github.com/rust-lang/compiler-builtins.git || echo "rust-lang/compiler-builtins has already been cloned"
33 pushd compiler-builtins
36 git apply ../../crate_patches/0001-compiler-builtins-Remove-rotate_left-from-Int.patch
39 echo "Successfully prepared sysroot source for building"