diff options
author | Dean Michael Berris <dberris@google.com> | 2018-07-16 01:08:56 +0000 |
---|---|---|
committer | Dean Michael Berris <dberris@google.com> | 2018-07-16 01:08:56 +0000 |
commit | 73c10fb13c42919a15e1b4fa31cf4bae7ff7bbf6 (patch) | |
tree | 74fbf0148a370a14f91864c59fbc8aa4a3311d6f | |
parent | fd78449c84a72de20cf1646cf706af84f943e64f (diff) |
[XRay][compiler-rt] Use `SANITIZER_CXX_ABI_LIBRARY` for XRay unit tests
Summary:
Fix a TODO in CMake config for XRay tests to use the detected C++ ABI
library in the tests.
Also make the tests depend on the llvm-xray target when built in-tree.
Reviewers: kpw, eizan
Reviewed By: eizan
Subscribers: mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D49358
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337142 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/xray/tests/CMakeLists.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/xray/tests/CMakeLists.txt b/lib/xray/tests/CMakeLists.txt index 132917aa2..11f373167 100644 --- a/lib/xray/tests/CMakeLists.txt +++ b/lib/xray/tests/CMakeLists.txt @@ -42,8 +42,8 @@ endfunction() set(XRAY_TEST_ARCH ${XRAY_SUPPORTED_ARCH}) set(XRAY_UNITTEST_LINK_FLAGS ${CMAKE_THREAD_LIBS_INIT} + -l${SANITIZER_CXX_ABI_LIBRARY} -fxray-instrument - -lstdc++ # TODO: Detect the correct standard library used! ) if (NOT APPLE) append_list_if(COMPILER_RT_HAS_LIBM -lm XRAY_UNITTEST_LINK_FLAGS) @@ -68,7 +68,7 @@ macro(add_xray_unittest testname) COMPILE_DEPS ${TEST_SOURCES} ${COMPILER_RT_GTEST_SOURCE} ${XRAY_HEADERS} ${XRAY_ALL_SOURCE_FILES_ABS_PATHS} RUNTIME "${XRAY_RUNTIME_LIBS}" - DEPS gtest xray + DEPS gtest xray llvm-xray CFLAGS ${XRAY_UNITTEST_CFLAGS} LINK_FLAGS ${TARGET_LINK_FLAGS} ${XRAY_UNITTEST_LINK_FLAGS}) set_target_properties(XRayUnitTests |