Skip to content

Commit 995d8c0

Browse files
committed
[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.
1 parent c11df0f commit 995d8c0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

hal/halx86/minihal/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11

2+
# We need to define this here, because the target definitions are not
3+
# passed to CL, when preprocessing the asm files on MSVC builds.
4+
# See CORE-19847
5+
add_definitions(-D_MINIHAL_)
6+
27
list(APPEND MINI_HAL_SOURCE
38
../generic/portio.c
49
../legacy/bus/bushndlr.c
@@ -39,6 +44,6 @@ endif()
3944

4045
add_asm_files(mini_hal_asm ../generic/systimer.S)
4146
add_library(mini_hal ${MINI_HAL_SOURCE} ${mini_hal_asm})
42-
target_compile_definitions(mini_hal PRIVATE _MINIHAL_ _BLDR_ _NTSYSTEM_)
47+
target_compile_definitions(mini_hal PRIVATE _BLDR_ _NTSYSTEM_)
4348
add_dependencies(mini_hal psdk bugcodes asm)
4449
add_pch(mini_hal ../include/hal.h MINI_HAL_SOURCE)

0 commit comments

Comments
 (0)