-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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
[WIP] llvmPackages_{[12, 17] + git}.libcxx: re-export libcxxabi new, delete, exceptions #282624
Closed
Closed
Changes from all commits
Commits
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
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
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
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
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
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
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
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,21 @@ | ||
diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt | ||
index 329964a00136..ac6f510196bb 100644 | ||
--- a/src/CMakeLists.txt | ||
+++ b/src/CMakeLists.txt | ||
@@ -242,6 +242,16 @@ if (LIBCXX_ENABLE_SHARED) | ||
"-Wl,-force_symbols_not_weak_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/notweak.exp" | ||
"-Wl,-force_symbols_weak_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/weak.exp") | ||
|
||
+ if (NOT LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS | ||
+ AND DEFINED LIBCXXABI_REEXPORT_NEW_DELETE) | ||
+ target_link_libraries(cxx_shared PRIVATE | ||
+ "-Wl,-reexported_symbols_list,${LIBCXXABI_REEXPORT_NEW_DELETE}") | ||
+ endif() | ||
+ if (DEFINED LIBCXXABI_REEXPORT_EXCEPTIONS) | ||
+ target_link_libraries(cxx_shared PRIVATE | ||
+ "-Wl,-reexported_symbols_list,${LIBCXXABI_REEXPORT_EXCEPTIONS}") | ||
+ endif() | ||
+ | ||
target_link_libraries(cxx_shared PRIVATE $<TARGET_NAME_IF_EXISTS:cxxabi-reexports>) | ||
endif() | ||
|
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,13 @@ | ||
diff --git a/libcxxabi/src/CMakeLists.txt b/libcxxabi/src/CMakeLists.txt | ||
index 4198827203fc..1a028720bb7d 100644 | ||
--- a/src/CMakeLists.txt | ||
+++ b/src/CMakeLists.txt | ||
@@ -222,6 +222,7 @@ if (LIBCXXABI_ENABLE_SHARED) | ||
function(reexport_symbols file) | ||
export_symbols("${file}") | ||
target_link_libraries(cxxabi-reexports INTERFACE "-Wl,-reexported_symbols_list,${file}") | ||
+ file(INSTALL "${file}" DESTINATION "${LIBCXXABI_BINARY_DIR}/re-exports") | ||
endfunction() | ||
|
||
export_symbols("${CMAKE_CURRENT_SOURCE_DIR}/../lib/itanium-base.exp") | ||
|
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.
Does only Darwin need this, or is it also needed by other platforms using libc++ (such as
pkgsLLVM
or FreeBSD)?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.
just darwin.
APPLE
must be defined for it to be used. the patch uses it in https://github.com/llvm/llvm-project/blob/bc82cfb38d83f1afeb2c290aa472c2e2e88919cb/libcxx/src/CMakeLists.txt#L233-L247 and the patched code looks like.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.
I haven't tried pkgsLLVM or FreeBSD but we should provide whatever experience the provided system tools do. i've read that they still require libc++abi but random internet sources are not reliable. however, if they are true just fixing this for darwin seems sufficient as that will provide the same development / build experience using nixpkgs tools or the system tools.
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.
My understanding is FreeBSD doesn’t use libc++abi for its ABI library. I don’t know what FreeBSD in nixpkgs does, but I assume it intends to use the same one (libcxxrt).
https://wiki.freebsd.org/NewC%2B%2BStack
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.
As for Linux (pkgsLLVM), I assume it uses libc++abi. I’ll kick off a build on a Linux system with my branch (featuring this PR with the workarounds for #166205 removed) to see whether it needs any of its own patches.