Skip to content
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

LLVM: Always pass host/target info to compiler-rt/libstdcxxClang #84531

Merged
merged 1 commit into from Apr 14, 2020

Conversation

TravisWhitaker
Copy link
Contributor

@TravisWhitaker TravisWhitaker commented Apr 7, 2020

Here, for LLVM 5-10, information about the host platform is always passed to compiler-rt's build system (even if stdenv.hostPlatform.useLLVM isn't set) and to clang as -target and compiler-rt flags in libstdcxxClang's CC wrapper. These fixes allow llvmPackages_*.stdenv to be used for cross builds and fixes #40934

I'd appreciate review from @LnL7 and @ElvishJerricco, who I know have poked at this stuff before, as well as anyone else familiar with the cross build machinery.

I wasn't able to figure out how the clang-wrapper gets crtbegin.o, etc. in the non cross case, so there's a good chance these flags should be added somewhere else.

@Ericson2314
Copy link
Member

Oh this reminds me, there are some things I synced up to version 9 on master and 20.03, but not 10. Let me do that first.

@Ericson2314
Copy link
Member

Did that in #85167. I suppose I can rebase this later today.

@Ericson2314
Copy link
Member

I guess this is just barely in-bounds for master rather than staging.

@Ericson2314 Ericson2314 merged commit 40000eb into NixOS:master Apr 14, 2020
@TravisWhitaker
Copy link
Contributor Author

@Ericson2314 Thanks!

@matthewbauer
Copy link
Member

I think this causes the regression in #85622

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clang can't be used to cross-build packages.
3 participants