some flag play 🚬
This commit is contained in:
parent
1818532ec9
commit
8a58336d16
@ -159,8 +159,6 @@ function(give_options_without_warnings target)
|
||||
-O3
|
||||
-flto=$<IF:$<STREQUAL:${CMAKE_C_COMPILER_ID},Clang>,thin,auto>
|
||||
-mavx -mavx2
|
||||
-fdata-sections
|
||||
-ffunction-sections
|
||||
-funroll-loops
|
||||
-fomit-frame-pointer
|
||||
$<$<STREQUAL:${CMAKE_C_COMPILER_ID},Gnu>:-s>)
|
||||
@ -173,6 +171,10 @@ function(give_options_without_warnings target)
|
||||
$<$<BOOL:${TWN_SANITIZE}>:-fstack-protector-all -fsanitize=undefined -fsanitize=address>
|
||||
$<$<BOOL:${EMSCRIPTEN}>:-gsource-map>)
|
||||
|
||||
set(LINK_FLAGS_RELEASE
|
||||
$<$<STREQUAL:${CMAKE_C_COMPILER_ID},Clang>:-Wl,--strip-all>
|
||||
${BUILD_FLAGS_RELEASE})
|
||||
|
||||
if (CMAKE_C_COMPILER_LINKER_ID MATCHES GNU OR CMAKE_C_COMPILER_LINKER_ID MATCHES GNUgold)
|
||||
set(THINLTO_USAGE "-plugin-opt,")
|
||||
endif()
|
||||
@ -194,7 +196,7 @@ function(give_options_without_warnings target)
|
||||
target_link_options(${target} PUBLIC
|
||||
${BUILD_FLAGS}
|
||||
# -Wl,--no-undefined # TODO: use later for implementing no-libc
|
||||
$<$<CONFIG:Release>:${BUILD_FLAGS_RELEASE}>
|
||||
$<$<CONFIG:Release>:${LINK_FLAGS_RELEASE}>
|
||||
$<$<CONFIG:Debug>:${BUILD_FLAGS_DEBUG}>
|
||||
-Bsymbolic-functions
|
||||
-Wl,--as-needed
|
||||
@ -207,6 +209,9 @@ function(give_options_without_warnings target)
|
||||
|
||||
target_link_options(${target} PUBLIC
|
||||
$<$<CONFIG:Release>:${BUILD_SHARED_LIBRARY_FLAGS_RELEASE}>)
|
||||
elseif(CMAKE_BUILD_TYPE MATCHES Release)
|
||||
target_compile_options(${target} PUBLIC
|
||||
$<$<STREQUAL:${CMAKE_C_COMPILER_ID},Clang>:-mllvm=--enable-gvn-hoist>)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(${target} PRIVATE
|
||||
|
Loading…
Reference in New Issue
Block a user