[CMAKE] Do not disable optimisations on ntoskrnl build
authorJérôme Gardou <jerome.gardou@reactos.org>
Fri, 6 Aug 2021 07:51:57 +0000 (09:51 +0200)
committerJérôme Gardou <jerome.gardou@reactos.org>
Fri, 6 Aug 2021 13:17:49 +0000 (15:17 +0200)
ntoskrnl/CMakeLists.txt

index a359482..b0cf73e 100644 (file)
@@ -46,13 +46,6 @@ set_module_type(ntoskrnl kernel)
 
 source_group(TREE ${REACTOS_SOURCE_DIR}/ntoskrnl PREFIX "Source Files" FILES ${NTOSKRNL_SOURCE})
 
-if(GDB AND NOT CLANG)
-    # Completely disable optimizations when debugging the kernel
-    # Not for CLang, which fails as following in _SEH2_EXCEPT macro:
-    # error: inline assembly requires more registers than available
-    target_compile_options(ntoskrnl PRIVATE -O0)
-endif()
-
 target_link_libraries(ntoskrnl cportlib csq ${PSEH_LIB} arbiter cmlib ntlsalib rtl ${ROSSYM_LIB} libcntpr wdmguid ioevent)
 
 if(STACK_PROTECTOR)