From 1e5c6bc5b86c4ff61ef3de63a9748789d5b369b0 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Fri, 14 Dec 2018 13:58:33 +0100 Subject: Stop using xargo for building the sysroot It is currently broken. (see https://github.com/japaric/xargo/issues/227) This makes it easier to for example patch whole crates away. --- build_sysroot/prepare_sysroot_src.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 build_sysroot/prepare_sysroot_src.sh (limited to 'build_sysroot/prepare_sysroot_src.sh') diff --git a/build_sysroot/prepare_sysroot_src.sh b/build_sysroot/prepare_sysroot_src.sh new file mode 100755 index 00000000000..fceccdb4dea --- /dev/null +++ b/build_sysroot/prepare_sysroot_src.sh @@ -0,0 +1,31 @@ +#!/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/src +cp -r $SRC_DIR/src $DST_DIR/ + +pushd $DST_DIR +echo "[GIT] init" +git init +echo "[GIT] add" +git add . +echo "[GIT] commit" +git commit -m "Initial commit" -q +for file in $(ls ../../patches/ | grep -v patcha); do +echo "[GIT] apply" $file +git apply ../../patches/$file +git commit -am "Patch $file" +done +popd + +echo "Successfully prepared libcore for building" -- cgit 1.4.1-3-g733a5