Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0824b30

Browse files
committed
Auto merge of rust-lang#122658 - cuviper:gccjit-archive, r=Mark-Simulacrum
ci: Build gccjit from a git archive A full `git clone` of GCC includes quite a lot of history, and it's completely unnecessary for building it in CI. We can use a GitHub archive URL to get a simple tarball that is much faster to download. Also, the `gcc-build` directory can be removed after install to reduce the image size even further.
2 parents d36bdd1 + f512f9e commit 0824b30

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed
Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
#!/usr/bin/env bash
22

3+
GIT_REPO="https://github.com/rust-lang/gcc"
4+
5+
# This commit hash needs to be updated to use a more recent gcc fork version.
6+
GIT_COMMIT="78dc50f0e50e6cd1433149520bd512a4e0eaa1bc"
7+
38
set -ex
49

510
cd 1ドル
611

712
source shared.sh
813

914
# Setting up folders for GCC
10-
git clone https://github.com/antoyo/gcc gcc-src
11-
cd gcc-src
12-
# This commit hash needs to be updated to use a more recent gcc fork version.
13-
git checkout 78dc50f0e50e6cd1433149520bd512a4e0eaa1bc
15+
curl -L "$GIT_REPO/archive/$GIT_COMMIT.tar.gz" |
16+
tar -xz --transform "s/gcc-$GIT_COMMIT/gcc-src/"
1417

15-
mkdir ../gcc-build ../gcc-install
16-
cd ../gcc-build
18+
mkdir gcc-build gcc-install
19+
pushdgcc-build
1720

1821
# Building GCC.
1922
hide_output \
@@ -28,6 +31,7 @@ hide_output \
2831
hide_output make -j$(nproc)
2932
hide_output make install
3033

31-
rm -rf ../gcc-src
34+
popd
35+
rm -rf gcc-src gcc-build
3236
ln -s /scripts/gcc-install/lib/libgccjit.so /usr/lib/x86_64-linux-gnu/libgccjit.so
3337
ln -s /scripts/gcc-install/lib/libgccjit.so /usr/lib/x86_64-linux-gnu/libgccjit.so.0

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /