-
Notifications
You must be signed in to change notification settings - Fork 13.4k
ci: Build gccjit from a git archive #122658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,19 +1,22 @@ | ||||||
#!/usr/bin/env bash | ||||||
|
||||||
GIT_REPO="https://github.com/antoyo/gcc" | ||||||
|
||||||
# This commit hash needs to be updated to use a more recent gcc fork version. | ||||||
GIT_COMMIT="78dc50f0e50e6cd1433149520bd512a4e0eaa1bc" | ||||||
|
||||||
set -ex | ||||||
|
||||||
cd $1 | ||||||
|
||||||
source shared.sh | ||||||
|
||||||
# Setting up folders for GCC | ||||||
git clone https://github.com/antoyo/gcc gcc-src | ||||||
cd gcc-src | ||||||
# This commit hash needs to be updated to use a more recent gcc fork version. | ||||||
git checkout 78dc50f0e50e6cd1433149520bd512a4e0eaa1bc | ||||||
curl -L "$GIT_REPO/archive/$GIT_COMMIT.tar.gz" | | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should probably also
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's not that simple -- if a partial download fails and restarts, the latter There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The issue here is not so much the download but the transient DNS failures, they happened in the past, even for Sure, we may want to download first to disk; I didn't look to closely at the retry function. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wouldn't worry about it. The whole docker build is already retried 5 times IIRC. This is maybe nice cleanup in the future but isn't worth it for now. |
||||||
tar -xz --transform "s/gcc-$GIT_COMMIT/gcc-src/" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If for some reason we do want git metadata on disk, AFAIK shallow clones are not possible with specific commit hashes, but you can get there with |
||||||
|
||||||
mkdir ../gcc-build ../gcc-install | ||||||
cd ../gcc-build | ||||||
mkdir gcc-build gcc-install | ||||||
cd gcc-build | ||||||
cuviper marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
# Building GCC. | ||||||
hide_output \ | ||||||
|
@@ -28,6 +31,7 @@ hide_output \ | |||||
hide_output make -j$(nproc) | ||||||
hide_output make install | ||||||
|
||||||
rm -rf ../gcc-src | ||||||
cd .. | ||||||
cuviper marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
rm -rf gcc-src gcc-build | ||||||
ln -s /scripts/gcc-install/lib/libgccjit.so /usr/lib/x86_64-linux-gnu/libgccjit.so | ||||||
ln -s /scripts/gcc-install/lib/libgccjit.so /usr/lib/x86_64-linux-gnu/libgccjit.so.0 |
Uh oh!
There was an error while loading. Please reload this page.