File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -308,6 +308,13 @@ if (CLR_CMAKE_PLATFORM_UNIX)
308308 #-fms-compatibility Enable full Microsoft Visual C++ compatibility
309309 #-fms-extensions Accept some non-standard constructs supported by the Microsoft compiler
310310
311+ if (CLR_CMAKE_PLATFORM_DARWIN)
312+ # We cannot enable "stack-protector-strong" on OS X due to a bug in clang compiler (current version 7.0.2)
313+ add_compile_options (-fstack-protector)
314+ else ()
315+ add_compile_options (-fstack-protector-strong)
316+ endif (CLR_CMAKE_PLATFORM_DARWIN)
317+
311318 # set the CLANG sanitizer flags for debug build
312319 if (UPPERCASE_CMAKE_BUILD_TYPE STREQUAL DEBUG OR UPPERCASE_CMAKE_BUILD_TYPE STREQUAL CHECKED)
313320 # obtain settings from running enablesanitizers.sh
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ include_directories(${COREPAL_SOURCE_DIR}/../inc)
88
99add_compile_options (-gdwarf-3)
1010add_compile_options (-fexceptions)
11- add_compile_options (-fstack-protector-all )
1211
1312add_subdirectory (src)
1413add_subdirectory (tests)
You can’t perform that action at this time.
0 commit comments