mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
BaseTools: Adding support of building BaseTool on Windows ARM/ARM64
This change focuses on the support of building basetool natively for Windows ARM/ARM64 host system, which will enable the ARM based platforms to build UEFI and unit tests. Note that the warnings due to integer conversions are suppressed for this specific target to avoid too much local changes carried in MU. The formal change should drop all these binaries and move to pythonic scripts. The binary output is tested on Windows ARM based hardware systems. Cc: Rebecca Cran <rebecca@bsdio.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Yuwei Chen <yuwei.chen@intel.com> Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This commit is contained in:
parent
79a64e73f7
commit
4b2f964749
7 changed files with 29 additions and 0 deletions
|
|
@ -7,7 +7,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||
**/
|
||||
|
||||
#ifndef __GNUC__
|
||||
#define RUNTIME_FUNCTION _WINNT_DUP_RUNTIME_FUNCTION
|
||||
#include <windows.h>
|
||||
#undef RUNTIME_FUNCTION
|
||||
#include <io.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||
**/
|
||||
|
||||
#ifndef __GNUC__
|
||||
#define RUNTIME_FUNCTION _WINNT_DUP_RUNTIME_FUNCTION
|
||||
#include <windows.h>
|
||||
#undef RUNTIME_FUNCTION
|
||||
#include <io.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||
**/
|
||||
|
||||
#ifndef __GNUC__
|
||||
#define RUNTIME_FUNCTION _WINNT_DUP_RUNTIME_FUNCTION
|
||||
#include <windows.h>
|
||||
#undef RUNTIME_FUNCTION
|
||||
#include <io.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||
**/
|
||||
|
||||
#ifndef __GNUC__
|
||||
#define RUNTIME_FUNCTION _WINNT_DUP_RUNTIME_FUNCTION
|
||||
#include <windows.h>
|
||||
#undef RUNTIME_FUNCTION
|
||||
#include <io.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||
**/
|
||||
|
||||
#ifndef __GNUC__
|
||||
#define RUNTIME_FUNCTION _WINNT_DUP_RUNTIME_FUNCTION
|
||||
#include <windows.h>
|
||||
#undef RUNTIME_FUNCTION
|
||||
#include <io.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||
|
||||
**/
|
||||
#ifndef __GNUC__
|
||||
#define RUNTIME_FUNCTION _WINNT_DUP_RUNTIME_FUNCTION
|
||||
#include <windows.h>
|
||||
#undef RUNTIME_FUNCTION
|
||||
#include <io.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue