[PATCH] D66648: [compiler-rt] Respect CMAKE_C_FLAGS when building builtins in-tree
Sergej Jaskiewicz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 23 05:58:20 PDT 2019
broadwaylamb created this revision.
broadwaylamb added reviewers: compnerd, chandlerc.
broadwaylamb added a project: LLVM.
Herald added subscribers: Sanitizers, mgorny, dberris.
Herald added a project: Sanitizers.
This allows to provide flags in the top-level CMake invocation for specifying e. g. a target processor to build builtins for, like this:
cmake -DBUILTINS_CMAKE_ARGS="-DCMAKE_C_FLAGS=-mcpu=cortex-a15" ../llvm
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D66648
Files:
compiler-rt/lib/builtins/CMakeLists.txt
Index: compiler-rt/lib/builtins/CMakeLists.txt
===================================================================
--- compiler-rt/lib/builtins/CMakeLists.txt
+++ compiler-rt/lib/builtins/CMakeLists.txt
@@ -558,7 +558,7 @@
add_subdirectory(macho_embedded)
darwin_add_builtin_libraries(${BUILTIN_SUPPORTED_OS})
else ()
- set(BUILTIN_CFLAGS "")
+ set(BUILTIN_CFLAGS ${CMAKE_C_FLAGS})
append_list_if(COMPILER_RT_HAS_STD_C11_FLAG -std=c11 BUILTIN_CFLAGS)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66648.216818.patch
Type: text/x-patch
Size: 467 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190823/068ef563/attachment.bin>
More information about the llvm-commits
mailing list