mirror of https://github.com/AxioDL/metaforce.git
MSVC: Use \Oy- to include frame pointer for RelWithDebInfo
This commit is contained in:
parent
b05460da42
commit
ee68e36286
|
@ -127,7 +127,7 @@ if(MSVC)
|
||||||
set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "/LTCG")
|
set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "/LTCG")
|
||||||
set(CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO "/LTCG")
|
set(CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO "/LTCG")
|
||||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/RELEASE /LTCG /OPT:REF /OPT:ICF /INCREMENTAL:NO")
|
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/RELEASE /LTCG /OPT:REF /OPT:ICF /INCREMENTAL:NO")
|
||||||
set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "/DEBUG /RELEASE /LTCG /OPT:REF /OPT:ICF /INCREMENTAL:NO /DEBUGTYPE:cv,fixup")
|
set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "/DEBUG /RELEASE /LTCG /OPT:REF /OPT:ICF /INCREMENTAL:NO /DEBUGTYPE:cv,fixup /Oy-")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
else()
|
else()
|
||||||
|
@ -161,7 +161,7 @@ else()
|
||||||
add_compile_options(-fno-plt)
|
add_compile_options(-fno-plt)
|
||||||
endif()
|
endif()
|
||||||
check_cxx_compiler_flag(-fno-asynchronous-unwind-tables HAS_NO_ASYNC_UNWIND_TABLES)
|
check_cxx_compiler_flag(-fno-asynchronous-unwind-tables HAS_NO_ASYNC_UNWIND_TABLES)
|
||||||
if (HAS_NO_ASYNC_UNWIND_TABLES)
|
if (HAS_NO_ASYNC_UNWIND_TABLES AND ${CMAKE_BUILD_TYPE} STREQUAL Release)
|
||||||
# Binary size reduction
|
# Binary size reduction
|
||||||
add_compile_options(-fno-asynchronous-unwind-tables)
|
add_compile_options(-fno-asynchronous-unwind-tables)
|
||||||
endif()
|
endif()
|
||||||
|
@ -197,9 +197,9 @@ endif()
|
||||||
|
|
||||||
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
|
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
|
||||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||||
if(${CMAKE_BUILD_TYPE} STREQUAL Debug)
|
if(${CMAKE_BUILD_TYPE} STREQUAL Debug OR ${CMAKE_BUILD_TYPE} STREQUAL RelWithDebInfo)
|
||||||
# This is required to summarize std::string
|
# This is required to summarize std::string
|
||||||
add_compile_options(-fno-limit-debug-info)
|
add_compile_options(-fno-limit-debug-info -fno-omit-frame-pointer)
|
||||||
endif()
|
endif()
|
||||||
option(USE_LD_LLD "Link with LLD" ON)
|
option(USE_LD_LLD "Link with LLD" ON)
|
||||||
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||||
|
|
Loading…
Reference in New Issue