[compiler-rt] r302680 - [cmake] Disable building enable_execute_stack.c for baremetal targets.
Catherine Moore via llvm-commits
llvm-commits at lists.llvm.org
Wed May 10 08:34:25 PDT 2017
Author: clm
Date: Wed May 10 10:34:25 2017
New Revision: 302680
URL: http://llvm.org/viewvc/llvm-project?rev=302680&view=rev
Log:
[cmake] Disable building enable_execute_stack.c for baremetal targets.
Disable building enable_execute_stack.c for targets that do not have
support for mprotect().
Differential Revision: https://reviews.llvm.org/D33018
Modified:
compiler-rt/trunk/CMakeLists.txt
compiler-rt/trunk/lib/builtins/CMakeLists.txt
Modified: compiler-rt/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=302680&r1=302679&r2=302680&view=diff
==============================================================================
--- compiler-rt/trunk/CMakeLists.txt (original)
+++ compiler-rt/trunk/CMakeLists.txt Wed May 10 10:34:25 2017
@@ -31,6 +31,9 @@ mark_as_advanced(COMPILER_RT_BUILD_SANIT
option(COMPILER_RT_BUILD_XRAY "Build xray" ON)
mark_as_advanced(COMPILER_RT_BUILD_XRAY)
+set(COMPILER_RT_BAREMETAL_BUILD OFF CACHE BOOLEAN
+ "Build for a bare-metal target.")
+
if (COMPILER_RT_STANDALONE_BUILD)
load_llvm_config()
Modified: compiler-rt/trunk/lib/builtins/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/CMakeLists.txt?rev=302680&r1=302679&r2=302680&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/builtins/CMakeLists.txt Wed May 10 10:34:25 2017
@@ -66,7 +66,6 @@ set(GENERIC_SOURCES
divti3.c
divtf3.c
divxc3.c
- enable_execute_stack.c
eprintf.c
extendsfdf2.c
extendhfsf2.c
@@ -191,6 +190,12 @@ option(COMPILER_RT_EXCLUDE_ATOMIC_BUILTI
"Skip the atomic builtin (this may be needed if system headers are unavailable)"
Off)
+if(NOT COMPILER_RT_BAREMETAL_BUILD)
+ set(GENERIC_SOURCES
+ ${GENERIC_SOURCES}
+ enable_execute_stack.c)
+endif()
+
if(COMPILER_RT_HAS_ATOMIC_KEYWORD AND NOT COMPILER_RT_EXCLUDE_ATOMIC_BUILTIN)
set(GENERIC_SOURCES
${GENERIC_SOURCES}
More information about the llvm-commits
mailing list