-
Notifications
You must be signed in to change notification settings - Fork 13k
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
rustbuild: Fix MSBuild location of llvm-config.exe
#48757
Conversation
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
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 think with the comment I'll consider this good to go.
@@ -162,7 +162,11 @@ pub fn std_cargo(build: &Build, | |||
// missing | |||
// We also only build the runtimes when --enable-sanitizers (or its | |||
// config.toml equivalent) is used | |||
cargo.env("LLVM_CONFIG", build.llvm_config(target)); | |||
let llvm_config = build.ensure(native::Llvm { | |||
target: build.config.build, |
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.
Shouldn't this be the target we're passing to std_cargo? Or is this some other llvm-config? Either way, it'd be good to comment on the build.config.build with why we're passing it, and not target
.
It also looks like it's maybe worth making this build.ensure(...)
call the body of the old llvm_config
function and then just calling it so we avoid duplicating it. But that's probably a minor detail, up to you.
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.
Ah good point! I was hoping to keep the ensure
here though to canonicalize the definition of where llvm-config
comes from in one place (previously it was calculated in two places)
2c2ffe1
to
d04a029
Compare
re-r? @Mark-Simulacrum |
@bors r+ |
📌 Commit d04a029 has been approved by |
@bors p=1 Giving this a little boost so I can actually build rustc locally |
⌛ Testing commit d04a029ed36479840f33449230927533dfd1b4c3 with merge 4616ea633aa27d1361a573290501e70f1fda9203... |
💔 Test failed - status-travis |
|
For LLD integration the path to `llvm-config` needed to change to inside the build directory itself (for whatever reason) but the build directory is different on MSBuild than it is on `ninja` for MSVC builds, so the path to `llvm-config.exe` was actually wrong and not working! This commit removes the `Build::llvm_config` function in favor of the source of truth, the `Llvm` build step itself. The build step was then updated to find the right build directory for MSBuild as well as `ninja` for where `llvm-config.exe` is located. Closes rust-lang#48749
d04a029
to
be902e7
Compare
@bors: r=Mark-Simulacrum |
📌 Commit be902e7 has been approved by |
rustbuild: Fix MSBuild location of `llvm-config.exe` For LLD integration the path to `llvm-config` needed to change to inside the build directory itself (for whatever reason) but the build directory is different on MSBuild than it is on `ninja` for MSVC builds, so the path to `llvm-config.exe` was actually wrong and not working! This commit removes the `Build::llvm_config` function in favor of the source of truth, the `Llvm` build step itself. The build step was then updated to find the right build directory for MSBuild as well as `ninja` for where `llvm-config.exe` is located. Closes #48749
💔 Test failed - status-travis |
rustbuild: Fix MSBuild location of `llvm-config.exe` For LLD integration the path to `llvm-config` needed to change to inside the build directory itself (for whatever reason) but the build directory is different on MSBuild than it is on `ninja` for MSVC builds, so the path to `llvm-config.exe` was actually wrong and not working! This commit removes the `Build::llvm_config` function in favor of the source of truth, the `Llvm` build step itself. The build step was then updated to find the right build directory for MSBuild as well as `ninja` for where `llvm-config.exe` is located. Closes #48749
☀️ Test successful - status-appveyor, status-travis |
For LLD integration the path to
llvm-config
needed to change to inside thebuild directory itself (for whatever reason) but the build directory is
different on MSBuild than it is on
ninja
for MSVC builds, so the path tollvm-config.exe
was actually wrong and not working!This commit removes the
Build::llvm_config
function in favor of the source oftruth, the
Llvm
build step itself. The build step was then updated to find theright build directory for MSBuild as well as
ninja
for wherellvm-config.exe
is located.
Closes #48749