CMakeLists.txt: Always use the "-Oz" optimization flag on emscripten since it uses clang
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
parent
7c179ea072
commit
97f87e6822
|
@ -89,7 +89,7 @@ if (${IS_GNU} OR ${IS_CLANG})
|
|||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ffunction-sections -fdata-sections -fmerge-all-constants -ftree-vectorize -fno-math-errno")
|
||||
include(CheckCXXCompilerFlag)
|
||||
check_cxx_compiler_flag("-Oz" Z_OPTIMIZATION_SUPPORTED)
|
||||
if (Z_OPTIMIZATION_SUPPORTED)
|
||||
if (Z_OPTIMIZATION_SUPPORTED OR EMSCRIPTEN)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Oz")
|
||||
endif()
|
||||
set(CF_PROTECTION "-fcf-protection")
|
||||
|
|
Loading…
Reference in New Issue