-
Notifications
You must be signed in to change notification settings - Fork 33
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
Initial support for rustc_codegen_gcc #6
Conversation
5277b23
to
bd74639
Compare
cfa2172
to
a61568c
Compare
rustc can use different backend and this new script builds all the needed parts to have GCC as the code generator. It needs (at the moment) a patched version of GCC and builds it with libjit support. Some glue code (in Rust) is added in the mix to finally be able to use the rustc compiler with this dynamic backend. Fixes compiler-explorer/compiler-explorer#2683
I think this is ready now. |
# where the libgccjit.so will be installed | ||
echo "$PREFIX/lib" > gcc_path | ||
|
||
./build_sysroot/prepare_sysroot_src.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's now a script called prepare_build.sh
that does this, but I guess you don't use it because of the way you install rustup
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the script (https://github.com/antoyo/rustc_codegen_gcc/blob/master/prepare_build.sh ) adds some rustup components and calls prepare_sysroot_src.sh
. As I also want to remove the components before packaging, I like to have the install/removal in the same script... But I can change this if you think it's better to use your script (maybe because you'll modify it?).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think I'll change it, so you can keep it that way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, it didn't fully click that this is a nightly build until looking at the infra changes.
This script must implement the unchanged build skipping mechanism before I am comfortable adding it as a scheduled nightly build.
You can see this implemented here: https://github.com/compiler-explorer/misc-builder/blob/main/build/build-tinycc.sh#L36
The gist is:
- check the git revision of any cloned repos at the top of script before any other work
- build up an arbitrary string using some combination of the git revisions
- compare string to given previous build revision ($3 iirc) and bail with appropriate output if the same.
ha, sorry, missed that part. I should fix the mrustc builder also ! Will do that ! |
Implemented the revision check/skip. Also refactored a bit how url/branch are used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK to me! Thanks for taking the time!
@apmorton I'm approving and you can blame me if it's not really ready :) (sorry to merge with your change request still pending, but wanted to get things moving) |
Thanks ! Finally got it working on my small laptop over weak connexion (took several tries), so should be ok !
|
rustc can use different backend and this new script builds all the needed parts
to have GCC as the code generator.
It needs (at the moment) a patched version of GCC and builds it with libjit support.
Some glue code (in Rust) is added in the mix to finally be able to use the rustc
compiler with this dynamic backend.
Fixes compiler-explorer/compiler-explorer#2683