summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergiy Kuryata <sergeyk@microsoft.com>2016-01-13 17:27:24 -0800
committerSergiy Kuryata <sergeyk@microsoft.com>2016-01-13 17:27:24 -0800
commit3017009f03fc7371ad2053c50d3a9aa2e43591e5 (patch)
tree3566d18128c4c4e054fe03fe8684dbc35fc6a174
parentf7fc6da5a811743c38f45497cc4c22084c46cd94 (diff)
downloadcoreclr-3017009f03fc7371ad2053c50d3a9aa2e43591e5.tar.gz
coreclr-3017009f03fc7371ad2053c50d3a9aa2e43591e5.tar.bz2
coreclr-3017009f03fc7371ad2053c50d3a9aa2e43591e5.zip
Use "-fstack-protector" instead of "-fstack-protector-strong" on OS X in order to work around a bug in clang (current version 7.0.2).
-rw-r--r--CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 35a9416ffd..c7b53ef911 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -308,7 +308,12 @@ if (CLR_CMAKE_PLATFORM_UNIX)
#-fms-compatibility Enable full Microsoft Visual C++ compatibility
#-fms-extensions Accept some non-standard constructs supported by the Microsoft compiler
- add_compile_options(-fstack-protector-strong)
+ if(CLR_CMAKE_PLATFORM_DARWIN)
+ # We cannot enable "stack-protector-strong" on OS X due to a bug in clang compiler (current version 7.0.2)
+ add_compile_options(-fstack-protector)
+ else()
+ add_compile_options(-fstack-protector-strong)
+ endif(CLR_CMAKE_PLATFORM_DARWIN)
# set the CLANG sanitizer flags for debug build
if(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL DEBUG OR UPPERCASE_CMAKE_BUILD_TYPE STREQUAL CHECKED)