Add 'compiler/rustc_codegen_gcc/' from commit 'afae271d5d
'
git-subtree-dir: compiler/rustc_codegen_gcc git-subtree-mainline:ae90dcf020
git-subtree-split:afae271d5d
This commit is contained in:
commit
f7237f16ae
80 changed files with 15608 additions and 0 deletions
39
compiler/rustc_codegen_gcc/build_sysroot/prepare_sysroot_src.sh
Executable file
39
compiler/rustc_codegen_gcc/build_sysroot/prepare_sysroot_src.sh
Executable file
|
@ -0,0 +1,39 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
cd $(dirname "$0")
|
||||
|
||||
SRC_DIR=$(dirname $(rustup which rustc))"/../lib/rustlib/src/rust/"
|
||||
DST_DIR="sysroot_src"
|
||||
|
||||
if [ ! -e $SRC_DIR ]; then
|
||||
echo "Please install rust-src component"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -rf $DST_DIR
|
||||
mkdir -p $DST_DIR/library
|
||||
cp -r $SRC_DIR/library $DST_DIR/
|
||||
|
||||
pushd $DST_DIR
|
||||
echo "[GIT] init"
|
||||
git init
|
||||
echo "[GIT] add"
|
||||
git add .
|
||||
echo "[GIT] commit"
|
||||
|
||||
# This is needed on virgin system where nothing is configured.
|
||||
# git really needs something here, or it will fail.
|
||||
# Even using --author is not enough.
|
||||
git config user.email || git config user.email "none@example.com"
|
||||
git config user.name || git config user.name "None"
|
||||
|
||||
git commit -m "Initial commit" -q
|
||||
for file in $(ls ../../patches/ | grep -v patcha); do
|
||||
echo "[GIT] apply" $file
|
||||
git apply ../../patches/$file
|
||||
git add -A
|
||||
git commit --no-gpg-sign -m "Patch $file"
|
||||
done
|
||||
popd
|
||||
|
||||
echo "Successfully prepared libcore for building"
|
Loading…
Add table
Add a link
Reference in a new issue