summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith-Denny <osde@microsoft.com>2025-01-07 10:10:12 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2025-01-22 19:47:20 +0000
commit4613eb6abc22923a683f3f090601896eee4c4179 (patch)
tree1a7a07deb73854d3a2d8047c04b18c9ef7989e8f
parent81ba76f7df45b7bb18edae55375ea3b6abde4351 (diff)
downloadedk2-4613eb6abc22923a683f3f090601896eee4c4179.tar.gz
EmulatorPkg: Fix IA32 MSVC Linker Warnings
IA32 EmulatorPkg had many linker warnings because with the current set of linker flags, the MSVC linker was expecting the __stdcall calling convention on all entry points. This was an effect of having /SUBSYSTEM:CONSOLE on all binaries built in EmulatorPkg; this is only needed on WinHost, as that is what Windows launches. The linker options are adjusted to only set /SUBSYSTEM:CONSOLE on WinHost. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
-rw-r--r--EmulatorPkg/EmulatorPkg.dsc12
-rw-r--r--EmulatorPkg/Win/Host/WinHost.inf2
2 files changed, 7 insertions, 7 deletions
diff --git a/EmulatorPkg/EmulatorPkg.dsc b/EmulatorPkg/EmulatorPkg.dsc
index d9aac2b43a..a4989c1239 100644
--- a/EmulatorPkg/EmulatorPkg.dsc
+++ b/EmulatorPkg/EmulatorPkg.dsc
@@ -537,15 +537,15 @@
MSFT:NOOPT_*_*_CC_FLAGS = /Od /Oy-
GCC:DEBUG_CLANGPDB_*_CC_FLAGS =-O0 -Wno-unused-command-line-argument -Wno-incompatible-pointer-types -Wno-enum-conversion -Wno-incompatible-pointer-types -Wno-sometimes-uninitialized -Wno-constant-conversion -Wno-main-return-type
- MSFT:*_*_*_DLINK_FLAGS = /ALIGN:4096 /FILEALIGN:4096 /SUBSYSTEM:CONSOLE
- MSFT:DEBUG_*_*_DLINK_FLAGS = /EXPORT:InitializeDriver=$(IMAGE_ENTRY_POINT) /BASE:0x10000
- MSFT:NOOPT_*_*_DLINK_FLAGS = /EXPORT:InitializeDriver=$(IMAGE_ENTRY_POINT) /BASE:0x10000
+ MSFT:*_*_*_DLINK_FLAGS = /ALIGN:4096 /FILEALIGN:4096
+ MSFT:DEBUG_*_*_DLINK_FLAGS = /BASE:0x10000
+ MSFT:NOOPT_*_*_DLINK_FLAGS = /BASE:0x10000
!if $(WIN_HOST_BUILD) == TRUE
#
# CLANGPDB tool chain depends on WIN_HOST_BUILD flag to generate the windows application.
#
- GCC:*_CLANGPDB_*_DLINK_FLAGS = /ALIGN:4096 /FILEALIGN:4096 /SUBSYSTEM:CONSOLE
- GCC:DEBUG_CLANGPDB_*_DLINK_FLAGS = /EXPORT:InitializeDriver=$(IMAGE_ENTRY_POINT) /BASE:0x10000
- GCC:NOOPT_CLANGPDB_*_DLINK_FLAGS = /EXPORT:InitializeDriver=$(IMAGE_ENTRY_POINT) /BASE:0x10000
+ GCC:*_CLANGPDB_*_DLINK_FLAGS = /ALIGN:4096 /FILEALIGN:4096
+ GCC:DEBUG_CLANGPDB_*_DLINK_FLAGS = /BASE:0x10000
+ GCC:NOOPT_CLANGPDB_*_DLINK_FLAGS = /BASE:0x10000
!endif
diff --git a/EmulatorPkg/Win/Host/WinHost.inf b/EmulatorPkg/Win/Host/WinHost.inf
index 6bb3d9696c..9b3cefcabb 100644
--- a/EmulatorPkg/Win/Host/WinHost.inf
+++ b/EmulatorPkg/Win/Host/WinHost.inf
@@ -86,7 +86,7 @@
gEmulatorPkgTokenSpaceGuid.PcdEmuNetworkInterface|L"0"
[BuildOptions]
- MSFT:*_*_*_DLINK_FLAGS == /out:"$(BIN_DIR)\$(BASE_NAME).exe" /base:0x10000000 /pdb:"$(BIN_DIR)\$(BASE_NAME).pdb"
+ MSFT:*_*_*_DLINK_FLAGS == /out:"$(BIN_DIR)\$(BASE_NAME).exe" /base:0x10000000 /pdb:"$(BIN_DIR)\$(BASE_NAME).pdb" /EXPORT:InitializeDriver=$(IMAGE_ENTRY_POINT)
MSFT:*_*_*_CC_FLAGS = /nologo /W4 /WX /Gy /c /D UNICODE /Od /Oy- /FIAutoGen.h /EHs-c- /GF /D _CRT_SECURE_NO_WARNINGS /D _CRT_SECURE_NO_DEPRECATE
MSFT:*_*_*_PP_FLAGS == /nologo /E /TC /FIAutoGen.h