Compare commits

...

1 Commits

Author SHA1 Message Date
Joachim Henze
d5298b44e6 [CMAKE] Do not use the dwarf baseaddress file for GCC Release builds
This is a late addendum to SVN r68147 == git 74c80a51dd

Back then we set NO_ROSSYM to TRUE for the release builds to reduce their binary size,
but that did lead us to unintentionally always use the baseaddress_dwarf.cmake file for
our release builds, which is not optimal. Neither from the perspective of
efficiency (the base addresses are too sparse for them, since dwarf generates much bigger binaries)
nor from a testing perspective: We want the base addresses used for our releases to be tested frequently
and not only very rarely. So it is good to use then what is frequently tested. And that are the
addresses from the debgu build.
2023-01-04 06:04:51 +01:00
2 changed files with 7 additions and 3 deletions

View File

@@ -335,7 +335,7 @@ Enable this if the module uses typeid or dynamic_cast. You will probably need to
add_subdirectory(sdk/include/reactos/mc)
add_subdirectory(sdk/include/asm)
if(NO_ROSSYM)
if(DEFINED NO_ROSSYM AND NOT CMAKE_BUILD_TYPE STREQUAL "Release")
include(sdk/cmake/baseaddress_dwarf.cmake)
elseif(MSVC)
if (ARCH STREQUAL "amd64")

View File

@@ -220,8 +220,12 @@ if(SEPARATE_DBG)
"${CMAKE_STRIP} --only-keep-debug <TARGET> -o ${REACTOS_BINARY_DIR}/symbols/${SYMBOL_FILE}"
${strip_debug})
elseif(NO_ROSSYM)
# Dwarf-based build
message(STATUS "Generating a dwarf-based build (no rsym)")
# Either a GCC Dwarf-based build, or a GCC build in release config
if(CMAKE_BUILD_TYPE STREQUAL "Release")
message(STATUS "Generating a Release build (no rsym)")
else()
message(STATUS "Generating a dwarf-based build (no rsym)")
endif()
set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> ${CMAKE_C_FLAGS} <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_CXX_COMPILER> ${CMAKE_CXX_FLAGS} <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
set(CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> ${CMAKE_C_FLAGS} <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")