[PATCH] D38021: [Compiler-rt][MIPS] Fix cross build for XRAY
Nitesh Jain via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 22 01:55:42 PDT 2017
nitesh.jain updated this revision to Diff 119780.
https://reviews.llvm.org/D38021
Files:
lib/xray/CMakeLists.txt
Index: lib/xray/CMakeLists.txt
===================================================================
--- lib/xray/CMakeLists.txt
+++ lib/xray/CMakeLists.txt
@@ -60,14 +60,20 @@
set(XRAY_CFLAGS ${SANITIZER_COMMON_CFLAGS})
set(XRAY_COMMON_DEFINITIONS XRAY_HAS_EXCEPTIONS=1)
+
+if (NOT MSVC AND NOT DEFINED TARGET_FLAGS)
+ set(TARGET_FLAGS ${CMAKE_CXX_FLAGS})
+ separate_arguments(TARGET_FLAGS)
+endif()
+
append_list_if(
COMPILER_RT_HAS_XRAY_COMPILER_FLAG XRAY_SUPPORTED=1 XRAY_COMMON_DEFINITIONS)
append_list_if(
COMPILER_RT_BUILD_XRAY_NO_PREINIT XRAY_NO_PREINIT XRAY_COMMON_DEFINITIONS)
add_compiler_rt_object_libraries(RTXray
ARCHS ${XRAY_SUPPORTED_ARCH}
- SOURCES ${XRAY_SOURCES} CFLAGS ${XRAY_CFLAGS}
+ SOURCES ${XRAY_SOURCES} CFLAGS ${XRAY_CFLAGS} ${TARGET_FLAGS}
DEFS ${XRAY_COMMON_DEFINITIONS})
add_compiler_rt_component(xray)
@@ -82,7 +88,7 @@
STATIC
ARCHS ${arch}
SOURCES ${${arch}_SOURCES}
- CFLAGS ${XRAY_CFLAGS}
+ CFLAGS ${XRAY_CFLAGS} ${TARGET_FLAGS}
DEFS ${XRAY_COMMON_DEFINITIONS}
OBJECT_LIBS ${XRAY_COMMON_RUNTIME_OBJECT_LIBS}
PARENT_TARGET xray)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38021.119780.patch
Type: text/x-patch
Size: 1132 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171022/e35f9ad7/attachment.bin>
More information about the llvm-commits
mailing list