-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
[bootstrap] Add support for building gcc and libgccjit #125419
Conversation
|
This PR changes how LLVM is built. Consider updating src/bootstrap/download-ci-llvm-stamp. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
5f791d3
to
6736333
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
From what I can see, it's not possible to tell |
@davidtwco Any suggestions on what to do about the GPL-2.0 license of GCC? |
Will get back to you about this |
@wesleywiser and I discussed this and we're not sure about how to get REUSE to play ball (@pietroalbini might know), but we've forwarded this on to t-compiler's council rep to double-check that adding gcc like this is okay, license-wise. |
Note that REUSE doesn't mark the GPL 2.0 license as deprecated. What is deprecated is referring to it as Also, the warning doesn't come from REUSE itself, but from the SPDX License List (you'll find |
We discussed this at the Council meeting today and we don't have any concerns with this change. However, we would like to confirm with the Foundation. @abibroom - do you know of any concerns from the Foundation side (feel free to ping me on Zulip or reach out via email if you'd rather not discuss this publicly. From my understanding, this change would add libgccjit as an optional component to the Rust distribution. This library is licensed under GPLv2 and currently we do not have any other components under that license so it would be a new license, and one that is generally more restrictive than the other licenses we use. |
@bors try Just to see what happens on Linux dist. |
@@ -2365,6 +2366,10 @@ impl Step for RustDev { | |||
// just broadly useful to be able to link against the bundled LLVM. | |||
tarball.add_dir(builder.llvm_out(target).join("include"), "include"); | |||
|
|||
tarball.add_dir(builder.gcc_out(target).join("install/lib/libgccjit.so"), "libgccjit.so"); |
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.
What will this do on Windows? 🤔 Does the gcc build also work on non-Linux OSes, in general?
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.
No it doesn't, good catch!
[bootstrap] Add gcc to dist generation As `@eholk` summarized below: > From my understanding, this change would add libgccjit as an optional component to the Rust distribution. This library is licensed under GPLv2 and currently we do not have any other components under that license so it would be a new license, and one that is generally more restrictive than the other licenses we use. It'll greatly improve the experience for anyone wanting to work on the GCC backend from the compiler. Should help with rust-lang#124172. Will unblock rust-lang#124353. r? `@Kobzol`
Can this be done without adding gcc as a submodule? |
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
I'd like to be able to say this is all fine, but want to run it past Foundation legal counsel first just to make sure. Please bear with me whilst that happens! |
We should be good to go with this. Legal raised two points, neither of which I believe to be blocking concerns:
|
@abibroom - just to make sure, if someone wanted to make a downstream binary distribution without releasing source code (which strikes me as rather unlikely), they could still do so if they chose not to include the libgccjit component? I want to make sure this change doesn't effectively mean we have to relicense Rust as GPL2. |
Ah, crap. On Linux CI, we're not allowed to write to the source directory. Hmm, then I would probably only do the "download dependencies" step if we're not on CI. |
That being said, why is this step executed on CI..? 😕 That shouldn't happen. |
@@ -2273,6 +2273,9 @@ impl Step for RustDev { | |||
tarball.permit_symlinks(true); | |||
|
|||
builder.ensure(crate::core::build_steps::llvm::Llvm { target }); | |||
if target.contains("linux") && target.contains("x86_64") { |
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.
Oh this was kept in, we forgot to remove it. Please revert the changes to dist
to make this PR only affect local builds.
Removed changes to |
@bors r+ |
…bzol [bootstrap] Add support for building gcc and libgccjit As `@eholk` summarized below: > From my understanding, this change would add libgccjit as an optional component to the Rust distribution. This library is licensed under GPLv2 and currently we do not have any other components under that license so it would be a new license, and one that is generally more restrictive than the other licenses we use. It'll greatly improve the experience for anyone wanting to work on the GCC backend from the compiler. Should help with rust-lang#124172. Will unblock rust-lang#124353. r? `@Kobzol`
💔 Test failed - checks-actions |
@bors retry |
☀️ Test successful - checks-actions |
Finished benchmarking commit (23b04c0): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results (primary -2.9%, secondary -1.8%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 756.859s -> 756.265s (-0.08%) |
As @eholk summarized below:
It'll greatly improve the experience for anyone wanting to work on the GCC backend from the compiler.
Should help with #124172.
Will unblock #124353.
r? @Kobzol