-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Install libgccjit into the compiler's sysroot when cg_gcc is enabled #145341
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
Conversation
|
This PR changes how GCC is built. Consider updating src/bootstrap/download-ci-gcc-stamp. |
…ry when installing `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.
Thanks
@bors r+ rollup=never |
I don't think this needs rollup=never, tbh, as this code shouldn't even be exercised on CI, perhaps outside of one PR CI job (famous last words?). @bors r+ rollup |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
…ouxu Install libgccjit into the compiler's sysroot when cg_gcc is enabled This PR installs the `libgccjit.so` library (which is essentially GCC) into the rustc sysroot (`stageN/lib` on Linux) when the GCC codegen backend is enabled. This allows using the GCC codegen backend "out of the box" with the resulting rustc. It would be nice to get rid of the `libgccjit.so.0` alias (https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Forcing.20unversioned.20dylib.20dependencies.20on.20Linux/with/534180740), but it's not blocking for this change. You can try running `x build std --set 'rust.codegen-backends=["llvm", "gcc"]'` and then compiling a hello world with `rustc +stage1 -Zcodegen-backend=gcc main.rs`. It is now also possible to build stage2 rustc when the GCC is configured to be the default codegen backend, without any further `LD_LIBRARY_PATH` hacks: `./x build compiler --stage 2 --set 'rust.codegen-backends=["gcc"]'`. After this change, it should be pretty simple to add a dist/rustup step for actually shipping cg_gcc to end users. CC ``@GuillaumeGomez`` r? ``@jieyouxu``
Rollup of 9 pull requests Successful merges: - #144761 (aarch64: Make `outline-atomics` a known target feature) - #144949 (More `Printer` cleanups) - #144955 (search graph: lazily update parent goals) - #144962 (Add aarch64_be-unknown-none-softfloat target) - #145153 (Handle macros with multiple kinds, and improve errors) - #145241 ([AVR] Changed data_layout) - #145341 (Install libgccjit into the compiler's sysroot when cg_gcc is enabled) - #145349 (Correctly handle when there are no unstable items in the documented crate) - #145356 (Add another example for escaped `#` character in doctest in rustdoc book) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #145341 - Kobzol:codegen-backend-gcc, r=jieyouxu Install libgccjit into the compiler's sysroot when cg_gcc is enabled This PR installs the `libgccjit.so` library (which is essentially GCC) into the rustc sysroot (`stageN/lib` on Linux) when the GCC codegen backend is enabled. This allows using the GCC codegen backend "out of the box" with the resulting rustc. It would be nice to get rid of the `libgccjit.so.0` alias (https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Forcing.20unversioned.20dylib.20dependencies.20on.20Linux/with/534180740), but it's not blocking for this change. You can try running `x build std --set 'rust.codegen-backends=["llvm", "gcc"]'` and then compiling a hello world with `rustc +stage1 -Zcodegen-backend=gcc main.rs`. It is now also possible to build stage2 rustc when the GCC is configured to be the default codegen backend, without any further `LD_LIBRARY_PATH` hacks: `./x build compiler --stage 2 --set 'rust.codegen-backends=["gcc"]'`. After this change, it should be pretty simple to add a dist/rustup step for actually shipping cg_gcc to end users. CC ```@GuillaumeGomez``` r? ```@jieyouxu```
This PR installs the
libgccjit.so
library (which is essentially GCC) into the rustc sysroot (stageN/lib
on Linux) when the GCC codegen backend is enabled. This allows using the GCC codegen backend "out of the box" with the resulting rustc. It would be nice to get rid of thelibgccjit.so.0
alias (https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Forcing.20unversioned.20dylib.20dependencies.20on.20Linux/with/534180740), but it's not blocking for this change.You can try running
x build std --set 'rust.codegen-backends=["llvm", "gcc"]'
and then compiling a hello world withrustc +stage1 -Zcodegen-backend=gcc main.rs
.It is now also possible to build stage2 rustc when the GCC is configured to be the default codegen backend, without any further
LD_LIBRARY_PATH
hacks:./x build compiler --stage 2 --set 'rust.codegen-backends=["gcc"]'
.After this change, it should be pretty simple to add a dist/rustup step for actually shipping cg_gcc to end users.
CC @GuillaumeGomez
r? @jieyouxu