mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 13:05:44 +00:00
[UCRTBASE] Build without debug exports
Windows ships ucrtbase without debug exports and ucrtbased with debug exports. The wine test tests ucrtbase and loads it dynamically in some cases. Compiling it with _DEBUG requires it to be linked to ucrtbased, which causes problems, because it also dynamically loads ucrtbase, which will cause it to crash.
This commit is contained in:
parent
6a4dbedd1e
commit
5b633d64f1
5 changed files with 15 additions and 21 deletions
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
spec2def(ucrtbase.dll ucrtbase.spec ADD_IMPORTLIB)
|
spec2def(ucrtbase.dll ucrtbase.spec NO_DBG ADD_IMPORTLIB)
|
||||||
|
|
||||||
# Hack to replace the old CRT include directory with the UCRT include directory
|
# Hack to replace the old CRT include directory with the UCRT include directory
|
||||||
get_property(INCLUDE_DIRS DIRECTORY . PROPERTY INCLUDE_DIRECTORIES)
|
get_property(INCLUDE_DIRS DIRECTORY . PROPERTY INCLUDE_DIRECTORIES)
|
||||||
|
|
|
@ -77,11 +77,6 @@ if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Hack until we support globally defining _DEBUG
|
|
||||||
if(DBG)
|
|
||||||
add_compile_definitions(_DEBUG)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(conio/conio.cmake)
|
include(conio/conio.cmake)
|
||||||
include(convert/convert.cmake)
|
include(convert/convert.cmake)
|
||||||
include(dll/dll.cmake)
|
include(dll/dll.cmake)
|
||||||
|
@ -103,6 +98,7 @@ include(stdlib/stdlib.cmake)
|
||||||
include(string/string.cmake)
|
include(string/string.cmake)
|
||||||
include(time/time.cmake)
|
include(time/time.cmake)
|
||||||
|
|
||||||
|
# TODO: build a _DEBUG version
|
||||||
add_library(ucrt OBJECT
|
add_library(ucrt OBJECT
|
||||||
${UCRT_CONIO_SOURCES}
|
${UCRT_CONIO_SOURCES}
|
||||||
${UCRT_CONVERT_SOURCES}
|
${UCRT_CONVERT_SOURCES}
|
||||||
|
|
|
@ -20,9 +20,8 @@ list(APPEND UCRT_HEAP_SOURCES
|
||||||
heap/recalloc.cpp
|
heap/recalloc.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
if(DBG)
|
# Debug sources
|
||||||
list(APPEND UCRT_HEAP_SOURCES
|
list(APPEND UCRTD_HEAP_SOURCES
|
||||||
heap/debug_heap.cpp
|
heap/debug_heap.cpp
|
||||||
heap/debug_heap_hook.cpp
|
heap/debug_heap_hook.cpp
|
||||||
)
|
)
|
||||||
endif()
|
|
||||||
|
|
|
@ -25,10 +25,9 @@ list(APPEND UCRT_MISC_SOURCES
|
||||||
misc/_strerr.cpp
|
misc/_strerr.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
if(DBG)
|
# Debug sources
|
||||||
list(APPEND UCRT_MISC_SOURCES
|
list(APPEND UCRTD_MISC_SOURCES
|
||||||
misc/dbgrpt.cpp
|
misc/dbgrpt.cpp
|
||||||
misc/dbgrptt.cpp
|
misc/dbgrptt.cpp
|
||||||
misc/debug_fill_threshold.cpp
|
misc/debug_fill_threshold.cpp
|
||||||
)
|
)
|
||||||
endif()
|
|
||||||
|
|
|
@ -24,8 +24,8 @@ list(APPEND UCRT_STDLIB_SOURCES
|
||||||
)
|
)
|
||||||
|
|
||||||
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||||
add_asm_files(UCRT_STRING_ASM stdlib/clang-hacks.s)
|
add_asm_files(UCRT_STDLIB_ASM stdlib/clang-hacks.s)
|
||||||
list(APPEND UCRT_STDLIB_SOURCES
|
list(APPEND UCRT_STDLIB_SOURCES
|
||||||
${UCRT_STRING_ASM}
|
${UCRT_STDLIB_ASM}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue