-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[rtsan] Add dl, rt, m, and log libraries as unit test dependencies, get rid of atomic #98264
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
Conversation
@llvm/pr-subscribers-compiler-rt-sanitizer Author: Chris Apple (cjappl) ChangesFixing test failures in #98256 There are two issues being fixed here:
Fixed by linking dl
Fixed by removing atomic from the dependencies, I don't think we were even using it. I added in all of the dependencies used by the parent library in the tests, hopefully getting ahead of any other issues, adding rt and m, even if we haven't had issues with them yet Full diff: https://github.com/llvm/llvm-project/pull/98264.diff 1 Files Affected:
diff --git a/compiler-rt/lib/rtsan/tests/CMakeLists.txt b/compiler-rt/lib/rtsan/tests/CMakeLists.txt
index a379e4029633e..9eda116541ae3 100644
--- a/compiler-rt/lib/rtsan/tests/CMakeLists.txt
+++ b/compiler-rt/lib/rtsan/tests/CMakeLists.txt
@@ -36,15 +36,17 @@ set(RTSAN_UNITTEST_LINK_FLAGS
${SANITIZER_TEST_CXX_LIBRARIES}
-no-pie)
+append_list_if(COMPILER_RT_HAS_LIBDL -ldl RTSAN_UNITTEST_LINK_FLAGS)
+append_list_if(COMPILER_RT_HAS_LIBRT -lrt RTSAN_UNITTEST_LINK_FLAGS)
+append_list_if(COMPILER_RT_HAS_LIBM -lm RTSAN_UNITTEST_LINK_FLAGS)
append_list_if(COMPILER_RT_HAS_LIBPTHREAD -pthread RTSAN_UNITTEST_LINK_FLAGS)
+append_list_if(COMPILER_RT_HAS_LIBLOG -llog RTSAN_UNITTEST_LINK_FLAGS)
if (APPLE)
add_weak_symbols("sanitizer_common" WEAK_SYMBOL_LINK_FLAGS)
list(APPEND RTSAN_UNITTEST_LINK_FLAGS ${WEAK_SYMBOL_LINK_FLAGS})
list(APPEND RTSAN_UNITTEST_LINK_FLAGS ${DARWIN_osx_LINK_FLAGS})
list(APPEND RTSAN_UNITTEST_CFLAGS ${DARWIN_osx_CFLAGS})
-else()
- list(APPEND RTSAN_UNITTEST_LINK_FLAGS -latomic)
endif()
set(COMPILER_RT_GOOGLETEST_SOURCES ${COMPILER_RT_GTEST_SOURCE} ${COMPILER_RT_GMOCK_SOURCE})
|
CC @vitalybuka Really apologize for the churn. If there is a more deterministic way to do this other than "commit and see", please let me know. With some of these systems I'm at the mercy of the post-commit tests. Thanks for your continued help |
|
Would be possible to fix this? |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/109/builds/785 Here is the relevant piece of the build log for the reference:
|
Fixed in my local gitconfig. I thought i just needed it in the git commits. Thanks for bringing attention to it |
Trying to fix this. I am considering disabling Android as well as PPC arch to go "back basics" then add the rest in later. Will start a new review with those changes. I want to get to some semblance of stability ASAP |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/176/builds/880 Here is the relevant piece of the build log for the reference:
|
Follow on to #92460 (reporting old android builds failing) and #98264 (powerpc failing to discover gtests). Getting back to stability by getting back down to a very basic set of supported arches and OS's. In the future if there is demand we can build it back up. Especially when I understand how to test these systems, or have people who want to do the work on them. --------- Co-authored-by: David Trevelyan <[email protected]>
…et rid of atomic (llvm#98264) Fixing test failures in llvm#98256 There are two issues being fixed here: ``` ld.lld: error: undefined symbol: dlvsym ld.lld: error: undefined symbol: dlvsym ``` Fixed by linking dl ``` FAILED: ... -lstdc++ -no-pie -pthread -latomic -m64 /opt/rh/devtoolset-11/root/usr/lib/gcc/ppc64-redhat-linux/11/../../../../bin/ld: cannot find /usr/lib64/libatomic.so.1 ``` Fixed by removing atomic from the dependencies, I don't think we were even using it. I added in all of the dependencies used by the parent library in the tests, hopefully getting ahead of any other issues, adding rt and m, even if we haven't had issues with them yet
Follow on to llvm#92460 (reporting old android builds failing) and llvm#98264 (powerpc failing to discover gtests). Getting back to stability by getting back down to a very basic set of supported arches and OS's. In the future if there is demand we can build it back up. Especially when I understand how to test these systems, or have people who want to do the work on them. --------- Co-authored-by: David Trevelyan <[email protected]>
Fixing test failures in #98256
There are two issues being fixed here:
Fixed by linking dl
Fixed by removing atomic from the dependencies, I don't think we were even using it.
I added in all of the dependencies used by the parent library in the tests, hopefully getting ahead of any other issues, adding rt and m, even if we haven't had issues with them yet