Author: akhaldi
Date: Fri Oct 3 09:56:36 2014
New Revision: 64483
URL:
http://svn.reactos.org/svn/reactos?rev=64483&view=rev
Log:
[CMAKE]
* Introduce an option to compile ReactOS with dwarf symbols instead of rossym. Use
NO_ROSSYM to control it.
* Dedicated to V.
CORE-8594 #resolve
Modified:
trunk/reactos/cmake/gcc.cmake
Modified: trunk/reactos/cmake/gcc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/gcc.cmake?rev=64483&…
==============================================================================
--- trunk/reactos/cmake/gcc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/gcc.cmake [iso-8859-1] Fri Oct 3 09:56:36 2014
@@ -7,6 +7,11 @@
# PDB style debug info
if(NOT DEFINED SEPARATE_DBG)
set(SEPARATE_DBG FALSE)
+endif()
+
+# Dwarf based builds (no rsym)
+if(NOT DEFINED NO_ROSSYM)
+ set(NO_ROSSYM FALSE)
endif()
if(NOT DEFINED USE_PSEH3)
@@ -194,6 +199,14 @@
"<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS>
<LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET>
<OBJECTS> <LINK_LIBRARIES>"
"${OBJCOPY} --only-keep-debug <TARGET>
${REACTOS_BINARY_DIR}/symbols/${SYMBOL_FILE}"
"${OBJCOPY} --strip-debug <TARGET>")
+elseif(NO_ROSSYM)
+ # Dwarf-based build
+ message(STATUS "Generating a dwarf-based build (no rsym)")
+ 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>")
+ set(CMAKE_CXX_CREATE_SHARED_LIBRARY "<CMAKE_CXX_COMPILER>
${CMAKE_CXX_FLAGS} <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LINK_FLAGS>
<CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> -o <TARGET> <OBJECTS>
<LINK_LIBRARIES>")
+ set(CMAKE_RC_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>")
else()
# Normal rsym build
get_target_property(RSYM native-rsym IMPORTED_LOCATION_NOCONFIG)