diff --git a/BaseTools/Source/C/GenFfs/GenFfs.c b/BaseTools/Source/C/GenFfs/GenFfs.c index d78d62ab36..4c2e93e6f4 100644 --- a/BaseTools/Source/C/GenFfs/GenFfs.c +++ b/BaseTools/Source/C/GenFfs/GenFfs.c @@ -7,7 +7,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __GNUC__ +#define RUNTIME_FUNCTION _WINNT_DUP_RUNTIME_FUNCTION #include +#undef RUNTIME_FUNCTION #include #include #include diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c b/BaseTools/Source/C/GenFw/Elf32Convert.c index de198e58db..246497a718 100644 --- a/BaseTools/Source/C/GenFw/Elf32Convert.c +++ b/BaseTools/Source/C/GenFw/Elf32Convert.c @@ -10,7 +10,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __GNUC__ +#define RUNTIME_FUNCTION _WINNT_DUP_RUNTIME_FUNCTION #include +#undef RUNTIME_FUNCTION #include #endif #include diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c b/BaseTools/Source/C/GenFw/Elf64Convert.c index 897045b2be..6919e18809 100644 --- a/BaseTools/Source/C/GenFw/Elf64Convert.c +++ b/BaseTools/Source/C/GenFw/Elf64Convert.c @@ -11,7 +11,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __GNUC__ +#define RUNTIME_FUNCTION _WINNT_DUP_RUNTIME_FUNCTION #include +#undef RUNTIME_FUNCTION #include #endif #include diff --git a/BaseTools/Source/C/GenFw/ElfConvert.c b/BaseTools/Source/C/GenFw/ElfConvert.c index 3205f61494..d6d9feb7d8 100644 --- a/BaseTools/Source/C/GenFw/ElfConvert.c +++ b/BaseTools/Source/C/GenFw/ElfConvert.c @@ -8,7 +8,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __GNUC__ +#define RUNTIME_FUNCTION _WINNT_DUP_RUNTIME_FUNCTION #include +#undef RUNTIME_FUNCTION #include #endif #include diff --git a/BaseTools/Source/C/GenFw/GenFw.c b/BaseTools/Source/C/GenFw/GenFw.c index bd635b375a..daf840c3cd 100644 --- a/BaseTools/Source/C/GenFw/GenFw.c +++ b/BaseTools/Source/C/GenFw/GenFw.c @@ -7,7 +7,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __GNUC__ +#define RUNTIME_FUNCTION _WINNT_DUP_RUNTIME_FUNCTION #include +#undef RUNTIME_FUNCTION #include #include #include diff --git a/BaseTools/Source/C/GenSec/GenSec.c b/BaseTools/Source/C/GenSec/GenSec.c index cf24d821aa..d9d2efeca7 100644 --- a/BaseTools/Source/C/GenSec/GenSec.c +++ b/BaseTools/Source/C/GenSec/GenSec.c @@ -6,7 +6,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __GNUC__ +#define RUNTIME_FUNCTION _WINNT_DUP_RUNTIME_FUNCTION #include +#undef RUNTIME_FUNCTION #include #include #include diff --git a/BaseTools/Source/C/Makefiles/ms.common b/BaseTools/Source/C/Makefiles/ms.common index fe7a59c280..66f0f5ba4c 100644 --- a/BaseTools/Source/C/Makefiles/ms.common +++ b/BaseTools/Source/C/Makefiles/ms.common @@ -51,6 +51,23 @@ BIN_PATH = $(BASE_TOOLS_PATH)\Bin\Win64 LIB_PATH = $(BASE_TOOLS_PATH)\Lib\Win64 SYS_BIN_PATH = $(EDK_TOOLS_PATH)\Bin\Win64 SYS_LIB_PATH = $(EDK_TOOLS_PATH)\Lib\Win64 +CFLAGS = $(CFLAGS) /wd4267 /wd4244 /wd4334 + +!ELSEIF "$(HOST_ARCH)"=="ARM" +ARCH_INCLUDE = $(EDK2_PATH)\MdePkg\Include\Arm +BIN_PATH = $(BASE_TOOLS_PATH)\Bin\Win32 +LIB_PATH = $(BASE_TOOLS_PATH)\Lib\Win32 +SYS_BIN_PATH = $(EDK_TOOLS_PATH)\Bin\Win32 +SYS_LIB_PATH = $(EDK_TOOLS_PATH)\Lib\Win32 + +!ELSEIF "$(HOST_ARCH)"=="AARCH64" +ARCH_INCLUDE = $(EDK2_PATH)\MdePkg\Include\AArch64 +BIN_PATH = $(BASE_TOOLS_PATH)\Bin\Win64 +LIB_PATH = $(BASE_TOOLS_PATH)\Lib\Win64 +SYS_BIN_PATH = $(EDK_TOOLS_PATH)\Bin\Win64 +SYS_LIB_PATH = $(EDK_TOOLS_PATH)\Lib\Win64 +# Note: These are bit-width conversion related warning suppressions. +CFLAGS = $(CFLAGS) /wd4267 /wd4244 /wd4334 !ELSE !ERROR "Bad HOST_ARCH"