[PATCH] D38021: [Compiler-rt][MIPS] Fix cross build for XRAY
Nitesh Jain via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 6 07:20:54 PDT 2017
nitesh.jain updated this revision to Diff 117993.
nitesh.jain added a comment.
Fix unit test build issues.
https://reviews.llvm.org/D38021
Files:
lib/xray/CMakeLists.txt
Index: lib/xray/CMakeLists.txt
===================================================================
--- lib/xray/CMakeLists.txt
+++ lib/xray/CMakeLists.txt
@@ -59,6 +59,15 @@
include_directories(../../include)
set(XRAY_CFLAGS ${SANITIZER_COMMON_CFLAGS})
+
+# To cross build XRAY we need to append CMAKE_C_FLAGS
+if(NOT MSVC AND DEFINED CMAKE_C_FLAGS)
+ set(XRAY_CROSS_COMPILE_FLAGS ${CMAKE_C_FLAGS})
+ separate_arguments(XRAY_CROSS_COMPILE_FLAGS)
+ LIST(APPEND XRAY_CFLAGS ${XRAY_CROSS_COMPILE_FLAGS})
+endif()
+
+
set(XRAY_COMMON_DEFINITIONS XRAY_HAS_EXCEPTIONS=1)
append_list_if(
COMPILER_RT_HAS_XRAY_COMPILER_FLAG XRAY_SUPPORTED=1 XRAY_COMMON_DEFINITIONS)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38021.117993.patch
Type: text/x-patch
Size: 672 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171006/599dce52/attachment.bin>
More information about the llvm-commits
mailing list