-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Disable combining LLD with external llvm-config #139853
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 modifies If appropriate, please update |
This comment has been minimized.
This comment has been minimized.
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.
r=me with/without the nit once CI is green
@@ -2397,6 +2397,15 @@ impl Config { | |||
); | |||
} | |||
|
|||
let has_external_llvm_config = !config.llvm_from_ci |
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.
Nit: We could move Builder::is_system_llvm
to Config
since it doesn't rely on any Builder
specific data (other than is_builder_target
function which can also be moved).
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.
I don't feel very comfortable calling Config
functions in Config::parse
, because it's essentially its constructor, and some of the attributes used in the functions might not be initialized properly yet when the function is called. That being said, we access specific properties on the config
variable anyway, so that's probably not so different. Moved the functions.
This PR changes how LLVM is built. Consider updating src/bootstrap/download-ci-llvm-stamp. |
@rustbot ready |
This comment has been minimized.
This comment has been minimized.
@bors r+ |
Disable combining LLD with external llvm-config When an external `llvm-config` is used, we don't really know anything about the external LLD, as we don't build it ourselves. Therefore, we probably shouldn't allow using `rust-lld` nor copy it to the target sysroot. Fixes: rust-lang#139477 CC `@cuviper` r? `@onur-ozkan`
Rollup of 8 pull requests Successful merges: - rust-lang#136926 (Stabilize `-Zdwarf-version` as `-Cdwarf-version`) - rust-lang#139647 (Add unstable parsing of `--extern foo::bar=libbar.rlib` command line options) - rust-lang#139853 (Disable combining LLD with external llvm-config) - rust-lang#139867 (Fix some tidy paper cuts) - rust-lang#139871 (Fix wrong "move keyword" suggestion for async gen block) - rust-lang#139880 (Don't compute name of associated item if it's an RPITIT) - rust-lang#139884 (Update books) - rust-lang#139886 (`borrowck_graphviz_*` attribute tweaks) r? `@ghost` `@rustbot` modify labels: rollup
Disable combining LLD with external llvm-config When an external `llvm-config` is used, we don't really know anything about the external LLD, as we don't build it ourselves. Therefore, we probably shouldn't allow using `rust-lld` nor copy it to the target sysroot. Fixes: rust-lang#139477 CC ``@cuviper`` r? ``@onur-ozkan``
Rollup of 10 pull requests Successful merges: - rust-lang#139647 (Add unstable parsing of `--extern foo::bar=libbar.rlib` command line options) - rust-lang#139823 (Fix some bootstrap papercuts) - rust-lang#139853 (Disable combining LLD with external llvm-config) - rust-lang#139867 (Fix some tidy paper cuts) - rust-lang#139871 (Fix wrong "move keyword" suggestion for async gen block) - rust-lang#139876 (Make CodeStats' type_sizes public) - rust-lang#139880 (Don't compute name of associated item if it's an RPITIT) - rust-lang#139884 (Update books) - rust-lang#139886 (`borrowck_graphviz_*` attribute tweaks) - rust-lang#139893 (Add test for issue 125668) r? `@ghost` `@rustbot` modify labels: rollup
I think this failed in rollup: #139895 (comment) |
@bors r- |
Hmm, it failed in post-opt tests. This might be a bit annoying, because this is not external LLVM, but a "local" LLVM, and here we do in fact want to use LLD. I think that we should just print a warning instead of panicking when LLD is configured, and just avoid putting it into the sysroot in that case. @onur-ozkan WDYT? |
Sounds good to me. |
@bors try |
Disable combining LLD with external llvm-config When an external `llvm-config` is used, we don't really know anything about the external LLD, as we don't build it ourselves. Therefore, we probably shouldn't allow using `rust-lld` nor copy it to the target sysroot. Fixes: rust-lang#139477 CC `@cuviper` r? `@onur-ozkan` try-job: dist-x86_64-linux try-job: dist-aarch64-linux
☀️ Try build successful - checks-actions |
@rustbot ready |
@bors r+ |
Disable combining LLD with external llvm-config When an external `llvm-config` is used, we don't really know anything about the external LLD, as we don't build it ourselves. Therefore, we probably shouldn't allow using `rust-lld` nor copy it to the target sysroot. Fixes: rust-lang#139477 CC `@cuviper` r? `@onur-ozkan` try-job: dist-x86_64-linux try-job: dist-aarch64-linux
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#138528 (deref patterns: implement implicit deref patterns) - rust-lang#138934 (support config extensions) - rust-lang#139114 (Implement `pin!()` using `super let`) - rust-lang#139393 (rustdoc-json: Output target feature information) - rust-lang#139553 (sync::mpsc: prevent double free on `Drop`) - rust-lang#139615 (Remove `name_or_empty`) - rust-lang#139853 (Disable combining LLD with external llvm-config) - rust-lang#139913 (rustdoc/clean: Fix lowering of fn params (fixes correctness & HIR vs. middle parity regressions)) - rust-lang#139942 (Ignore aix for tests/ui/erros/pic-linker.rs) r? `@ghost` `@rustbot` modify labels: rollup
Disable combining LLD with external llvm-config When an external `llvm-config` is used, we don't really know anything about the external LLD, as we don't build it ourselves. Therefore, we probably shouldn't allow using `rust-lld` nor copy it to the target sysroot. Fixes: rust-lang#139477 CC `@cuviper` r? `@onur-ozkan` try-job: dist-x86_64-linux try-job: dist-aarch64-linux
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#138528 (deref patterns: implement implicit deref patterns) - rust-lang#138934 (support config extensions) - rust-lang#139393 (rustdoc-json: Output target feature information) - rust-lang#139553 (sync::mpsc: prevent double free on `Drop`) - rust-lang#139615 (Remove `name_or_empty`) - rust-lang#139853 (Disable combining LLD with external llvm-config) - rust-lang#139913 (rustdoc/clean: Fix lowering of fn params (fixes correctness & HIR vs. middle parity regressions)) - rust-lang#139942 (Ignore aix for tests/ui/erros/pic-linker.rs) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#138528 (deref patterns: implement implicit deref patterns) - rust-lang#138934 (support config extensions) - rust-lang#139393 (rustdoc-json: Output target feature information) - rust-lang#139553 (sync::mpsc: prevent double free on `Drop`) - rust-lang#139615 (Remove `name_or_empty`) - rust-lang#139853 (Disable combining LLD with external llvm-config) - rust-lang#139913 (rustdoc/clean: Fix lowering of fn params (fixes correctness & HIR vs. middle parity regressions)) - rust-lang#139942 (Ignore aix for tests/ui/erros/pic-linker.rs) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#138528 (deref patterns: implement implicit deref patterns) - rust-lang#139393 (rustdoc-json: Output target feature information) - rust-lang#139553 (sync::mpsc: prevent double free on `Drop`) - rust-lang#139615 (Remove `name_or_empty`) - rust-lang#139853 (Disable combining LLD with external llvm-config) - rust-lang#139913 (rustdoc/clean: Fix lowering of fn params (fixes correctness & HIR vs. middle parity regressions)) - rust-lang#139942 (Ignore aix for tests/ui/erros/pic-linker.rs) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#138528 (deref patterns: implement implicit deref patterns) - rust-lang#139393 (rustdoc-json: Output target feature information) - rust-lang#139553 (sync::mpsc: prevent double free on `Drop`) - rust-lang#139615 (Remove `name_or_empty`) - rust-lang#139853 (Disable combining LLD with external llvm-config) - rust-lang#139913 (rustdoc/clean: Fix lowering of fn params (fixes correctness & HIR vs. middle parity regressions)) - rust-lang#139942 (Ignore aix for tests/ui/erros/pic-linker.rs) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#138528 (deref patterns: implement implicit deref patterns) - rust-lang#139393 (rustdoc-json: Output target feature information) - rust-lang#139553 (sync::mpsc: prevent double free on `Drop`) - rust-lang#139615 (Remove `name_or_empty`) - rust-lang#139853 (Disable combining LLD with external llvm-config) - rust-lang#139913 (rustdoc/clean: Fix lowering of fn params (fixes correctness & HIR vs. middle parity regressions)) - rust-lang#139942 (Ignore aix for tests/ui/erros/pic-linker.rs) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#139853 - Kobzol:lld-llvm-config, r=onur-ozkan Disable combining LLD with external llvm-config When an external `llvm-config` is used, we don't really know anything about the external LLD, as we don't build it ourselves. Therefore, we probably shouldn't allow using `rust-lld` nor copy it to the target sysroot. Fixes: rust-lang#139477 CC ``@cuviper`` r? ``@onur-ozkan`` try-job: dist-x86_64-linux try-job: dist-aarch64-linux
When an external
llvm-config
is used, we don't really know anything about the external LLD, as we don't build it ourselves. Therefore, we probably shouldn't allow usingrust-lld
nor copy it to the target sysroot.Fixes: #139477
CC @cuviper
r? @onur-ozkan
try-job: dist-x86_64-linux
try-job: dist-aarch64-linux