summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/xray/tests
diff options
context:
space:
mode:
authorHubert Tong <hubert.reinterpretcast@gmail.com>2019-02-13 00:55:30 +0000
committerHubert Tong <hubert.reinterpretcast@gmail.com>2019-02-13 00:55:30 +0000
commita9f91c810c8498b844bccb2adb8ab4e9b11433cc (patch)
treede94feb8382c46c15af3bc5f740593f4a6b7a081 /compiler-rt/lib/xray/tests
parent9ea90acfeb5207c034089187da2b49d97f3a6a7a (diff)
downloadbcm5719-llvm-a9f91c810c8498b844bccb2adb8ab4e9b11433cc.tar.gz
bcm5719-llvm-a9f91c810c8498b844bccb2adb8ab4e9b11433cc.zip
[xray][tests][RHDTS] Add -lstdc++ after LLVM libs, resolving link error with RHDTS
Summary: A link error was encountered when using the Red Hat Developer Toolset. In the RHDTS, `libstdc++.so` is a linker script that may resolve symbols to a static library. This patch places `-lstdc++` later in the ordering. Reviewers: sfertile, nemanjai, tstellar, dberris Reviewed By: dberris Subscribers: dberris, mgorny, delcypher, jdoerfert, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D58144 llvm-svn: 353905
Diffstat (limited to 'compiler-rt/lib/xray/tests')
-rw-r--r--compiler-rt/lib/xray/tests/CMakeLists.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler-rt/lib/xray/tests/CMakeLists.txt b/compiler-rt/lib/xray/tests/CMakeLists.txt
index deddc5101e7..14585290454 100644
--- a/compiler-rt/lib/xray/tests/CMakeLists.txt
+++ b/compiler-rt/lib/xray/tests/CMakeLists.txt
@@ -48,8 +48,7 @@ endfunction()
set(XRAY_TEST_ARCH ${XRAY_SUPPORTED_ARCH})
set(XRAY_UNITTEST_LINK_FLAGS
- ${CMAKE_THREAD_LIBS_INIT}
- -l${SANITIZER_CXX_ABI_LIBRARY})
+ ${CMAKE_THREAD_LIBS_INIT})
if (NOT APPLE)
# Needed by LLVMSupport.
@@ -81,6 +80,8 @@ if (NOT APPLE)
append_list_if(COMPILER_RT_HAS_LIBEXECINFO -lexecinfo XRAY_UNITTEST_LINK_FLAGS)
endif()
+list(APPEND XRAY_UNITTEST_LINK_FLAGS -l${SANITIZER_CXX_ABI_LIBRARY})
+
macro(add_xray_unittest testname)
cmake_parse_arguments(TEST "" "" "SOURCES;HEADERS" ${ARGN})
if(UNIX AND NOT APPLE)
OpenPOWER on IntegriCloud