|
|
@@ -172,6 +172,7 @@ if(STATIC_LIBRARY)
|
|
|
endif()
|
|
|
|
|
|
if(CLR_CMAKE_PLATFORM_XPLAT)
|
|
|
+ add_definitions(-DFEATURE_PAL)
|
|
|
add_definitions(-DPLATFORM_UNIX=1)
|
|
|
|
|
|
if(CLR_CMAKE_PLATFORM_LINUX)
|
|
|
@@ -238,15 +239,13 @@ if(CLR_CMAKE_PLATFORM_XPLAT)
|
|
|
# -Wno-return-type # switch unreachable code
|
|
|
# -Wno-switch # switch values not handled
|
|
|
|
|
|
- # xplat-todo for release build
|
|
|
- # -fno-inline.... -> -mno-omit.... are needed for more accurate stack inf.
|
|
|
- # Release Builds: Not sure if this has to be as strict as the debug/test?
|
|
|
+ include(Build/CMakeFeatureDetect.cmake)
|
|
|
+
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
|
|
|
- -fdelayed-template-parsing\
|
|
|
- -fno-omit-frame-pointer\
|
|
|
- -fno-optimize-sibling-calls\
|
|
|
- -mno-omit-leaf-frame-pointer" # this is for compat reasons. i.e. It is a noop with gcc
|
|
|
- )
|
|
|
+ ${CXX_DO_NOT_OPTIMIZE_SIBLING_CALLS} \
|
|
|
+ -fno-omit-frame-pointer \
|
|
|
+ -fdelayed-template-parsing"
|
|
|
+ )
|
|
|
|
|
|
# CXX / CC COMPILER FLAGS
|
|
|
add_compile_options(
|
|
|
@@ -285,9 +284,7 @@ elseif(CMAKE_BUILD_TYPE STREQUAL Test)
|
|
|
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
|
|
|
|
|
|
if(NOT CMAKE_BUILD_TYPE STREQUAL Debug)
|
|
|
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
|
|
|
- -O3"
|
|
|
- )
|
|
|
+ add_compile_options(-O3)
|
|
|
endif(NOT CMAKE_BUILD_TYPE STREQUAL Debug)
|
|
|
|
|
|
if(IS_64BIT_BUILD)
|
|
|
@@ -297,10 +294,6 @@ if(IS_64BIT_BUILD)
|
|
|
)
|
|
|
endif(IS_64BIT_BUILD)
|
|
|
|
|
|
-if(CLR_CMAKE_PLATFORM_XPLAT)
|
|
|
- add_definitions(-DFEATURE_PAL)
|
|
|
-endif(CLR_CMAKE_PLATFORM_XPLAT)
|
|
|
-
|
|
|
if(NO_JIT_SH)
|
|
|
unset(NO_JIT_SH CACHE) # don't cache
|
|
|
unset(BuildJIT CACHE) # also clear it just in case
|