Skip to content

Commit 0e657d4

Browse files
committed
Merging r353905:
------------------------------------------------------------------------ r353905 | hubert.reinterpretcast | 2019-02-12 16:55:30 -0800 (Tue, 12 Feb 2019) | 17 lines [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: 362765
1 parent e98c4c8 commit 0e657d4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

compiler-rt/lib/xray/tests/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ endfunction()
4848

4949
set(XRAY_TEST_ARCH ${XRAY_SUPPORTED_ARCH})
5050
set(XRAY_UNITTEST_LINK_FLAGS
51-
${CMAKE_THREAD_LIBS_INIT}
52-
-l${SANITIZER_CXX_ABI_LIBRARY})
51+
${CMAKE_THREAD_LIBS_INIT})
5352

5453
if (NOT APPLE)
5554
# Needed by LLVMSupport.
@@ -81,6 +80,8 @@ if (NOT APPLE)
8180
append_list_if(COMPILER_RT_HAS_LIBEXECINFO -lexecinfo XRAY_UNITTEST_LINK_FLAGS)
8281
endif()
8382

83+
list(APPEND XRAY_UNITTEST_LINK_FLAGS -l${SANITIZER_CXX_ABI_LIBRARY})
84+
8485
macro(add_xray_unittest testname)
8586
cmake_parse_arguments(TEST "" "" "SOURCES;HEADERS" ${ARGN})
8687
if(UNIX AND NOT APPLE)

0 commit comments

Comments
 (0)