-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Make combining LLD with external LLVM config a hard error #143175
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
Make combining LLD with external LLVM config a hard error #143175
Conversation
@bors2 try |
…<try> Make combining LLD with external LLVM config a hard error Younger me made this only a warning in #139853, because our post-dist tests were relying on this. But that was not a good idea, because there are a bunch of places in bootstrap that outright try to build LLD/copy LLD to sysroot when `lld_enabled` is true (rightfully so), which is causing issues (#143076). Instead of piling more hacks, I'd like to just disallow this, and use hack to make our CI work instead. If this breaks the CI post-dist tests, I'll either add some special environment variable for it, or, as an alternative, make the error back into a warning, but also disable `lld_enabled` when this situation happens. try-job: dist-x86_64-linux
I checked that this executes the same number of tests as before. Looks like just disabling LLD for post-dist tests in bootstrap works! 🎉 r? @jieyouxu |
|
This PR modifies If appropriate, please update Some changes occurred in src/tools/opt-dist cc @Kobzol |
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.
Hm, I think this makes sense. I'd also rather hard error on this combination instead of trying to do some... implicit magic.
Can you add a change tracker entry for this? Feel free to r=me after.
@bors r=Jieyouxu rollup |
Do not enable LLD by default in the dist profile History of us building & shipping LLD for `dist` builds: 1) We used to unconditionally build & ship LLD in bootstrap 2) This was causing problems for people doing custom `dist` builds (https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/MSVC.20Runtime.20mismatch.20when.20building.20LLD) 3) #126701 made shipping of LLD optional, but to preserve previous behavior, it forcefully enabled `rust.lld = true` in the `dist` profile by default, and overwrote the default to `false` on our CI for external LLVM builds. - This also didn't match the documentation of `rust.lld` in `bootstrap.example.toml`, which I previously missed. 4) However, since the external LLVM opt-out was only implemented for our CI, and not for all `dist` users, this started causing issues for people `dist`ing with external LLVM (#143076). The problem is that the default shouldn't be "true", but "LLD is enabled when LLVM isn't external", but this is not possible to do only in TOML. So this PR reverses the behavior. LLD is not enabled by default in `dist` anymore. We switch our CI to *opt into* disting LLD, unless an external LLVM is used. External `dist` users can still opt into enabling LLD, but if they do so while also using external LLVM, they will now get a [hard error](#143175). r? `@jieyouxu` try-job: x86_64-mingw try-job: dist-x86_64-linux
Do not enable LLD by default in the dist profile History of us building & shipping LLD for `dist` builds: 1) We used to unconditionally build & ship LLD in bootstrap 2) This was causing problems for people doing custom `dist` builds (https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/MSVC.20Runtime.20mismatch.20when.20building.20LLD) 3) #126701 made shipping of LLD optional, but to preserve previous behavior, it forcefully enabled `rust.lld = true` in the `dist` profile by default, and overwrote the default to `false` on our CI for external LLVM builds. - This also didn't match the documentation of `rust.lld` in `bootstrap.example.toml`, which I previously missed. 4) However, since the external LLVM opt-out was only implemented for our CI, and not for all `dist` users, this started causing issues for people `dist`ing with external LLVM (#143076). The problem is that the default shouldn't be "true", but "LLD is enabled when LLVM isn't external", but this is not possible to do only in TOML. So this PR reverses the behavior. LLD is not enabled by default in `dist` anymore. We switch our CI to *opt into* disting LLD, unless an external LLVM is used. External `dist` users can still opt into enabling LLD, but if they do so while also using external LLVM, they will now get a [hard error](#143175). r? `@jieyouxu` try-job: `x86_64-mingw*` try-job: dist-x86_64-linux
Rollup of 9 pull requests Successful merges: - #143019 (Ensure -V --verbose processes both codegen_backend and codegen-backend) - #143140 (give Pointer::into_parts a more scary name and offer a safer alternative) - #143175 (Make combining LLD with external LLVM config a hard error) - #143180 (Use `tracing-forest` instead of `tracing-tree` for bootstrap tracing) - #143223 (Improve macro stats printing) - #143228 (Handle build scripts better in `-Zmacro-stats` output.) - #143229 ([COMPILETEST-UNTANGLE 1/N] Move some some early config checks to the lib and move the compiletest binary) - #143246 (Subtree update of `rust-analyzer`) - #143248 (Update books) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #143175 - Kobzol:bootstrap-lld-external-llvm-config, r=Jieyouxu Make combining LLD with external LLVM config a hard error Younger me made this only a warning in #139853, because our post-dist tests were relying on this. But that was not a good idea, because there are a bunch of places in bootstrap that outright try to build LLD/copy LLD to sysroot when `lld_enabled` is true (rightfully so), which is causing issues (#143076). Instead of piling more hacks, I'd like to just disallow this, and if we need to use a hack, do it only for our CI. If this breaks the CI post-dist tests, I'll either add some special environment variable for it, or, as an alternative, make the error back into a warning, but also disable `lld_enabled` when this situation happens. try-job: dist-x86_64-linux Fixes: #143175
…r=Jieyouxu Make combining LLD with external LLVM config a hard error Younger me made this only a warning in rust-lang/rust#139853, because our post-dist tests were relying on this. But that was not a good idea, because there are a bunch of places in bootstrap that outright try to build LLD/copy LLD to sysroot when `lld_enabled` is true (rightfully so), which is causing issues (rust-lang/rust#143076). Instead of piling more hacks, I'd like to just disallow this, and if we need to use a hack, do it only for our CI. If this breaks the CI post-dist tests, I'll either add some special environment variable for it, or, as an alternative, make the error back into a warning, but also disable `lld_enabled` when this situation happens. try-job: dist-x86_64-linux Fixes: rust-lang/rust#143175
Rollup of 9 pull requests Successful merges: - rust-lang/rust#143019 (Ensure -V --verbose processes both codegen_backend and codegen-backend) - rust-lang/rust#143140 (give Pointer::into_parts a more scary name and offer a safer alternative) - rust-lang/rust#143175 (Make combining LLD with external LLVM config a hard error) - rust-lang/rust#143180 (Use `tracing-forest` instead of `tracing-tree` for bootstrap tracing) - rust-lang/rust#143223 (Improve macro stats printing) - rust-lang/rust#143228 (Handle build scripts better in `-Zmacro-stats` output.) - rust-lang/rust#143229 ([COMPILETEST-UNTANGLE 1/N] Move some some early config checks to the lib and move the compiletest binary) - rust-lang/rust#143246 (Subtree update of `rust-analyzer`) - rust-lang/rust#143248 (Update books) r? `@ghost` `@rustbot` modify labels: rollup
…ieyouxu Do not enable LLD by default in the dist profile History of us building & shipping LLD for `dist` builds: 1) We used to unconditionally build & ship LLD in bootstrap 2) This was causing problems for people doing custom `dist` builds (https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/MSVC.20Runtime.20mismatch.20when.20building.20LLD) 3) rust-lang#126701 made shipping of LLD optional, but to preserve previous behavior, it forcefully enabled `rust.lld = true` in the `dist` profile by default, and overwrote the default to `false` on our CI for external LLVM builds. - This also didn't match the documentation of `rust.lld` in `bootstrap.example.toml`, which I previously missed. 4) However, since the external LLVM opt-out was only implemented for our CI, and not for all `dist` users, this started causing issues for people `dist`ing with external LLVM (rust-lang#143076). The problem is that the default shouldn't be "true", but "LLD is enabled when LLVM isn't external", but this is not possible to do only in TOML. So this PR reverses the behavior. LLD is not enabled by default in `dist` anymore. We switch our CI to *opt into* disting LLD, unless an external LLVM is used. External `dist` users can still opt into enabling LLD, but if they do so while also using external LLVM, they will now get a [hard error](rust-lang#143175). r? `@jieyouxu` try-job: `x86_64-mingw*` try-job: dist-x86_64-linux
Rollup merge of #143255 - Kobzol:disable-lld-by-default, r=jieyouxu Do not enable LLD by default in the dist profile History of us building & shipping LLD for `dist` builds: 1) We used to unconditionally build & ship LLD in bootstrap 2) This was causing problems for people doing custom `dist` builds (https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/MSVC.20Runtime.20mismatch.20when.20building.20LLD) 3) #126701 made shipping of LLD optional, but to preserve previous behavior, it forcefully enabled `rust.lld = true` in the `dist` profile by default, and overwrote the default to `false` on our CI for external LLVM builds. - This also didn't match the documentation of `rust.lld` in `bootstrap.example.toml`, which I previously missed. 4) However, since the external LLVM opt-out was only implemented for our CI, and not for all `dist` users, this started causing issues for people `dist`ing with external LLVM (#143076). The problem is that the default shouldn't be "true", but "LLD is enabled when LLVM isn't external", but this is not possible to do only in TOML. So this PR reverses the behavior. LLD is not enabled by default in `dist` anymore. We switch our CI to *opt into* disting LLD, unless an external LLVM is used. External `dist` users can still opt into enabling LLD, but if they do so while also using external LLVM, they will now get a [hard error](#143175). r? `@jieyouxu` try-job: `x86_64-mingw*` try-job: dist-x86_64-linux
Younger me made this only a warning in #139853, because our post-dist tests were relying on this. But that was not a good idea, because there are a bunch of places in bootstrap that outright try to build LLD/copy LLD to sysroot when
lld_enabled
is true (rightfully so), which is causing issues (#143076). Instead of piling more hacks, I'd like to just disallow this, and if we need to use a hack, do it only for our CI.If this breaks the CI post-dist tests, I'll either add some special environment variable for it, or, as an alternative, make the error back into a warning, but also disable
lld_enabled
when this situation happens.try-job: dist-x86_64-linux
Fixes: #143175