-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
cc-wrapper: add libcxxabi include flag for LLVM #255488
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -255,14 +255,6 @@ in let | |
[ "-rtlib=compiler-rt" | ||
"-Wno-unused-command-line-argument" | ||
"-B${targetLlvmLibraries.compiler-rt}/lib" | ||
|
||
# Combat "__cxxabi_config.h not found". Maybe this could be fixed by | ||
# copying these headers into libcxx? Note that building libcxx | ||
# outside of monorepo isn't supported anymore, might be related to | ||
# https://github.com/llvm/llvm-project/issues/55632 | ||
# ("16.0.3 libcxx, libcxxabi: circular build dependencies") | ||
# Looks like the machinery changed in https://reviews.llvm.org/D120727. | ||
"-I${lib.getDev targetLlvmLibraries.libcxx.cxxabi}/include/c++/v1" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. removed old workaround |
||
] | ||
++ lib.optional (!stdenv.targetPlatform.isWasm) "--unwindlib=libunwind" | ||
++ lib.optional | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,13 @@ in stdenv.mkDerivation { | |
$CXX -o cxx-check ${./cxx-main.cc} | ||
${emulator} ./cxx-check | ||
|
||
# test for https://github.com/NixOS/nixpkgs/issues/214524#issuecomment-1431745905 | ||
# .../include/cxxabi.h:20:10: fatal error: '__cxxabi_config.h' file not found | ||
# in libcxxStdenv | ||
echo "checking whether cxxabi.h can be included... " >&2 | ||
$CXX -o include-cxxabi ${./include-cxxabi.cc} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This pr fixes this test for |
||
${emulator} ./include-cxxabi | ||
|
||
${lib.optionalString (stdenv.isDarwin && stdenv.cc.isClang) '' | ||
echo "checking whether compiler can build with CoreFoundation.framework... " >&2 | ||
mkdir -p foo/lib | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include <cxxabi.h> | ||
#include <iostream> | ||
|
||
int main(int argc, char **argv) | ||
{ | ||
std::cerr << "ok" << std::endl; | ||
return 0; | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Before llvm 15
__cxxabi_config.h
was included inlibcxx
so this worked correctlyand
cxxabi.h was in both libcxx and libcxxabi
because we were copying it manually to libcxx.dev/include