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
llvm8: support c++ in cross case #59338
Conversation
this adds libc++ to the LLVM cross, giving us access to the full Nixpkgs set. This requires 4 stages of wrapped compilers: - Clang with no libraries - Clang with just compiler-rt - Clang with Libc, and compiler-rt - Clang with Libc++, Libc, and compiler-rt
7c65410
to
d453273
Compare
# pulled in. As a consequence, it is very quick to build different | ||
# targets provided by LLVM and we can also build for what GCC | ||
# doesn’t support like LLVM. Probably we should move to some other | ||
# file. |
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.
If we have libc
, libcxx
, librt
, and libunwind
attributes in cc-wrapper, I think most of this logic could move there even though some it is clang-specific.
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.
You would still need the 4 ccs though right?
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.
Perhaps but it could arise organically like:
{
# all-packages.nix
libc = ...;
librt = ...;
}
{
# llvm default.nix
xxx = ... (stdenvNoLlibs.override {
foo = libraries.noNull;
}) ...;
}
Pushed a WIP thing with unwind to my own repo, but it didn't work right off the bat. |
Backport the `--unwindlib` flag, so it don't try to use libgcc on Linux for hysterical reasons. The alternative of passing `-lunwind` always would mess up C.
d8aeb11
to
6794b01
Compare
this adds libc++ to the LLVM cross, giving us access to the full
Nixpkgs set. This requires 4 stages of wrapped compilers:
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Test: