* Use the runtime checks globally in ReactOS now, not just for user mode modules.
* We no longer need the MS support lib, as Timo kindly implemented one for ReactOS.
* Rename the lib to runtmchk.
[PSEH][CRT]
* Remove some constrictions to seh.s source files, we no longer need them.
[KERNEL32]
* We no longer need to explicitly link to the runtime checks lib.
[FREELDR][KEYBOARD][NTOS][SETUPLDR]
* Link to the runtime checks lib when this mode is enabled.
CORE-8626
svn path=/trunk/; revision=64807
if(STACK_PROTECTOR)
target_link_libraries(freeldr_pe gcc_ssp)
target_link_libraries(freeldr_pe_dbg gcc_ssp)
+elseif(RUNTIME_CHECKS)
+ target_link_libraries(freeldr_pe runtmchk)
+ target_link_libraries(freeldr_pe_dbg runtmchk)
endif()
add_dependencies(freeldr_pe asm)
if(STACK_PROTECTOR)
target_link_libraries(setupldr_pe gcc_ssp)
target_link_libraries(setupldr_pe_dbg gcc_ssp)
+elseif(RUNTIME_CHECKS)
+ target_link_libraries(setupldr_pe runtmchk)
+ target_link_libraries(setupldr_pe_dbg runtmchk)
endif()
add_dependencies(setupldr_pe asm)
if("${LIB}" MATCHES "msvcrt")
add_target_compile_definitions(${_module} _DLL __USE_CRTIMP)
target_link_libraries(${_module} msvcrtex)
- if(MSVC)
- if(RUNTIME_CHECKS)
- if(NOT ${_module} STREQUAL "kernel32")
- add_target_compile_flags(${_module} "/RTC1")
- target_link_libraries(${_module} RunTmChk.lib)
- endif()
- endif()
- endif()
endif()
target_link_libraries(${_module} lib${LIB})
add_dependencies(${_module} lib${LIB})
if(RUNTIME_CHECKS)
add_definitions(-D__RUNTIME_CHECKS__)
+ add_compile_flags("/RTC1")
endif()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO /INCREMENTAL:NO /SAFESEH:NO /NODEFAULTLIB /RELEASE")
elseif(${TYPE} STREQUAL "wdmdriver")
add_target_link_flags(${MODULE} "/DRIVER:WDM")
endif()
+
+ if(RUNTIME_CHECKS)
+ target_link_libraries(${MODULE} runtmchk)
+ endif()
+
endfunction()
# Define those for having real libraries
add_target_link_flags(${_keyboard_layout} "-Wl,-T,${CMAKE_SOURCE_DIR}/kbdlayout.lds")
endif()
+ if(RUNTIME_CHECKS)
+ target_link_libraries(${_keyboard_layout} runtmchk)
+ endif()
+
add_dependencies(${_keyboard_layout} psdk)
add_cd_file(TARGET ${_keyboard_layout} DESTINATION reactos/system32 FOR all)
endforeach()
################# END HACK #################
target_link_libraries(kernel32 wine chkstk ${PSEH_LIB})
-
-if(RUNTIME_CHECKS)
- target_link_libraries(kernel32 RunTmChk.lib)
-endif()
-
add_importlibs(kernel32 ntdll)
add_pch(kernel32 k32.h SOURCE)
add_dependencies(kernel32 psdk errcodes asm)
/* GLOBALS *******************************************************************/
-#ifndef __RUNTIME_CHECKS__
PUBLIC __global_unwind2
PUBLIC __local_unwind2
PUBLIC __abnormal_termination
-#endif
-
PUBLIC __except_handler2
PUBLIC __except_handler3
PUBLIC __global_unwind2
PUBLIC __local_unwind2
PUBLIC __abnormal_termination
-
-#if !defined(__RUNTIME_CHECKS__) || (defined(__RUNTIME_CHECKS__) && !defined(_LIBCNT_))
PUBLIC __except_handler2
PUBLIC __except_handler3
-#endif
/* FUNCTIONS *****************************************************************/
set(NTKRNLMP_ASM_SOURCE ${ASM_SOURCE})
spec2def(ntoskrnl.exe ntoskrnl.spec ADD_IMPORTLIB)
-
add_asm_files(ntoskrnl_asm ${NTOSKRNL_ASM_SOURCE})
add_executable(ntoskrnl
endif()
endif()
-target_link_libraries(ntoskrnl
- cportlib
- csq
- ${PSEH_LIB}
- cmlib
- rtl
- ${ROSSYM_LIB}
- libcntpr
- wdmguid
- ioevent)
+target_link_libraries(ntoskrnl cportlib csq ${PSEH_LIB} cmlib rtl ${ROSSYM_LIB} libcntpr wdmguid ioevent)
if(STACK_PROTECTOR)
target_link_libraries(ntoskrnl gcc_ssp)
+elseif(RUNTIME_CHECKS)
+ target_link_libraries(ntoskrnl runtmchk)
endif()
add_importlibs(ntoskrnl hal kdcom bootvid)
+
include(../ntos.cmake)
spec2def(ntkrnlmp.exe ../ntoskrnl.spec)
if(STACK_PROTECTOR)
target_link_libraries(ntkrnlmp gcc_ssp)
+elseif(RUNTIME_CHECKS)
+ target_link_libraries(ntkrnlmp runtmchk)
endif()
-target_link_libraries(ntkrnlmp
- cportlib
- csq
- ${PSEH_LIB}
- cmlib
- rtl
- ${ROSSYM_LIB}
- libcntpr
- wdmguid
- ioevent)
-
+target_link_libraries(ntkrnlmp cportlib csq ${PSEH_LIB} cmlib rtl ${ROSSYM_LIB} libcntpr wdmguid ioevent)
add_importlibs(ntkrnlmp hal kdcom bootvid)
add_pch(ntkrnlmp ${REACTOS_SOURCE_DIR}/ntoskrnl/include/ntoskrnl.h NTKRNLMP_SOURCE)
add_dependencies(ntkrnlmp psdk bugcodes asm)