Skip to content

Commit 8cdcb90

Browse files
committed
rustc-cg-gcc: fix build script
refs compiler-explorer/compiler-explorer#8147 Signed-off-by: Marc Poulhiès <[email protected]>
1 parent c845431 commit 8cdcb90

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

rust-cg-gcc/build.sh

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,23 @@ initialise "${REVISION}" "${OUTPUT}" "${LAST_REVISION}"
3333

3434
OUTPUT=$(realpath "${OUTPUT}")
3535

36+
#
37+
# Needed because the later y.sh will call "git am" and this needs user info.
38+
git config --global user.email "[email protected]"
39+
git config --global user.name "John Nope"
40+
41+
rm -rf build-rustc-cg-gcc
42+
mkdir -p build-rustc-cg-gcc
43+
44+
pushd build-rustc-cg-gcc
45+
PREFIX=$(pwd)/gcc-install
46+
47+
export CARGO_HOME=$PWD/rustup
48+
export RUSTUP_HOME=$PWD/rustup
49+
50+
export PATH=$RUSTUP_HOME/bin:$PATH
51+
52+
3653
##
3754
## Build customized GCC with libgccjit
3855
##
@@ -79,23 +96,7 @@ CONFIG=("--enable-checking=release"
7996

8097
libgccjit_path=$(dirname $(readlink -f `find "$PREFIX" -name libgccjit.so`))
8198

82-
#
83-
# Needed because the later y.sh will call "git am" and this needs user info.
84-
git config --global user.email "[email protected]"
85-
git config --global user.name "John Nope"
86-
87-
rm -rf build-rustc-cg-gcc
88-
mkdir -p build-rustc-cg-gcc
89-
90-
pushd build-rustc-cg-gcc
91-
PREFIX=$(pwd)/gcc-install
92-
93-
export CARGO_HOME=$PWD/rustup
94-
export RUSTUP_HOME=$PWD/rustup
95-
96-
export PATH=$RUSTUP_HOME/bin:$PATH
97-
98-
## Download rustc_cg_gcc
99+
## Checkout rustc_cg_gcc
99100
git clone --depth 1 "${CG_GCC_URL}" --branch "${CG_GCC_BRANCH}"
100101

101102
## Download rustup and install it in a local dir

0 commit comments

Comments
 (0)