[MINIHAL] Move the definition of _MINIHAL_ to directory scope

This is required, so that the definition is available when preprocessing asm files on MSVC builds. Otherwise systimer.s will contain KeStallExecutionProcessor, which must not be used in freeldr.
This commit is contained in:
Timo Kreuzer 2024-11-03 16:59:19 +02:00
parent 3d516e71d3
commit 78ded05547

View file

@ -1,4 +1,9 @@
# We need to define this here, because the target definitions are not
# passed to CL, when preprocessing the asm files on MSVC builds.
# See CORE-19847
add_definitions(-D_MINIHAL_)
list(APPEND MINI_HAL_SOURCE
../generic/portio.c
../legacy/bus/bushndlr.c
@ -39,6 +44,6 @@ endif()
add_asm_files(mini_hal_asm ../generic/systimer.S)
add_library(mini_hal ${MINI_HAL_SOURCE} ${mini_hal_asm})
target_compile_definitions(mini_hal PRIVATE _MINIHAL_ _BLDR_ _NTSYSTEM_)
target_compile_definitions(mini_hal PRIVATE _BLDR_ _NTSYSTEM_)
add_dependencies(mini_hal psdk bugcodes asm)
add_pch(mini_hal ../include/hal.h MINI_HAL_SOURCE)