-
Notifications
You must be signed in to change notification settings - Fork 12.2k
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 gcc to dist generation #125419
base: master
Are you sure you want to change the base?
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.
The job Click to see the possible cause of the failure (guessed by this bot)
|
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?
[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? |
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 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. |
Unless you compile with the GCC backend, the license of GCC doesn't concern you. |
It would be great if this was clarified a bit more in the discussion. When we were talking about "binary distributions" here, it means a distribution of the compiler toolchain, right? Not the actual end user Rust code compiled with rustc. |
This is the part I'm not clear about: by default, do we plan to include the GCC backend in all binary distributions? |
Are you saying that if you compile code with gcc then the resulting binaries have to be GPL? As far as I know, that's not the case. I think it's relatively common for closed-source products to be compiled and released using GPL toolchains. Generally I thought the way it works is if you include GPL code in your compiled binary then your whole binary needs to be GPL. |
That's not how I understood it. But I'm definitely not an expert in the area so I'd better keep quiet until someone well versed in licenses and in GPL2 in particular could confirm our thoughts. |
Yes.
Yes; "a binary distribution of Rust" where 'Rust' means what is provided in this GitHub org/repo by the Rust Project. |
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