[PATCH] D38021: [Compiler-rt][MIPS] Fix cross build for XRAY

Dean Michael Berris via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 16 12:59:27 PDT 2017


dberris accepted this revision.
dberris added a comment.

For XRay, I think this is fine. Although I suspect it would be better to do this in the definition of `add_compiler_rt_runtime` and other `add_compiler_rt_*` functions instead.

I'll leave it up to you to decide whether you want to change the definitions of the helpers.



================
Comment at: lib/xray/CMakeLists.txt:64-67
+if (NOT MSVC AND DEFINED CMAKE_CXX_FLAGS)
+  set(TARGET_FLAGS ${CMAKE_CXX_FLAGS})
+  separate_arguments(TARGET_FLAGS)
+endif()
----------------
I think you should just be able to check whether `TARGET_FLAGS` is defined, regardless of whether `CMAKE_CXX_FLAGS` is defined or not.


https://reviews.llvm.org/D38021





More information about the llvm-commits mailing list