[NTOSKRNL] Link memcmp to the import lib when using CLang

CLang performs some optimisations on e.g. strcmp, but memcmp is not exported by ntoskrnl
This commit is contained in:
Jérôme Gardou 2020-11-09 09:41:48 +01:00 committed by Jérôme Gardou
parent 378642eb4f
commit e00922a0fe

View file

@ -12,6 +12,11 @@ set(NTKRNLMP_ASM_SOURCE ${ASM_SOURCE})
spec2def(ntoskrnl.exe ntoskrnl.spec ADD_IMPORTLIB)
add_asm_files(ntoskrnl_asm ${NTOSKRNL_ASM_SOURCE})
if (GCC AND CLANG)
# Clang optimises strcmp calls to memcmp.
target_link_libraries(libntoskrnl INTERFACE memcmp)
endif()
list(APPEND PCH_SKIP_SOURCE
guid.c)