https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4ad7b6d634bf2096eda1b…
commit 4ad7b6d634bf2096eda1b97b45e9c5b15bbe80c7
Author: Joachim Henze <Joachim.Henze(a)reactos.org>
AuthorDate: Thu Dec 17 13:31:43 2020 +0100
Commit: Joachim Henze <Joachim.Henze(a)reactos.org>
CommitDate: Thu Dec 17 13:31:43 2020 +0100
[APISETS][RDBSSLIB][RTL] Fix some build issues for MSVC Rls-config CORE-17402
A subset of the patch that is intended to fix all build issues in releases/0.4.14
for compiler MSVC 2010SP1 16.0.40219.1 with RosBE 2.1.6
I left out the changes for disk_new in master because the drivers sources
were replaced since the branching.
Thanks to Mark Jansen for providing the apisets part.
VBox
https://reactos.org/testman/compare.php?ids=75522,75524
KVM
https://reactos.org/testman/compare.php?ids=75521,75523
---
dll/apisets/CMakeLists.txt | 2 +-
dll/apisets/CMakeLists.txt.in | 2 +-
sdk/lib/drivers/rdbsslib/CMakeLists.txt | 5 +++++
sdk/lib/rtl/CMakeLists.txt | 8 +++++++-
4 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/dll/apisets/CMakeLists.txt b/dll/apisets/CMakeLists.txt
index a08f9f12d36..348cf2d4acb 100644
--- a/dll/apisets/CMakeLists.txt
+++ b/dll/apisets/CMakeLists.txt
@@ -27,7 +27,7 @@ function (add_apiset apiset_name baseaddress)
if(NOT MSVC)
target_compile_options(${apiset_name} PRIVATE -fno-builtin)
else()
- target_compile_options(${apiset_name} PRIVATE /wd4026 /wd4273)
+ target_compile_options(${apiset_name} PRIVATE /wd4026 /wd4273 /Oi-)
endif()
add_importlibs(${apiset_name} ${ARGN} ntdll)
diff --git a/dll/apisets/CMakeLists.txt.in b/dll/apisets/CMakeLists.txt.in
index 12ca868f641..3ec26d4928b 100644
--- a/dll/apisets/CMakeLists.txt.in
+++ b/dll/apisets/CMakeLists.txt.in
@@ -27,7 +27,7 @@ function (add_apiset apiset_name baseaddress)
if(NOT MSVC)
target_compile_options(${apiset_name} PRIVATE -fno-builtin)
else()
- target_compile_options(${apiset_name} PRIVATE /wd4026 /wd4273)
+ target_compile_options(${apiset_name} PRIVATE /wd4026 /wd4273 /Oi-)
endif()
add_importlibs(${apiset_name} ${ARGN} ntdll)
diff --git a/sdk/lib/drivers/rdbsslib/CMakeLists.txt
b/sdk/lib/drivers/rdbsslib/CMakeLists.txt
index 7b6ec545500..56ab772675d 100644
--- a/sdk/lib/drivers/rdbsslib/CMakeLists.txt
+++ b/sdk/lib/drivers/rdbsslib/CMakeLists.txt
@@ -3,6 +3,11 @@ add_definitions(-DUNICODE -D_UNICODE -DRDBSS_TRACKER)
include_directories(${REACTOS_SOURCE_DIR}/drivers/filesystems/mup
${REACTOS_SOURCE_DIR}/sdk/lib/drivers/copysup)
+if(MSVC)
+ # error C4101: 'BreakpointsSave' : unreferenced local variable in
Release-Configuration
+ replace_compile_flags("/we4101" " ")
+endif()
+
list(APPEND SOURCE
rdbss.c)
diff --git a/sdk/lib/rtl/CMakeLists.txt b/sdk/lib/rtl/CMakeLists.txt
index 65bf915b45d..eb76fc9b7a9 100644
--- a/sdk/lib/rtl/CMakeLists.txt
+++ b/sdk/lib/rtl/CMakeLists.txt
@@ -5,6 +5,11 @@ add_definitions(
-D_NTSYSTEM_
-D_NTDLLBUILD_)
+if(MSVC)
+ # error C4101: unreferenced local variable in Release-Configuration due to debug
logging
+ replace_compile_flags("/we4101" " ")
+endif()
+
list(APPEND SOURCE
access.c
acl.c
@@ -112,7 +117,8 @@ endif()
add_asm_files(rtl_asm ${ASM_SOURCE})
add_library(rtl ${SOURCE} ${rtl_asm})
-add_pch(rtl rtl.h SOURCE)
+#disable pch to prevent macro redefinition rtl.h WIN32_NO_STATUS
+#add_pch(rtl rtl.h SOURCE)
add_dependencies(rtl psdk asm)
list(APPEND SOURCE_VISTA