diff options
author | Dean Michael Berris <dberris@google.com> | 2018-09-19 01:35:52 +0000 |
---|---|---|
committer | Dean Michael Berris <dberris@google.com> | 2018-09-19 01:35:52 +0000 |
commit | 137ed7f4484f2fde1df1b74ea27e2c4b5e7001eb (patch) | |
tree | d87928e97143f25aaebb67d1e2bd9f916fe25dd3 /lib | |
parent | f43b0036debcc028ba42e1ee86666f4028870b55 (diff) | |
download | compiler-rt-137ed7f4484f2fde1df1b74ea27e2c4b5e7001eb.tar.gz |
[XRay] Detect terminfo library
Instead of assuming `-ltinfo` works, check whether there's terminfo
support on the host where LLVMSupport is compiled.
Follow-up to D52220.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@342523 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/xray/tests/CMakeLists.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/xray/tests/CMakeLists.txt b/lib/xray/tests/CMakeLists.txt index 6e12297f9..3b33f78a1 100644 --- a/lib/xray/tests/CMakeLists.txt +++ b/lib/xray/tests/CMakeLists.txt @@ -54,6 +54,11 @@ if (NOT APPLE) append_list_if(COMPILER_RT_HAS_LIBRT -lrt XRAY_UNITTEST_LINK_FLAGS) append_list_if(COMPILER_RT_HAS_LIBDL -ldl XRAY_UNITTEST_LINK_FLAGS) append_list_if(COMPILER_RT_HAS_LIBPTHREAD -pthread XRAY_UNITTEST_LINK_FLAGS) + + # Needed by LLVMSupport. + append_list_if( + COMPILER_RT_HAS_TERMINFO + -l${COMPILER_RT_TERMINFO_LIB} XRAY_UNITTEST_LINK_FLAGS) endif() macro(add_xray_unittest testname) @@ -75,7 +80,7 @@ macro(add_xray_unittest testname) DEPS gtest xray llvm-xray LLVMXRay LLVMTestingSupport CFLAGS ${XRAY_UNITTEST_CFLAGS} LINK_FLAGS ${TARGET_LINK_FLAGS} ${XRAY_UNITTEST_LINK_FLAGS} - -lLLVMXRay -lLLVMSupport -lLLVMTestingSupport -ltinfo + -lLLVMXRay -lLLVMSupport -lLLVMTestingSupport ) set_target_properties(XRayUnitTests PROPERTIES |