-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
[compiler-rt] Check for and use -lunwind when linking with -nodefaultlibs #65912
Merged
Conversation
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
…libs If libc++ is available and should be used as the ubsan C++ ABI library, the check for libc++ might fail if libc++ is a static library, as the -nodefaultlibs flag inhibits a potential compiler default -lunwind. Just like the -nodefaultlibs configuration tests for and manually adds a bunch of compiler default libraries, look for -lunwind too.
mstorsjo
added
cmake
Build system in general and CMake in particular
compiler-rt:ubsan
Undefined behavior sanitizer
labels
Sep 10, 2023
Ping @petrhosek |
petrhosek
approved these changes
Sep 15, 2023
mstorsjo
added a commit
that referenced
this pull request
Sep 15, 2023
…odefaultlibs (#65912)" This reverts commit 64c0bdd. This seems to run into errors on some buildbots; configure errors out like this: -- Looking for _Unwind_RaiseException in unwind -- Looking for _Unwind_RaiseException in unwind - not found CMake Error at /usr/share/cmake-3.25/Modules/CheckLibraryExists.cmake:71 (try_compile): Only libraries may be used as try_compile or try_run IMPORTED LINK_LIBRARIES. Got unwind of type UTILITY. Call Stack (most recent call first): /b/sanitizer-aarch64-linux-fuzzer/build/llvm-project/compiler-rt/cmake/config-ix.cmake:66 (check_library_exists) /b/sanitizer-aarch64-linux-fuzzer/build/llvm-project/compiler-rt/CMakeLists.txt:281 (include)
ZijunZhaoCCK
pushed a commit
to ZijunZhaoCCK/llvm-project
that referenced
this pull request
Sep 19, 2023
…libs (llvm#65912) If libc++ is available and should be used as the ubsan C++ ABI library, the check for libc++ might fail if libc++ is a static library, as the -nodefaultlibs flag inhibits a potential compiler default -lunwind. Just like the -nodefaultlibs configuration tests for and manually adds a bunch of compiler default libraries, look for -lunwind too.
ZijunZhaoCCK
pushed a commit
to ZijunZhaoCCK/llvm-project
that referenced
this pull request
Sep 19, 2023
…odefaultlibs (llvm#65912)" This reverts commit 64c0bdd. This seems to run into errors on some buildbots; configure errors out like this: -- Looking for _Unwind_RaiseException in unwind -- Looking for _Unwind_RaiseException in unwind - not found CMake Error at /usr/share/cmake-3.25/Modules/CheckLibraryExists.cmake:71 (try_compile): Only libraries may be used as try_compile or try_run IMPORTED LINK_LIBRARIES. Got unwind of type UTILITY. Call Stack (most recent call first): /b/sanitizer-aarch64-linux-fuzzer/build/llvm-project/compiler-rt/cmake/config-ix.cmake:66 (check_library_exists) /b/sanitizer-aarch64-linux-fuzzer/build/llvm-project/compiler-rt/CMakeLists.txt:281 (include)
mstorsjo
added a commit
to mstorsjo/llvm-project
that referenced
this pull request
Oct 4, 2023
…odefaultlibs If libc++ is available and should be used as the ubsan C++ ABI library, the check for libc++ might fail if libc++ is a static library, as the -nodefaultlibs flag inhibits a potential compiler default -lunwind. Just like the -nodefaultlibs configuration tests for and manually adds a bunch of compiler default libraries, look for -lunwind too. This is a reland of llvm#65912.
mstorsjo
added a commit
that referenced
this pull request
Oct 5, 2023
…odefaultlibs (#66584) If libc++ is available and should be used as the ubsan C++ ABI library, the check for libc++ might fail if libc++ is a static library, as the -nodefaultlibs flag inhibits a potential compiler default -lunwind. Just like the -nodefaultlibs configuration tests for and manually adds a bunch of compiler default libraries, look for -lunwind too. This is a reland of #65912.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cmake
Build system in general and CMake in particular
compiler-rt:ubsan
Undefined behavior sanitizer
compiler-rt
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.
If libc++ is available and should be used as the ubsan C++ ABI library, the check for libc++ might fail if libc++ is a static library, as the -nodefaultlibs flag inhibits a potential compiler default -lunwind.
Just like the -nodefaultlibs configuration tests for and manually adds a bunch of compiler default libraries, look for -lunwind too.