https://git.reactos.org/?p=reactos.git;a=commitdiff;h=78ded05547ca67fba1145…
commit 78ded05547ca67fba11450ef5361e6f19788a31e
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sun Nov 3 16:59:19 2024 +0200
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Tue Feb 4 16:45:48 2025 +0200
[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.
---
hal/halx86/minihal/CMakeLists.txt | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/hal/halx86/minihal/CMakeLists.txt b/hal/halx86/minihal/CMakeLists.txt
index d446bf3cc7b..4a7ca0f9d89 100644
--- a/hal/halx86/minihal/CMakeLists.txt
+++ b/hal/halx86/minihal/CMakeLists.txt
@@ -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)