Reactos

[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.

+15 -21
+1 -1
dll/win32/ucrtbase/CMakeLists.txt
··· 1 1 2 - spec2def(ucrtbase.dll ucrtbase.spec ADD_IMPORTLIB) 2 + spec2def(ucrtbase.dll ucrtbase.spec NO_DBG ADD_IMPORTLIB) 3 3 4 4 # Hack to replace the old CRT include directory with the UCRT include directory 5 5 get_property(INCLUDE_DIRS DIRECTORY . PROPERTY INCLUDE_DIRECTORIES)
+1 -5
sdk/lib/ucrt/CMakeLists.txt
··· 77 77 ) 78 78 endif() 79 79 80 - # Hack until we support globally defining _DEBUG 81 - if(DBG) 82 - add_compile_definitions(_DEBUG) 83 - endif() 84 - 85 80 include(conio/conio.cmake) 86 81 include(convert/convert.cmake) 87 82 include(dll/dll.cmake) ··· 103 98 include(string/string.cmake) 104 99 include(time/time.cmake) 105 100 101 + # TODO: build a _DEBUG version 106 102 add_library(ucrt OBJECT 107 103 ${UCRT_CONIO_SOURCES} 108 104 ${UCRT_CONVERT_SOURCES}
+5 -6
sdk/lib/ucrt/heap/heap.cmake
··· 20 20 heap/recalloc.cpp 21 21 ) 22 22 23 - if(DBG) 24 - list(APPEND UCRT_HEAP_SOURCES 25 - heap/debug_heap.cpp 26 - heap/debug_heap_hook.cpp 27 - ) 28 - endif() 23 + # Debug sources 24 + list(APPEND UCRTD_HEAP_SOURCES 25 + heap/debug_heap.cpp 26 + heap/debug_heap_hook.cpp 27 + )
+6 -7
sdk/lib/ucrt/misc/misc.cmake
··· 25 25 misc/_strerr.cpp 26 26 ) 27 27 28 - if(DBG) 29 - list(APPEND UCRT_MISC_SOURCES 30 - misc/dbgrpt.cpp 31 - misc/dbgrptt.cpp 32 - misc/debug_fill_threshold.cpp 33 - ) 34 - endif() 28 + # Debug sources 29 + list(APPEND UCRTD_MISC_SOURCES 30 + misc/dbgrpt.cpp 31 + misc/dbgrptt.cpp 32 + misc/debug_fill_threshold.cpp 33 + )
+2 -2
sdk/lib/ucrt/stdlib/stdlib.cmake
··· 24 24 ) 25 25 26 26 if(CMAKE_C_COMPILER_ID STREQUAL "Clang") 27 - add_asm_files(UCRT_STRING_ASM stdlib/clang-hacks.s) 27 + add_asm_files(UCRT_STDLIB_ASM stdlib/clang-hacks.s) 28 28 list(APPEND UCRT_STDLIB_SOURCES 29 - ${UCRT_STRING_ASM} 29 + ${UCRT_STDLIB_ASM} 30 30 ) 31 31 endif()