summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Karpenkov <ekarpenkov@apple.com>2018-04-11 18:00:09 +0000
committerGeorge Karpenkov <ekarpenkov@apple.com>2018-04-11 18:00:09 +0000
commit0fc4b7f429ed6758c1bed7c5dc004efe40b23eaa (patch)
tree1fb51d821f708678c17f4413fa908df7e6d50b3b
parent082c76e1bfa56a985a5d684d5b4c67212bd804ce (diff)
downloadbcm5719-llvm-0fc4b7f429ed6758c1bed7c5dc004efe40b23eaa.tar.gz
bcm5719-llvm-0fc4b7f429ed6758c1bed7c5dc004efe40b23eaa.zip
[xray] Fix OS X bots.
OS X has "fat" executables which contain the code for all architectures. llvm-svn: 329832
-rw-r--r--compiler-rt/lib/xray/tests/CMakeLists.txt30
1 files changed, 15 insertions, 15 deletions
diff --git a/compiler-rt/lib/xray/tests/CMakeLists.txt b/compiler-rt/lib/xray/tests/CMakeLists.txt
index 2f06bfe2a6f..f3cc85fc79f 100644
--- a/compiler-rt/lib/xray/tests/CMakeLists.txt
+++ b/compiler-rt/lib/xray/tests/CMakeLists.txt
@@ -17,12 +17,12 @@ set(XRAY_UNITTEST_CFLAGS
-I${COMPILER_RT_SOURCE_DIR}/lib/xray
-I${COMPILER_RT_SOURCE_DIR}/lib)
-macro(add_xray_lib library)
+function(add_xray_lib library)
add_library(${library} STATIC ${ARGN})
set_target_properties(${library} PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
FOLDER "Compiler-RT Runtime tests")
-endmacro()
+endfunction()
function(get_xray_lib_for_arch arch lib)
if(APPLE)
@@ -68,20 +68,20 @@ macro(add_xray_unittest testname)
endmacro()
if(COMPILER_RT_CAN_EXECUTE_TESTS)
+ if (APPLE)
+ add_xray_lib("RTXRay.test.osx"
+ $<TARGET_OBJECTS:RTXray.osx>
+ $<TARGET_OBJECTS:RTXrayFDR.osx>
+ $<TARGET_OBJECTS:RTSanitizerCommon.osx>
+ $<TARGET_OBJECTS:RTSanitizerCommonLibc.osx>)
+ else()
foreach(arch ${XRAY_SUPPORTED_ARCH})
- if (APPLE)
- add_xray_lib("RTXRay.test.osx"
- $<TARGET_OBJECTS:RTXray.osx>
- $<TARGET_OBJECTS:RTXrayFDR.osx>
- $<TARGET_OBJECTS:RTSanitizerCommon.osx>
- $<TARGET_OBJECTS:RTSanitizerCommonLibc.osx>)
- else()
- add_xray_lib("RTXRay.test.${arch}"
- $<TARGET_OBJECTS:RTXray.${arch}>
- $<TARGET_OBJECTS:RTXrayFDR.${arch}>
- $<TARGET_OBJECTS:RTSanitizerCommon.${arch}>
- $<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}>)
- endif()
+ add_xray_lib("RTXRay.test.${arch}"
+ $<TARGET_OBJECTS:RTXray.${arch}>
+ $<TARGET_OBJECTS:RTXrayFDR.${arch}>
+ $<TARGET_OBJECTS:RTSanitizerCommon.${arch}>
+ $<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}>)
endforeach()
+ endif()
add_subdirectory(unit)
endif()
OpenPOWER on IntegriCloud