From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from nwk-aaemail-lapp01.apple.com (nwk-aaemail-lapp01.apple.com [17.151.62.66]) by mx.groups.io with SMTP id smtpd.web09.9615.1573491091861427206 for ; Mon, 11 Nov 2019 08:51:32 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@apple.com header.s=20180706 header.b=kThzHKHS; spf=pass (domain: apple.com, ip: 17.151.62.66, mailfrom: afish@apple.com) Received: from pps.filterd (nwk-aaemail-lapp01.apple.com [127.0.0.1]) by nwk-aaemail-lapp01.apple.com (8.16.0.27/8.16.0.27) with SMTP id xABGkpPk059889; Mon, 11 Nov 2019 08:51:30 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=sender : content-type : content-transfer-encoding : from : mime-version : subject : date : message-id : references : cc : in-reply-to : to; s=20180706; bh=EaE1BiUVcIDDkmjjx+TDcnDcK2b+CEIQb1d6JN5uuT4=; b=kThzHKHSNousfpF8Nzy1mscfaI/cdl1VUbWlw5IfJY4FPZr6QrkwC20/CZeqv5qgBS0L z8W2OOtoKBl2DecdBxxISciiHejXMIQ0cCuGTChCSx9QyS2Dm+sWwUUAbRTTDZAFFO3p l4VyRatvIPHqnz0++S/YFuLZxkV2/+Sob3YJVCR7EIcUBUegQu0E4gs5VNvV2f1tBJnO 6NKOrFmbKUUC80nvEI833VloyzpAOzJJ4v8xQ839j1C8lyhtJ4cN+U5z2J/luOmtHx9a HqTtY8XLTdRpR8YkBZtXA0XyRozJX/0p1KS2zwA90ILmsiV9lXKSb44McUogch5gsVpr PQ== Received: from mr2-mtap-s03.rno.apple.com (mr2-mtap-s03.rno.apple.com [17.179.226.135]) by nwk-aaemail-lapp01.apple.com with ESMTP id 2w5w92pbds-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Mon, 11 Nov 2019 08:51:30 -0800 Received: from nwk-mmpp-sz13.apple.com (nwk-mmpp-sz13.apple.com [17.128.115.216]) by mr2-mtap-s03.rno.apple.com (Oracle Communications Messaging Server 8.0.2.4.20190507 64bit (built May 7 2019)) with ESMTPS id <0Q0T00G3GDHTVN10@mr2-mtap-s03.rno.apple.com>; Mon, 11 Nov 2019 08:51:29 -0800 (PST) Received: from process_milters-daemon.nwk-mmpp-sz13.apple.com by nwk-mmpp-sz13.apple.com (Oracle Communications Messaging Server 8.0.2.4.20190507 64bit (built May 7 2019)) id <0Q0T00700D4MBY00@nwk-mmpp-sz13.apple.com>; Mon, 11 Nov 2019 08:51:29 -0800 (PST) X-Va-A: X-Va-T-CD: 04ca32df9c4d947bbb3e328bdd0d72ed X-Va-E-CD: 0b3ad656057f4d390b5c3920634d9433 X-Va-R-CD: ebad80bb98cf8d02fa370c056d39fa63 X-Va-CD: 0 X-Va-ID: 4383a4bd-6a8d-4ccf-871b-1fd2a55ecbb2 X-V-A: X-V-T-CD: 04ca32df9c4d947bbb3e328bdd0d72ed X-V-E-CD: 0b3ad656057f4d390b5c3920634d9433 X-V-R-CD: ebad80bb98cf8d02fa370c056d39fa63 X-V-CD: 0 X-V-ID: 4d6952b4-b529-48dd-b1aa-4ef9f5f67d9d X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-11-11_05:,, signatures=0 Received: from [17.235.32.219] (unknown [17.235.32.219]) by nwk-mmpp-sz13.apple.com (Oracle Communications Messaging Server 8.0.2.4.20190507 64bit (built May 7 2019)) with ESMTPSA id <0Q0T0093QDHRPV80@nwk-mmpp-sz13.apple.com>; Mon, 11 Nov 2019 08:51:28 -0800 (PST) Sender: afish@apple.com From: "Andrew Fish" MIME-version: 1.0 (1.0) Subject: Re: [edk2-devel] [Patch v3 10/11] EmulatorPkg: Enable CLANG9 tool chain Date: Mon, 11 Nov 2019 08:51:27 -0800 Message-id: References: <20191111163913.GF16820@bivouac.eciton.net> Cc: "Ni, Ray" , "Gao, Liming" , "devel@edk2.groups.io" , "Justen, Jordan L" , "Shi, Steven" In-reply-to: <20191111163913.GF16820@bivouac.eciton.net> To: Leif Lindholm X-Mailer: iPhone Mail (17B84) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-11-11_05:,, signatures=0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: quoted-printable Either works for me too. I like the PDE ending a little more, but agree it = is a little more obscure. > On Nov 11, 2019, at 8:39 AM, Leif Lindholm wr= ote: >=20 > =EF=BB=BFOn Fri, Nov 08, 2019 at 03:34:59AM +0000, Ni, Ray wrote: >> Liming, >> PE is UEFI spec required executable binary format. I like CLANGPDB >> more than CLANGPE given LLVM may generate DRAWF debug symbol even >> when generating PE. >=20 > Just a comment here to point out that while (as I stated in reply to > Liming) my preference would be CLANGPE, I see the logic in the above, > and would be happy with either. >=20 > (My reason for preferring CLANGPE is not exactly techincal - I just > expect more people to know what PE is than who know what PDB is.) >=20 > Regards, >=20 > Leif >=20 >>> -----Original Message----- >>> From: Gao, Liming >>> Sent: Friday, November 8, 2019 9:50 AM >>> To: devel@edk2.groups.io; leif.lindholm@linaro.org; Andrew Fish >>> Cc: Ni, Ray ; Justen, Jordan L ; Gao, Liming ; Shi, >>> Steven >>> Subject: RE: [edk2-devel] [Patch v3 10/11] EmulatorPkg: Enable CLANG9 = tool chain >>>=20 >>> Andrew and Leif: >>> Thanks for your comment. CLANG9 is different from CLANG38. And, CLANG= 9 will support LLVM9 or the above. >>> So, this tool chain should have the specific word for its purpose, an= d remove the version 9 to avoid the confuse. >>>=20 >>> I prefer the tool chain name as CLANGPE or CLANGPDB. CLANGPE may be b= etter. Now, CLANG9 tool chain >>> build rule family just uses CLANGPE. CLANGPE lets user know this tool= chain generates PE/COFF image. >>> And, PE/COFF image debug symbol is PDB. So, PE also means PDB. >>>=20 >>> Last, I just review the changes. Tool chain name update is not big. I= f you accept CLANGPE as tool chain name, >>> I will send the patch soon to catch 201911 stable tag. >>>=20 >>> Thanks >>> Liming >>>> -----Original Message----- >>>> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of= Leif >>>> Lindholm >>>> Sent: Friday, November 08, 2019 2:37 AM >>>> To: Andrew Fish >>>> Cc: devel@edk2.groups.io; Gao, Liming ; Ni, Ray >>>> ; Justen, Jordan L >>>> Subject: Re: [edk2-devel] [Patch v3 10/11] EmulatorPkg: Enable CLANG9= tool >>>> chain >>>>=20 >>>> Hi Andrew, >>>>=20 >>>> Yeah, I'm pretty easy with regards to what we change it to. >>>> Although if we're bikeshedding, I would prefer not using _ in the >>>> toolchain profile name. >>>>=20 >>>> I'm ... optimistic ... it won't break any of my existing scripts, but >>>> since the build system uses it as a >>>> __ separator, it would >>>> be nice if we didn't risk confusion there. >>>>=20 >>>> (I would be totally happy with PECLANG, CLANGPE, PDBCLANG, CLANGPDB o= r >>>> something along those lines.) >>>>=20 >>>> Regards, >>>>=20 >>>> Leif >>>>=20 >>>> On Thu, Nov 07, 2019 at 11:54:04AM -0600, Andrew Fish wrote: >>>>> Leif, >>>>>=20 >>>>> I think I proposed CLANG_PDB or CLANG_PECOFF. I seem to like >>>> CLANG_PDB as assuming the PDE debugging experience is awesome/exists >>>> on Linux and macOS is not a given. >>>>>=20 >>>>> Thanks, >>>>>=20 >>>>> Andrew Fish >>>>>=20 >>>>>> On Nov 7, 2019, at 11:19 AM, Leif Lindholm >>>> wrote: >>>>>>=20 >>>>>> Oops, sorry, missed this in search. >>>>>>=20 >>>>>> On Wed, Oct 30, 2019 at 03:43:44PM +0000, Liming Gao wrote: >>>>>>> Andrew: >>>>>>>=20 >>>>>>> I prefer to keep short CLANG9 as the tool chain name. I add wiki >>>>>>> page >>>>>>> https://github.com/tianocore/tianocore.github.io/wiki/CLANG9-Tools= - >>>> Chain >>>>>>> to introduce it. >>>>>>=20 >>>>>> Why should users be expected to go and read documentation in order = to >>>>>> learn that fundamental and incompatible changes to output and debug >>>>>> format has been made as part of what looks like a simple version bu= mp? >>>>>>=20 >>>>>>> And, we have CLANG38 tool chain. It generates ELF >>>>>>> image and DWARF debug symbol format. It can work with LLVM 9.0 >>>>>>> release. Current tool chain tag name includes compiler name and >>>>>>> version. There is no specific info in the tool chain name. The >>>>>>> developer can get the more tool chain information from wiki page. >>>>>>=20 >>>>>> We aleady have the problem that people think they need to use GCC5 = to >>>>>> build EDK2 since that is the highest named GCC toolchain profile. >>>>>>=20 >>>>>> Let's not make this situation *worse* by setting up a multidimensio= nal >>>>>> feature matrix, based off random numerical values. >>>>>>=20 >>>>>> So say that we next have a pressing need to create a new toolchain >>>>>> profile for clang 10, using the old ELF mechanism. Are you then >>>>>> suggesting we set up a table on said wiki page where people have to= go >>>>>> and look up what the object and debug formats are for each CLANG## >>>>>> toolchain profile? >>>>>>=20 >>>>>> And what if you then end up needing to do the same for the PDB >>>>>> flavour? >>>>>>=20 >>>>>>> CLANG9 is designed to support Emulator for Windows host only. >>>>>>=20 >>>>>> Which is why it makes no sense to name it as a successor of >>>>>> CLANG38. >>>>>>=20 >>>>>>> CLANG38 may be used for Emulator in Linux or Mac. I don=E2=80=99t >>>>>>> try it before. >>>>>>>=20 >>>>>>> CLANG9 goal is to align the same compiler in the different host >>>>>>> development environment. It can replace VS or GCC compiler. On >>>>>>> Windows Host, I verify VS debugger for the source level debug. On >>>>>>> Linux host, I have not verified llvm debugger. I will investigate >>>>>>> the debugger solution for OVMF in Linux host. >>>>>>=20 >>>>>> We are not asking you to throw out this toolchain profile. >>>>>>=20 >>>>>> We are saying that since the functionality it provides is completel= y >>>>>> unrelated to that of CLANG38, it should not be named in a way that >>>>>> suggests it is merely a revision update. >>>>>>=20 >>>>>> / >>>>>> Leif >>>>>>=20 >>>>>>> Thanks >>>>>>> Liming >>>>>>> From: afish@apple.com >>>>>>> Sent: Saturday, October 26, 2019 2:45 AM >>>>>>> To: devel@edk2.groups.io; Gao, Liming >>>>>>> Cc: Ni, Ray ; Justen, Jordan L >>>> >>>>>>> Subject: Re: [edk2-devel] [Patch v3 10/11] EmulatorPkg: Enable CLA= NG9 >>>> tool chain >>>>>>>=20 >>>>>>> Liming, >>>>>>>=20 >>>>>>> Sorry I missed this mail. Thanks for the info! I was doing some re= search >>>> into this too and now I think I finally understand. I think the name = for the tool >>>> chain really confused me and we should think about changing the name. >>>>>>>=20 >>>>>>> From what I understand CLANG9 means produce PE/COFF directly and >>>> used the PDB debugging format. I see from the llvm site that the link= er can >>>> produce PDB directly as you mention. This all makes sense to me now a= s LLVM >>>> tries to make it easy to be a drop in replacement for VC++ or GCC. So= this tool >>>> chain is designed to be able to cross build a "Windows App" on a Linu= x or >>>> macOS. It also looks like the llvm debugger, lldb, is lagging in its = support for >>>> PDB based debugging. >>>>>>>=20 >>>>>>>=20 >>>>>>> Anyway I think Leif and I agree the toolchain name is very confusi= ng. I'd >>>> rather see it called CLANG9_WIN or CLANG_PDB. >>>>>>>=20 >>>>>>>=20 >>>>>>> On Oct 18, 2019, at 7:27 AM, Liming Gao >>>> > wrote: >>>>>>>=20 >>>>>>> Andrew: >>>>>>> Here is the cover letter on CLANG9 introduction. >>>> https://edk2.groups.io/g/devel/message/49157 >>>>>>>=20 >>>>>>> 1) Yes. CLANG9 tool chain is added to directly generate PE/CO= FF image >>>> (EFI image). >>>>>>> This tool chain uses LLVM clang C compiler and lld linker, generat= es >>>> PE/COFF >>>>>>> image and PDB compatible debug symbol format. Now, it supports >>>> IA32/X64 Archs. >>>>>>> LLVM clang C compiler and lld linker are the standalone tool set. = They >>>> don=E2=80=99t depend other lib to generate PE/COFF image. >>>>>>>=20 >>>>>>> 2) Yes. CLANG9 is the cross OS tool chain. It can work on >>>> Windows/Linux/Mac host OS. >>>>>>> LLVM LLD linker uses Windows style arguments. I verify CLANG9 for >>>> Ovmf3264 in Windows/Linux host OS. >>>>>>>=20 >>>>>>>=20 >>>>>>> On Linux can you source level debug Ovmf? >>>>>>>=20 >>>>>>>=20 >>>>>>> 3) This patch enables WinHost in Windows. It doesn=E2=80=99t e= nable UnixHost. >>>> Now, EmulatorPkg with CLANG9 only works on Windows Host. >>>>>>> This patch can make other modules pass build in Windows/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 $(WIN_HOST_BUILD= ) >>>> =3D=3D TRUE for them. >>>>>>>=20 >>>>>>>=20 >>>>>>> For the EmulatorPkg the Host is a native App for that OS you build= on, but >>>> it seems like CLANG9 is targeted to build Windows Apps. I'm not sure = but you >>>> might be able to override all the linker commands to build a native a= pp, or just >>>> use the system linker for the Host? >>>>>>>=20 >>>>>>> I'm not sure how well debugging will work mixing PDB and DWARF >>>> symbol formats? >>>>>>>=20 >>>>>>> Thanks, >>>>>>>=20 >>>>>>> Andrew Fish >>>>>>>=20 >>>>>>>=20 >>>>>>>=20 >>>>>>> !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_ENTRY_POINT) /BASE:0x10000 >>>>>>> GCC:NOOPT_CLANG9_*_DLINK_FLAGS =3D >>>> /EXPORT:InitializeDriver=3D$(IMAGE_ENTRY_POINT) /BASE:0x10000 >>>>>>> !endif >>>>>>>=20 >>>>>>> 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, Jordan L >>>> > >>>>>>> Subject: Re: [Patch v3 10/11] EmulatorPkg: Enable CLANG9 tool chai= n >>>>>>>=20 >>>>>>> Ray, >>>>>>>=20 >>>>>>> Sorry I'm coming a little late to this and I'm confused. I have so= me >>>> questions? >>>>>>> 1) Does CLANG9 imply CLANGPE? >>>>>>> 2) Does CLANGPE work on Linux and macOS? Can you pass the Windows >>>> style arguments to CLANGPE linker on Linux and macOS? >>>>>>> 3) For the EmulatorPkg don't you have the extra requirement that >>>> compiler needs a standard C lib (or platform specific libs) to functi= on? >>>>>>> a) GCC:*_CLANG9_*_DLINK_FLAGS in EmulatorPkg.dsc seems to >>>> imply the Linux and macOS systems will have a Windows SKD dir and a l= ot of >>>> Windows DLLs? Does all that come when you install CLANG9 when you ins= tall >>>> it on Linux or macOS? >>>>>>>=20 >>>>>>>=20 >>>>>>>=20 >>>>>>> So I guess I'm asking is the linker really the same for CLANG9 on = all >>>> systems? I guess the answer could be yes, but it seems the C lib for = the Host >>>> App is still an App for that OS and is OS dependent? >>>>>>>=20 >>>>>>>=20 >>>>>>>=20 >>>>>>> Sorry if I'm missing something fundamental and this is a dumb ques= tion. >>>>>>>=20 >>>>>>>=20 >>>>>>>=20 >>>>>>> Thanks, >>>>>>>=20 >>>>>>>=20 >>>>>>>=20 >>>>>>> Andrew Fish >>>>>>>=20 >>>>>>>=20 >>>>>>>=20 >>>>>>>=20 >>>>>>>=20 >>>>>>>=20 >>>>>>>=20 >>>>>>> On Oct 17, 2019, at 12:27 AM, Ni, Ray >>>> > wrote: >>>>>>>=20 >>>>>>> Liming, >>>>>>> Emulator is using a generic SEC module. The host specific module i= s called >>>> "Host". >>>>>>> So I prefer to change the macro to "WIN_HOST_BUILD", with this cha= nge, >>>> Reviewed-by: Ray Ni > >>>>>>>=20 >>>>>>>=20 >>>>>>>=20 >>>>>>> -----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 >>>>>>>=20 >>>>>>> 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 poin= ter. >>>>>>>=20 >>>>>>> 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(-) >>>>>>>=20 >>>>>>> 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; >>>>>>>=20 >>>>>>> // >>>>>>> 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 @@ >>>>>>>=20 >>>>>>> [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 @@ >>>>>>>=20 >>>>>>> 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 >>>>>>>=20 >>>>>>> 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.l= ib >>>>>>> MSFT:*_*_X64_ASM_FLAGS =3D=3D /nologo /W3 /WX /c /Cx /Z= d /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 >>>>>>>=20 >>>>>>>=20 >>>>>>>=20 >>>>>>>=20 >>>>>>>=20 >>>>>>>=20 >>>>>>>=20 >>>>>>=20 >>>>>>=20 >>>>>>=20 >>>>>=20 >>>>=20 >>>>=20 >>=20