[PATCH] D49358: [XRay][compiler-rt] Use `SANITIZER_CXX_ABI_LIBRARY` for XRay unit tests
Dean Michael Berris via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 15 18:08:38 PDT 2018
dberris created this revision.
dberris added a reviewer: kpw.
Herald added a subscriber: mgorny.
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.
https://reviews.llvm.org/D49358
Files:
compiler-rt/lib/xray/tests/CMakeLists.txt
Index: compiler-rt/lib/xray/tests/CMakeLists.txt
===================================================================
--- compiler-rt/lib/xray/tests/CMakeLists.txt
+++ compiler-rt/lib/xray/tests/CMakeLists.txt
@@ -42,8 +42,8 @@
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 @@
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49358.155605.patch
Type: text/x-patch
Size: 934 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180716/29604da6/attachment.bin>
More information about the llvm-commits
mailing list