-
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
Ignore host C++ runtime in a cross build scenario #114078
Ignore host C++ runtime in a cross build scenario #114078
Conversation
When cross building a dragonfly toolchain e.g. host=darwin, build=dragonfly, target=dragonfly LLVM seems to pick up a libc++ runtime. This seems to primarily be an artifact of the stage0 compiler wanting libc++ for darwin. Unsure if this is needed or used but here it is.
For the MacOS -> DragonFly cross build case we seem to pick up some guidance from the MacOS stage0 compiler that conflicts with what's needed for DragonFly. Assuming your cross compiler is already setup to DTRT by default this should unbork cross builds.
If we're cross compiling where the C++ flavors aren't the same we'll potentially pick up a hardcoded request for e.g. libc++ from the host's llvm-config. If the target uses GNU's libstdc++ and/or libc++ is otherwise not present for the target build this will not work.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @cuviper (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
The job Click to see the possible cause of the failure (guessed by this bot)
|
To be clear, This change seems like it may be ok, but fickle. I sure wish we could get the right answer out of
We do have to run a host binary to run it at all, but it looks like we are trying to use the target version of that? Lines 1012 to 1013 in 249595b
|
For context I was cross building host tools ( Unfortunately I've blown away the build dirs (so this will be a slow context switch), but from looking at the logs I believe this was the root of the problem:
Specifically:
|
Hi, visiting and checking progress. I'm a bit unclear about the status of this PR but I think it is waiting on the author. However @inferiorhumanorgans feel free to request a review if you feel it's not the case, thanks. @rustbot author |
@inferiorhumanorgans any updates on this? |
@inferiorhumanorgans @rustbot label: +S-inactive |
I'm not quite sure how this will play out for other cross builds, but in the case of macOS to DragonFly one of the big problems I was running into was the insistence on linking against a non-existent
libc++
. It turned out that the flags were coming in from thellvm-config
built for the host, which at first blush seems like the wrong behavior.