-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
fix building libstd with cfg(miri) #60469
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
Can you explain a bit more (in the commit message, not just as a comment here) about why this would only be needed for miri, and not for non-miri? |
With #60156, we use I added a comment to the code saying so. |
This now blocks #60533 |
Cc @rust-lang/libs does this seem reasonable? |
Should |
No: #59879 |
This seems indicative of a deeper bug that would be better fixed than linking yet another framework in the build script. Why, when running with miri, is any artifact being linked? Presumably miri just needs full metadata, right? |
@alexcrichton that would be #56443 |
I'm not sure that really answers my question though because that issue is about producing just an rlib, but that still feels wrong because miri doesn't need anything beyond metadata? |
How can we build a metadata-only libstd? We can't even figure out how to build an rlib-only libstd. |
I don't really even know how you're building libstd to begin with. If you're using I'm basically just asking that some elbow grease is applied somewhere by someone so we don't have to keep applying these hacks. I do not have the time to apply the elbow grease myself, and I can try to scrounge together enough time to at least review things. I'm sorry though but I'm not available for a back-and-forth design discussion over how to design builds of libstd for miri, that's just so far off my radar. |
This is decidedly outside my area of expertise; handing off to someone more familiar with miri. r? @Centril |
Also outside of my expertise; r? @oli-obk |
Interesting idea, I'll put that on the list. However, at least the way things are right now, when Miri is built as a rustc tool it shares the libstd with the rest of the build, so we'd still have to also build the full thing. If this PR here is considered too hacky, I can also just revert #60156. This means |
My opinion is that this is ok, since it is a temporary hack anyway. It will go away once we figure out how to (fake-)open Until then I think it would be better to support |
Having a deadline for the removal of this seems reasonable to me, so I would be ok with that. Has this change been tested with miri? It seems like the previous one wasn't maybe and if you're using Cargo with RUSTFLAGS this change won't work (since build scripts don't get RUSTFLAGS), so I just wanted to confirm. |
I don' have a Mac, so I am afraid I cannot test this.
|
Ok but surely we can at least agree that before merging hacks into libstd we should at least have anyone testing to show that they do indeed satisfy the intended use case? |
I agree with the sentiment, but don't have any idea how to do so. Miri is currently broken, so that can't get worse. ;) But I don't know if this could have an effect on the other tools, which I think are built by the same builder. |
You could bump the miri submodule in this PR. That way the PR only merges if your change actually fixes miri (assuming we test miri on mac in CI)On 11 May 2019 00:01, Ralf Jung <notifications@github.com> wrote:I agree with the sentiment, but don't have any idea how to do so.
Miri is currently broken, so that can't get worse. ;) But I don't know if this could have an effect on the other tools, which I think are built by the same builder.
—You are receiving this because you were assigned.Reply to this email directly, view it on GitHub, or mute the thread.
|
Hm, that would help. However we don't build libstd the same way here on CI ans in standalone Miri.
|
I just realized I had entirely forgotten about rust-lang/cargo#4423. So we won't see the |
fix Miri This reverts rust-lang#60156, which turned out to be a dead end (see rust-lang#60469). r? @oli-obk
Follow-up to #60156 to fix the failure in rust-lang/miri#721.
I think that build scripts get the same feature flags, but someone please correct me if I am wrong.
Also I wonder why this didn't cause #60156 to fail...