-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Add GCC and the GCC codegen backend to build-manifest and rustup #151156
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
base: main
Are you sure you want to change the base?
Conversation
Can you confirm this is real preview? Historically I'm not sure we've had any components we actually managed to make installable only with -preview (by accident). @bors try=dist-x86_64-linux (Is that the right way to get a full dist build? If so I can kick a dev-static run off with the artifacts once it completes). |
|
Unknown command "try". Run |
|
@bors try jobs=dist-x86_64-linux |
This comment has been minimized.
This comment has been minimized.
Add GCC and the GCC codegen backend to build-manifest and rustup try-job: dist-x86_64-linux
|
Huh, indeed if I do I guess it's because rustup allows both the original name and the renamed name to be installed? |
This PR adds the GCC codegen backend, and the GCC (libgccjit) component upon which it depends, to build-manifest, and thus also to (nightly) Rustup. I added both components in a single PR, because one can't work/isn't useful without the other.
Both components are marked as nightly-only and as
-preview.As a reminder, the GCC component is special; we need a separate component for every (host, target) compilation pair. This is not something that is really supported by rustup today, so we work around that by creating a separate component/package for each compilation target. So if we want to distribute GCC that can compile from {T1, T2} to {T2, T3}, we will create two separate components (
gcc-T2andgcc-T3), and make both of them available on T1 and T2 hosts.I tried to reuse the existing structure of
PkgTypeinbuild-manifest, but added a target field to theGccpackage variant. This required some macro hackery, but at least it doesn't require making larger changes tobuild-manifest.After this PR lands, unless I messed something up, starting with the following nightly, the following should work:
rustup +nightly component add rustc-codegen-gcc-preview gcc-x86_64-unknown-linux-gnu-preview RUSTFLAGS="-Zcodegen-backend=gcc" cargo +nightly buildNote that it will work currently only on
x86_64-unknown-linux-gnu, and only if not cross-compiling.r? @Mark-Simulacrum