summaryrefslogtreecommitdiff
path: root/lib/builtins/CMakeLists.txt
diff options
context:
space:
mode:
authorCatherine Moore <Catherine_moore@mentor.com>2017-05-10 15:34:25 +0000
committerCatherine Moore <Catherine_moore@mentor.com>2017-05-10 15:34:25 +0000
commit575a392a3cd8a1669f1665ba510c346507044061 (patch)
tree07f33269c154f8adedcd7a6007fc9c5a69b039a9 /lib/builtins/CMakeLists.txt
parent45eb470c3e9e8f6993a204e247c33d4092237efe (diff)
[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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@302680 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/builtins/CMakeLists.txt')
-rw-r--r--lib/builtins/CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt
index e3779ca79..946b912ae 100644
--- a/lib/builtins/CMakeLists.txt
+++ b/lib/builtins/CMakeLists.txt
@@ -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_BUILTIN
"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}