From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web10.265.1571408868762418882 for ; Fri, 18 Oct 2019 07:27:49 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: liming.gao@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Oct 2019 07:27:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,312,1566889200"; d="scan'208,217";a="396640518" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga005.fm.intel.com with ESMTP; 18 Oct 2019 07:27:47 -0700 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 18 Oct 2019 07:27:47 -0700 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 18 Oct 2019 07:27:46 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.166]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.225]) with mapi id 14.03.0439.000; Fri, 18 Oct 2019 22:27:45 +0800 From: "Liming Gao" To: "afish@apple.com" , "Ni, Ray" CC: "devel@edk2.groups.io" , "Justen, Jordan L" Subject: Re: [Patch v3 10/11] EmulatorPkg: Enable CLANG9 tool chain Thread-Topic: [Patch v3 10/11] EmulatorPkg: Enable CLANG9 tool chain Thread-Index: AQHVhLgBxwyRGl2zS0uGy+G7za0y3adeboSwgAAe4oCAAd+i8A== Date: Fri, 18 Oct 2019 14:27:44 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E51EC84@SHSMSX104.ccr.corp.intel.com> References: <1571295356-11608-1-git-send-email-liming.gao@intel.com> <1571295356-11608-11-git-send-email-liming.gao@intel.com> <734D49CCEBEEF84792F5B80ED585239D5C325BB0@SHSMSX104.ccr.corp.intel.com> <34BE6669-004C-48AD-A09D-FE1A8475ABE0@apple.com> In-Reply-To: <34BE6669-004C-48AD-A09D-FE1A8475ABE0@apple.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjBhZGVmYWYtYmYyYi00MjZlLWFkMzItYmFmOTVjOTU2ZmFmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiZlBRSTJaR25XeVN5SjhCdmdBNXBOM005akpraE5lb2xTN1I3TUlDbGRYYmpOTjNVN3BpYzUwaWI0Qk9jazNiQSJ9 dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: liming.gao@intel.com Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_4A89E2EF3DFEDB4C8BFDE51014F606A14E51EC84SHSMSX104ccrcor_" --_000_4A89E2EF3DFEDB4C8BFDE51014F606A14E51EC84SHSMSX104ccrcor_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Andrew: Here is the cover letter on CLANG9 introduction. https://edk2.groups.io/g/= devel/message/49157 1) Yes. CLANG9 tool chain is added to directly generate PE/COFF image = (EFI image). This tool chain uses LLVM clang C compiler and lld linker, generates PE/COF= F image and PDB compatible debug symbol format. Now, it supports IA32/X64 Arc= hs. LLVM clang C compiler and lld linker are the standalone tool set. They don'= t depend other lib to generate PE/COFF image. 2) Yes. CLANG9 is the cross OS tool chain. It can work on Windows/Linu= x/Mac host OS. LLVM LLD linker uses Windows style arguments. I verify CLANG9 for Ovmf3264 = in Windows/Linux host OS. 3) This patch enables WinHost in Windows. It doesn't enable UnixHost. N= ow, EmulatorPkg with CLANG9 only works on Windows Host. This patch can make other modules pass build in Windows/Linux/Mac only if L= LVM9 tool set is installed. But, the generated image may not work on Linux/Mac. I agree below linker fl= ags are specific to windows host. So, I suggest to add the conditional statement of $(WIN_HOST_BUILD) =3D=3D = TRUE for them. !if $(WIN_HOST_BUILD) =3D=3D TRUE GCC:*_CLANG9_*_DLINK_FLAGS =3D /ALIGN:4096 /FILEALIGN:4096 /SUBSYSTEM= :CONSOLE GCC:DEBUG_CLANG9_*_DLINK_FLAGS =3D /EXPORT:InitializeDriver=3D$(IMAGE_ENT= RY_POINT) /BASE:0x10000 GCC:NOOPT_CLANG9_*_DLINK_FLAGS =3D /EXPORT:InitializeDriver=3D$(IMAGE_ENT= RY_POINT) /BASE:0x10000 !endif Thanks Liming From: afish@apple.com Sent: Friday, October 18, 2019 1:15 AM To: Ni, Ray Cc: Gao, Liming ; devel@edk2.groups.io; Justen, Jorda= n L Subject: Re: [Patch v3 10/11] EmulatorPkg: Enable CLANG9 tool chain Ray, Sorry I'm coming a little late to this and I'm confused. I have some questi= ons? 1) Does CLANG9 imply CLANGPE? 2) Does CLANGPE work on Linux and macOS? Can you pass the Windows style arg= uments to CLANGPE linker on Linux and macOS? 3) For the EmulatorPkg don't you have the extra requirement that compiler n= eeds a standard C lib (or platform specific libs) to function? a) GCC:*_CLANG9_*_DLINK_FLAGS in EmulatorPkg.dsc seems to imply the = Linux and macOS systems will have a Windows SKD dir and a lot of Windows DL= Ls? Does all that come when you install CLANG9 when you install it on Linux= or macOS? So I guess I'm asking is the linker really the same for CLANG9 on all syste= ms? I guess the answer could be yes, but it seems the C lib for the Host Ap= p is still an App for that OS and is OS dependent? Sorry if I'm missing something fundamental and this is a dumb question. Thanks, Andrew Fish On Oct 17, 2019, at 12:27 AM, Ni, Ray > wrote: Liming, Emulator is using a generic SEC module. The host specific module is called = "Host". So I prefer to change the macro to "WIN_HOST_BUILD", with this change, Revi= ewed-by: Ray Ni > -----Original Message----- From: Gao, Liming > Sent: Thursday, October 17, 2019 2:56 PM To: devel@edk2.groups.io Cc: Justen, Jordan L >; Andrew Fish >; Ni, Ray > Subject: [Patch v3 10/11] EmulatorPkg: Enable CLANG9 tool chain BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1603 1. Add WIN_SEC_BUILD macro check for CLANG9 tool chain build -p EmulatorPkg\EmulatorPkg.dsc -a IA32 -DWIN_SEC_BUILD=3DTRUE -t CLANG9 build -p EmulatorPkg\EmulatorPkg.dsc -a X64 -DWIN_SEC_BUILD=3DTRUE -t CLANG9 2. Append CLANG CC and LINK flags to generate windows HOST. 3. Fix WinHost issue to call GetProcessAffinityMask() API. The input parameter should be UINTN pointer instead of UINT32 pointer. Cc: Jordan Justen > Cc: Andrew Fish > Cc: Ray Ni > Signed-off-by: Liming Gao > --- EmulatorPkg/Win/Host/WinHost.c | 6 +++--- EmulatorPkg/EmulatorPkg.dsc | 7 ++++++- EmulatorPkg/Win/Host/WinHost.inf | 6 ++++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/EmulatorPkg/Win/Host/WinHost.c b/EmulatorPkg/Win/Host/WinHost.c index 9aba3c8959..e40ce32548 100644 --- a/EmulatorPkg/Win/Host/WinHost.c +++ b/EmulatorPkg/Win/Host/WinHost.c @@ -356,7 +356,7 @@ Returns: INTN EFIAPI main ( - IN INTN Argc, + IN INT Argc, IN CHAR8 **Argv, IN CHAR8 **Envp ) @@ -391,8 +391,8 @@ Returns: VOID *SecFile; CHAR16 *MemorySizeStr; CHAR16 *FirmwareVolumesStr; - UINT32 ProcessAffinityMask; - UINT32 SystemAffinityMask; + UINTN ProcessAffinityMask; + UINTN SystemAffinityMask; INT32 LowBit; // diff --git a/EmulatorPkg/EmulatorPkg.dsc b/EmulatorPkg/EmulatorPkg.dsc index 20f1187713..72532f5daf 100644 --- a/EmulatorPkg/EmulatorPkg.dsc +++ b/EmulatorPkg/EmulatorPkg.dsc @@ -237,9 +237,10 @@ [Components] !if "IA32" in $(ARCH) || "X64" in $(ARCH) - !if "MSFT" in $(FAMILY) + !if "MSFT" in $(FAMILY) || $(WIN_SEC_BUILD) =3D=3D TRUE ## # Emulator, OS WIN application + # CLANG9 is cross OS tool chain. It depends on WIN_SEC_BUILD macro. ## EmulatorPkg/Win/Host/WinHost.inf !else @@ -419,7 +420,11 @@ MSFT:DEBUG_*_*_CC_FLAGS =3D /Od /Oy- MSFT:NOOPT_*_*_CC_FLAGS =3D /Od /Oy- + GCC:DEBUG_CLANG9_*_CC_FLAGS =3D-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 =3D /ALIGN:4096 /FILEALIGN:4096 /SUBSYSTEM:CONSOLE MSFT:DEBUG_*_*_DLINK_FLAGS =3D /EXPORT:InitializeDriver=3D$(IMAGE_ENTRY_POINT) /BASE:0x10000 MSFT:NOOPT_*_*_DLINK_FLAGS =3D /EXPORT:InitializeDriver=3D$(IMAGE_ENTRY_POINT) /BASE:0x10000 + GCC:*_CLANG9_*_DLINK_FLAGS =3D /ALIGN:4096 /FILEALIGN:4096 /SUBSYSTEM:CONSOLE + GCC:DEBUG_CLANG9_*_DLINK_FLAGS =3D + /EXPORT:InitializeDriver=3D$(IMAGE_ENTRY_POINT) /BASE:0x10000 + GCC:NOOPT_CLANG9_*_DLINK_FLAGS =3D + /EXPORT:InitializeDriver=3D$(IMAGE_ENTRY_POINT) /BASE:0x10000 diff --git a/EmulatorPkg/Win/Host/WinHost.inf b/EmulatorPkg/Win/Host/WinHost.inf index 631d5a6470..1adca10d79 100644 --- a/EmulatorPkg/Win/Host/WinHost.inf +++ b/EmulatorPkg/Win/Host/WinHost.inf @@ -95,3 +95,9 @@ MSFT:*_VS2017_X64_DLINK_FLAGS =3D /LIBPATH:"%VCToolsInstallDir%lib\x64" /LIBPATH:"%UniversalCRTSdkDir%lib\%UCRTVersion%\ucrt\x64" /LIBPATH:"%WindowsSdkDir%lib\%WindowsSDKLibVersion%\um\x64" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:AMD64 /LTCG Kernel32.lib MSVCRTD.lib vcruntimed.lib ucrtd.lib Gdi32.lib User32.lib Winmm.lib Advapi32.lib MSFT:*_*_X64_ASM_FLAGS =3D=3D /nologo /W3 /WX /c /Cx /Zd /W0 /= Zi MSFT:*_*_X64_ASMLINK_FLAGS =3D=3D /link /nologo + + GCC:*_CLANG9_X64_DLINK_FLAGS =3D=3D /out:"$(BIN_DIR)\$(BASE_NAME).exe" /base:0x10000000 /pdb:"$(BIN_DIR)\$(BASE_NAME).pdb" /LIBPATH:"%UniversalCRTSdkDir%lib\%UCRTVersion%\ucrt\x64" /LIBPATH:"%WindowsSdkDir%lib\%WindowsSDKLibVersion%\um\x64" /LIBPATH:"%VCToolsInstallDir%lib\x64" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /OPT:REF /DEBUG /MACHINE:AMD64 Kernel32.lib MSVCRTD.lib vcruntimed.lib ucrtd.lib Gdi32.lib User32.lib Winmm.lib Advapi32.lib /lldmap /EXPORT:InitializeDriver=3D_ModuleEntryPoint + GCC:*_CLANG9_X64_CC_FLAGS =3D=3D -m64 -g -fshort-wchar + -fno-strict-aliasing -Wall -c -include AutoGen.h -D + _CRT_SECURE_NO_WARNINGS -Wnonportable-include-path -D UNICODE -D + _CRT_SECURE_NO_DEPRECATE + + GCC:*_CLANG9_IA32_DLINK_FLAGS =3D=3D /out:"$(BIN_DIR)\$(BASE_NAME).exe" /base:0x10000000 /pdb:"$(BIN_DIR)\$(BASE_NAME).pdb" /LIBPATH:"%UniversalCRTSdkDir%lib\%UCRTVersion%\ucrt\x86" /LIBPATH:"%WindowsSdkDir%lib\%WindowsSDKLibVersion%\um\x86" /LIBPATH:"%VCToolsInstallDir%ib\x86" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /OPT:REF /DEBUG /MACHINE:I386 Kernel32.lib MSVCRTD.lib vcruntimed.lib ucrtd.lib Gdi32.lib User32.lib Winmm.lib Advapi32.lib /lldmap /EXPORT:InitializeDriver=3D_ModuleEntryPoint + GCC:*_CLANG9_IA32_CC_FLAGS =3D=3D -m32 -g -fshort-wchar + -fno-strict-aliasing -Wall -c -include AutoGen.h -D + _CRT_SECURE_NO_WARNINGS -Wnonportable-include-path -D UNICODE -D + _CRT_SECURE_NO_DEPRECATE -- 2.13.0.windows.1 --_000_4A89E2EF3DFEDB4C8BFDE51014F606A14E51EC84SHSMSX104ccrcor_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Andr= ew:

&nbs= p;Here is the cover letter on CLANG9 introduction. https://edk2.groups.io/g/devel/message/49157

 

1)      Yes. CLANG9 tool chain is added to directly generate PE/COFF image (EFI= image).
This tool chain uses LLVM clang C compiler and lld linker, generates PE/COF= F
image and PDB compatible debug symbol format. Now, it supports IA32/X64 Arc= hs.

= LLVM clang C compiler and l= ld linker are the standalone tool set. They don’t depend other lib to= generate PE/COFF image.

 

2)      Yes. CLANG9 is the cross OS tool chain. It can work on Windows/Linux/Ma= c host OS.

= LLVM LLD linker uses Window= s style arguments. I verify CLANG9 for Ovmf3264 in Windows/Linux host OS.

 

3= )   &= nbsp; This patch enables WinH= ost in Windows. It doesn’t enable UnixHost. Now, EmulatorPkg with CLA= NG9 only works on Windows Host.

= This patch can make other modules pass build in Window= s/Linux/Mac only if LLVM9 tool set is installed.

= But, the generated image may not work on Linux/Mac. I = agree below linker flags are specific to windows host.

= So, I suggest to add the conditional statement of $(WI= N_HOST_BUILD) =3D=3D TRUE for them.

 

!if $(WIN_HOST_BUILD) =3D=3D TR= UE

  GCC:*_CLANG9_*_DLINK_FLA= GS     =3D /ALIGN:4096 /FILEALIGN:4096 /SUBSYSTEM:CONSO= LE

  GCC:DEBUG_CLANG9_*_DLINK= _FLAGS =3D /EXPORT:InitializeDriver=3D$(IMAGE_ENTRY_POINT) /BASE:0x10000

  GCC:NOOPT_CLANG9_*_DLINK= _FLAGS =3D /EXPORT:InitializeDriver=3D$(IMAGE_ENTRY_POINT) /BASE:0x10000

!endif

 

Thanks

Liming

From: afish@apple.com <afish@app= le.com>
Sent: Friday, October 18, 2019 1:15 AM
To: Ni, Ray <ray.ni@intel.com>
Cc: Gao, Liming <liming.gao@intel.com>; devel@edk2.groups.io; = Justen, Jordan L <jordan.l.justen@intel.com>
Subject: Re: [Patch v3 10/11] EmulatorPkg: Enable CLANG9 tool chain<= o:p>

 

Ray,

 

Sorry I'm coming a little late = to this and I'm confused. I have some questions?

1) Does CLANG9 imply CLANGPE? 

2) Does C= LANGPE work on Linux and macOS? Can you pass the Windows style arguments to= CLANGPE linker on Linux and macOS?<= /span>

3) For th= e EmulatorPkg don't you have the extra requirement that compiler needs a st= andard C lib (or platform specific libs) to function?

       a) GCC:*_CLAN= G9_*_DLINK_FLAGS in EmulatorPkg.dsc seems to imply the Linux and macOS= systems will have a Windows SKD dir and a lot of Windows DLLs? Does all th= at come when you install CLANG9 when you install it on Linux or macOS?



So I gues= s I'm asking is the linker really the same for CLANG9 on all systems? I gue= ss the answer could be yes, but it seems the C lib for the Host App is stil= l an App for that OS and is OS dependent? =



Sorry if = I'm missing something fundamental and this is a dumb question. 



Thanks,



Andrew Fi= sh

 

 



On Oct 17, 2019, at 12:27 AM, N= i, Ray <ray.ni@intel.com> wro= te:

 

Liming,
Emulator is using a generic SEC module. The host specific module is called = "Host".
So I prefer to change the macro to "WIN_HOST_BUILD", with this ch= ange, Reviewed-by: Ray Ni <ray.ni@in= tel.com>


-----Original Message-----
From: Gao, Liming <liming.gao@in= tel.com>
Sent: Thursday, October 17, 2019 2:56 PM
To: devel@edk2.groups.io
Cc: Justen, Jordan L <jorda= n.l.justen@intel.com>; Andrew Fish
<afish@apple.com>; Ni, Ray <= ;ray.ni@intel.com>
Subject: [Patch v3 10/11] EmulatorPkg: Enable CLANG9 tool chain

BZ: https= ://bugzilla.tianocore.org/show_bug.cgi?id=3D1603
1. Add WIN_SEC_BUILD macro check for CLANG9 tool chain build -p
EmulatorPkg\EmulatorPkg.dsc -a IA32 -DWIN_SEC_BUILD=3DTRUE -t CLANG9
build -p EmulatorPkg\EmulatorPkg.dsc -a X64 -DWIN_SEC_BUILD=3DTRUE -t
CLANG9 2. Append CLANG CC and LINK flags to generate windows HOST.
3. Fix WinHost issue to call GetProcessAffinityMask() API.
  The input parameter should be UINTN pointer instead of UINT32 p= ointer.

Cc: Jordan Justen <jordan.l= .justen@intel.com>
Cc: Andrew Fish <afish@apple.com&= gt;
Cc: Ray Ni <ray.ni@intel.com>=
Signed-off-by: Liming Gao <limin= g.gao@intel.com>
---
EmulatorPkg/Win/Host/WinHost.c   | 6 +++---
EmulatorPkg/EmulatorPkg.dsc      | 7 ++= 3;+++-
EmulatorPkg/Win/Host/WinHost.inf | 6 ++++++
3 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/EmulatorPkg/Win/Host/WinHost.c
b/EmulatorPkg/Win/Host/WinHost.c index 9aba3c8959..e40ce32548 100644
--- a/EmulatorPkg/Win/Host/WinHost.c
+++ b/EmulatorPkg/Win/Host/WinHost.c
@@ -356,7 +356,7 @@ Returns:
INTN
EFIAPI
main (
-  IN  INTN  Argc,
+  IN  INT  Argc,
  IN  CHAR8 **Argv,
  IN  CHAR8 **Envp
  )
@@ -391,8 +391,8 @@ Returns:
  VOID          &nbs= p;       *SecFile;
  CHAR16          &n= bsp;     *MemorySizeStr;
  CHAR16          &n= bsp;     *FirmwareVolumesStr;
-  UINT32           =      ProcessAffinityMask;
-  UINT32           =      SystemAffinityMask;
+  UINTN          &nb= sp;      ProcessAffinityMask;
+  UINTN          &nb= sp;      SystemAffinityMask;
  INT32          &nb= sp;      LowBit;

  //
diff --git a/EmulatorPkg/EmulatorPkg.dsc b/EmulatorPkg/EmulatorPkg.dsc
index 20f1187713..72532f5daf 100644
--- a/EmulatorPkg/EmulatorPkg.dsc
+++ b/EmulatorPkg/EmulatorPkg.dsc
@@ -237,9 +237,10 @@

[Components]
!if "IA32" in $(ARCH) || "X64" in $(ARCH)
-  !if "MSFT" in $(FAMILY)
+  !if "MSFT" in $(FAMILY) || $(WIN_SEC_BUILD) =3D=3D TR= UE
    ##
    #  Emulator, OS WIN application
+    #  CLANG9 is cross OS tool chain. It depends o= n WIN_SEC_BUILD macro.
    ##
    EmulatorPkg/Win/Host/WinHost.inf
  !else
@@ -419,7 +420,11 @@

  MSFT:DEBUG_*_*_CC_FLAGS =3D /Od /Oy-
  MSFT:NOOPT_*_*_CC_FLAGS =3D /Od /Oy-
+  GCC:DEBUG_CLANG9_*_CC_FLAGS =3D-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     =3D /ALIGN:4096 = /FILEALIGN:4096
/SUBSYSTEM:CONSOLE
  MSFT:DEBUG_*_*_DLINK_FLAGS =3D
/EXPORT:InitializeDriver=3D$(IMAGE_ENTRY_POINT) /BASE:0x10000
  MSFT:NOOPT_*_*_DLINK_FLAGS =3D
/EXPORT:InitializeDriver=3D$(IMAGE_ENTRY_POINT) /BASE:0x10000
+  GCC:*_CLANG9_*_DLINK_FLAGS     =3D /ALIGN:4= 096 /FILEALIGN:4096
/SUBSYSTEM:CONSOLE
+  GCC:DEBUG_CLANG9_*_DLINK_FLAGS =3D
+ /EXPORT:InitializeDriver=3D$(IMAGE_ENTRY_POINT) /BASE:0x10000
+ GCC:NOOPT_CLANG9_*_DLINK_FLAGS =3D
+ /EXPORT:InitializeDriver=3D$(IMAGE_ENTRY_POINT) /BASE:0x10000
diff --git a/EmulatorPkg/Win/Host/WinHost.inf
b/EmulatorPkg/Win/Host/WinHost.inf
index 631d5a6470..1adca10d79 100644
--- a/EmulatorPkg/Win/Host/WinHost.inf
+++ b/EmulatorPkg/Win/Host/WinHost.inf
@@ -95,3 +95,9 @@
  MSFT:*_VS2017_X64_DLINK_FLAGS      =3D=
/LIBPATH:"%VCToolsInstallDir%lib\x64"
/LIBPATH:"%UniversalCRTSdkDir%lib\%UCRTVersion%\ucrt\x64"
/LIBPATH:"%WindowsSdkDir%lib\%WindowsSDKLibVersion%\um\x64"
/NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP
/OPT:REF /DEBUG /MACHINE:AMD64 /LTCG Kernel32.lib MSVCRTD.lib
vcruntimed.lib ucrtd.lib Gdi32.lib User32.lib Winmm.lib Advapi32.lib
  MSFT:*_*_X64_ASM_FLAGS       &nbs= p;    =3D=3D /nologo /W3 /WX /c /Cx /Zd /W0 /Zi
  MSFT:*_*_X64_ASMLINK_FLAGS       =  =3D=3D /link /nologo
+
+  GCC:*_CLANG9_X64_DLINK_FLAGS =3D=3D
/out:"$(BIN_DIR)\$(BASE_NAME).exe" /base:0x10000000
/pdb:"$(BIN_DIR)\$(BASE_NAME).pdb"
/LIBPATH:"%UniversalCRTSdkDir%lib\%UCRTVersion%\ucrt\x64"
/LIBPATH:"%WindowsSdkDir%lib\%WindowsSDKLibVersion%\um\x64"
/LIBPATH:"%VCToolsInstallDir%lib\x64"   /NOLOGO /SUBSYS= TEM:CONSOLE
/NODEFAULTLIB /IGNORE:4086  /OPT:REF /DEBUG /MACHINE:AMD64
Kernel32.lib MSVCRTD.lib vcruntimed.lib ucrtd.lib Gdi32.lib User32.lib
Winmm.lib Advapi32.lib /lldmap
/EXPORT:InitializeDriver=3D_ModuleEntryPoint
+  GCC:*_CLANG9_X64_CC_FLAGS =3D=3D -m64 -g -fshort-wchar
+ -fno-strict-aliasing -Wall -c -include AutoGen.h -D
+ _CRT_SECURE_NO_WARNINGS -Wnonportable-include-path  -D UNICODE -D
+ _CRT_SECURE_NO_DEPRECATE
+
+  GCC:*_CLANG9_IA32_DLINK_FLAGS =3D=3D
/out:"$(BIN_DIR)\$(BASE_NAME).exe" /base:0x10000000
/pdb:"$(BIN_DIR)\$(BASE_NAME).pdb"
/LIBPATH:"%UniversalCRTSdkDir%lib\%UCRTVersion%\ucrt\x86"
/LIBPATH:"%WindowsSdkDir%lib\%WindowsSDKLibVersion%\um\x86"
/LIBPATH:"%VCToolsInstallDir%ib\x86"   /NOLOGO /SUBSYST= EM:CONSOLE
/NODEFAULTLIB /IGNORE:4086  /OPT:REF /DEBUG /MACHINE:I386
Kernel32.lib MSVCRTD.lib vcruntimed.lib ucrtd.lib Gdi32.lib User32.lib
Winmm.lib Advapi32.lib /lldmap
/EXPORT:InitializeDriver=3D_ModuleEntryPoint
+  GCC:*_CLANG9_IA32_CC_FLAGS =3D=3D -m32 -g -fshort-wchar
+ -fno-strict-aliasing -Wall -c -include AutoGen.h -D
+ _CRT_SECURE_NO_WARNINGS -Wnonportable-include-path  -D UNICODE -D
+ _CRT_SECURE_NO_DEPRECATE
--
2.13.0.windows.1

 

 

--_000_4A89E2EF3DFEDB4C8BFDE51014F606A14E51EC84SHSMSX104ccrcor_--