From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LvwilOgC; spf=pass (domain: redhat.com, ip: 205.139.110.120, mailfrom: philmd@redhat.com) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.120]) by groups.io with SMTP; Fri, 27 Sep 2019 03:13:45 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1569579223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:openpgp:openpgp; bh=QIZejlP3jU5syQq/7SC74sMp7/50VlMncrtvccyTbtU=; b=LvwilOgCheQ+nDniGJF2xnAxtHkQtayclNuyL/zleWFoipC2MJOTUhx1YAJHbsp4sXoq0C a33/JbfvlaAsM2/qrqnTo0h/ikgPgEQBAROokER8ILx6y37LbYFdqa3NhnFUWXi6TSsWun /oYKLCpfVTKzBKMWJ45vsS5zo/V8SDw= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-118-sc5OHVsqNAOdKJv-NzTRvw-1; Fri, 27 Sep 2019 06:13:40 -0400 Received: by mail-wr1-f72.google.com with SMTP id l6so825169wrn.2 for ; Fri, 27 Sep 2019 03:13:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=HBXGFFSdtfLe4USQPNrG5u2VoimZfSFxNcMMcLayJsk=; b=o/qKYYI8h7mUoP8lx2V8h2q5srMPuksZRevmZ25pWz1jIXLvnXFQkPjJ22Dzknq86A ycP+aW6iN8K679WhNRIem6H4xdR2gXdUjT7HqL1vS5Uy9txWNdt0NnDvs3u37ZQbF4nV FMuHtxwgrR0ahCmcDbMeG4J53/WuoLKlBIvHbhfZYlNAtWPr2B1sV76pCfRM+ndREigD nOovY2jvz/B64athTaxX0OxVjJveKYgCE0+G6oCksZ6yGzXDfl+qOn3RW2e5043wVvP8 DI/L05PD8fcLHaBQXEl5fdFOUS/u1TiEvhtKjQiE8mEyHSCmFfWr72KjqPRJLSnrrvaw u7gA== X-Gm-Message-State: APjAAAVPnNJtkubyGM5peTYnEvfoTo17O1BcBy+mjZjNxcLQ4p7qYlZB yoYmLLFmQWmvoIxSYYw/BwUxEnQ9NJjJ+GxIN2rYUbhkNjaBIJgf9Y7q5DflnVDt96FLHwhj5Ka Q67W7dYChWOFJKQ== X-Received: by 2002:adf:f081:: with SMTP id n1mr2513727wro.273.1569579219324; Fri, 27 Sep 2019 03:13:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqxxkvDovMmB47AiOPejtnPNh3Bi5Q4SNRv33MpGtaD6Rhr8xvE6VoP9TmOGkMv3NB9lwq000Q== X-Received: by 2002:adf:f081:: with SMTP id n1mr2513703wro.273.1569579219016; Fri, 27 Sep 2019 03:13:39 -0700 (PDT) Return-Path: Received: from [192.168.1.35] (240.red-88-21-68.staticip.rima-tde.net. [88.21.68.240]) by smtp.gmail.com with ESMTPSA id h125sm10058532wmf.31.2019.09.27.03.13.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 Sep 2019 03:13:38 -0700 (PDT) Subject: Re: [edk2-devel] [Patch 02/12] BaseTools tools_def: Add CLANG9 tool chain to directly generate PE image To: devel@edk2.groups.io, liming.gao@intel.com References: <1569570395-11240-1-git-send-email-liming.gao@intel.com> <1569570395-11240-3-git-send-email-liming.gao@intel.com> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Openpgp: id=89C1E78F601EE86C867495CBA2A3FD6EDEADC0DE; url=http://pgp.mit.edu/pks/lookup?op=get&search=0xA2A3FD6EDEADC0DE Message-ID: <482af67f-8c52-a9a9-8d6d-04f7d021803c@redhat.com> Date: Fri, 27 Sep 2019 12:13:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <1569570395-11240-3-git-send-email-liming.gao@intel.com> X-MC-Unique: sc5OHVsqNAOdKJv-NzTRvw-1 X-Mimecast-Spam-Score: 0 Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Liming, On 9/27/19 9:46 AM, Liming Gao wrote: > Signed-off-by: Liming Gao > --- > BaseTools/Conf/build_rule.template | 26 +++++++++------ > BaseTools/Conf/tools_def.template | 102 +++++++++++++++++++++++++++++++= ++++++++++++++++++++++++++ > 2 files changed, 118 insertions(+), 10 deletions(-) >=20 > diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_ru= le.template > index db06d3a6b4..3a58ac8015 100755 > --- a/BaseTools/Conf/build_rule.template > +++ b/BaseTools/Conf/build_rule.template > @@ -260,7 +260,7 @@ > > $(OUTPUT_DIR)(+)$(MODULE_NAME).lib > =20 > - > + > "$(SLINK)" $(SLINK_FLAGS) /OUT:${dst} @$(OBJECT_FILES_LIST) > =20 > > @@ -291,6 +291,9 @@ > "$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK2_FLAGS) $(DLINK_SP= ATH) @$(STATIC_LIBRARY_FILES_LIST) > "$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_L= IBRARY_FILES_LIST) > =20 > + > + "$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_L= IBRARY_FILES_LIST) $(DLINK2_FLAGS) > + > > "$(DLINK)" -o ${dst} $(DLINK_FLAGS) -Wl,--start-group,@$(STATIC_= LIBRARY_FILES_LIST),--end-group $(CC_FLAGS) $(DLINK2_FLAGS) > "$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst} > @@ -331,7 +334,7 @@ > > $(DEBUG_DIR)(+)$(MODULE_NAME) > =20 > - > + > "$(DLINK)" $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES= _LIST) > =20 > > @@ -355,7 +358,7 @@ > > $(OUTPUT_DIR)(+)$(MODULE_NAME).efi > =20 > - > + > "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS) > $(CP) ${dst} $(DEBUG_DIR) > $(CP) ${dst} $(BIN_DIR)(+)$(MODULE_NAME_GUID).efi > @@ -460,9 +463,14 @@ > =20 > > "$(ASLCC)" -c -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_F= LAGS) $(ASLCC_FLAGS) $(INC) ${src} > - "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLD= LINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj > + "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLD= LINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FL= AGS) > "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll= $(GENFW_FLAGS) > - =20 > + > + > + "$(ASLCC)" -c -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_F= LAGS) $(ASLCC_FLAGS) $(INC) ${src} > + "$(ASLDLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(AS= LDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj > + "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll= $(GENFW_FLAGS) > + > =20 > "$(ASLCC)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_= FLAGS) $(INC) ${src} > "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLD= LINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj > @@ -622,21 +630,19 @@ > > *.hpk > =20 > - > + > $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.lib > =20 > > $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc > =20 > - > + > "$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_G= UID) --hiipackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS) > "$(RC)" /Fo${dst} $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc > =20 > > "$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_G= UID) --hiibinpackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS) > "$(RC)" $(RC_FLAGS) $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc ${dst} > - =20 > + > > GenFw -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) = --hiibinpackage $(HII_BINARY_PACKAGES) > - =20 > - =20 > diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def= .template > index fd6fca542d..e009f195b9 100755 > --- a/BaseTools/Conf/tools_def.template > +++ b/BaseTools/Conf/tools_def.template > @@ -268,6 +268,15 @@ DEFINE DTC_BIN =3D ENV(DTC_PREFIX)dt= c > # Required to build platforms or ACPI tables= : > # Intel(r) ACPI Compiler from > # https://acpica.org/downloads > +# CLANG9 -Linux, Windows, Mac- Requires: > +# Clang 9 or above from http://releases.llvm= .org/ > +# Optional: > +# Required to compile nasm source: > +# nasm compiler from > +# NASM -- http://www.nasm.us/ > +# Required to build platforms or ACPI tables= : > +# Intel(r) ACPI Compiler from > +# https://acpica.org/downloads > # VS2008x86 -win64- Requires: > # Microsoft Visual Studio 2008 (x86) > # Microsoft Windows Server 2003 Driver Devel= opment Kit (Microsoft WINDDK) version 3790.1830 > @@ -2698,6 +2707,99 @@ DEFINE CLANG38_AARCH64_DLINK_FLAGS =3D DEF(CLANG3= 8_AARCH64_TARGET) DEF(GCC_AARCH6 > RELEASE_CLANG38_AARCH64_CC_FLAGS =3D DEF(CLANG38_AARCH64_CC_FLAGS) $(= ARCHCC_FLAGS) $(PLATFORM_FLAGS) -flto -O3 > RELEASE_CLANG38_AARCH64_DLINK_FLAGS =3D DEF(CLANG38_AARCH64_DLINK_FLAGS)= -flto -Wl,-O3 -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-aarch64 -Wl,-plug= in-opt=3D-pass-through=3D-llto-aarch64 > =20 > +########################################################################= ############ > +# > +# CLANG9 - This configuration is used to compile under Windows/Linux/Mac= to produce > +# PE/COFF binaries using LLVM/Clang/LLD with Link Time Optimization ena= bled > +# > +########################################################################= ############ > +*_CLANG9_*_*_FAMILY =3D GCC > +*_CLANG9_*_*_BUILDRULEFAMILY =3D CLANGPE > +*_CLANG9_*_MAKE_PATH =3D ENV(CLANG_HOST_BIN)make > +*_CLANG9_*_*_DLL =3D ENV(CLANG9_DLL) > +*_CLANG9_*_ASL_PATH =3D DEF(UNIX_IASL_BIN) > + > +*_CLANG9_*_APP_FLAGS =3D > +*_CLANG9_*_ASL_FLAGS =3D DEF(DEFAULT_WIN_ASL_FLAGS) > +*_CLANG9_*_ASL_OUTFLAGS =3D DEF(DEFAULT_WIN_ASL_OUTFLAGS) > +*_CLANG9_*_ASLDLINK_FLAGS =3D DEF(MSFT_ASLDLINK_FLAGS) > + > +DEFINE CLANG9_IA32_PREFIX =3D ENV(CLANG9_BIN) > +DEFINE CLANG9_X64_PREFIX =3D ENV(CLANG9_BIN) > + > +DEFINE CLANG9_IA32_TARGET =3D -target i686-unknown-windows > +DEFINE CLANG9_X64_TARGET =3D -target x86_64-unknown-windows > + > +DEFINE CLANG9_WARNING_OVERRIDES =3D -Wno-parentheses-equality -Wno-ta= utological-compare -Wno-tautological-constant-out-of-range-compare -Wno-emp= ty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option= -Wno-microsoft-enum-forward-reference > +DEFINE CLANG9_ALL_CC_FLAGS =3D DEF(GCC48_ALL_CC_FLAGS) DEF(CLANG= 9_WARNING_OVERRIDES) -fno-stack-protector -mms-bitfields -Wno-address -Wno-= shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redecla= ration -fno-asynchronous-unwind-tables -mno-implicit-float -ftrap-function= =3Dundefined_behavior_has_been_optimized_away_by_clang -funsigned-char -fno= -ms-extensions -Wno-null-dereference -fms-compatibility -mno-stack-arg-prob= e > + > +########################### > +# CLANG9 IA32 definitions > +########################### > +*_CLANG9_IA32_CC_PATH =3D DEF(CLANG9_IA32_PREFIX)clang > +*_CLANG9_IA32_SLINK_PATH =3D DEF(CLANG9_IA32_PREFIX)llvm-lib > +*_CLANG9_IA32_DLINK_PATH =3D DEF(CLANG9_IA32_PREFIX)lld-link > +*_CLANG9_IA32_ASLDLINK_PATH =3D DEF(CLANG9_IA32_PREFIX)lld-link > +*_CLANG9_IA32_ASM_PATH =3D DEF(CLANG9_IA32_PREFIX)clang > +*_CLANG9_IA32_PP_PATH =3D DEF(CLANG9_IA32_PREFIX)clang > +*_CLANG9_IA32_VFRPP_PATH =3D DEF(CLANG9_IA32_PREFIX)clang > +*_CLANG9_IA32_ASLCC_PATH =3D DEF(CLANG9_IA32_PREFIX)clang > +*_CLANG9_IA32_ASLPP_PATH =3D DEF(CLANG9_IA32_PREFIX)clang > +*_CLANG9_IA32_RC_PATH =3D DEF(CLANG9_IA32_PREFIX)llvm-rc > + > +*_CLANG9_IA32_ASLCC_FLAGS =3D DEF(GCC_ASLCC_FLAGS) -m32 -fno-lt= o DEF(CLANG9_IA32_TARGET) > +*_CLANG9_IA32_ASM_FLAGS =3D DEF(GCC5_ASM_FLAGS) -m32 -march= =3Di386 DEF(CLANG9_IA32_TARGET) > +*_CLANG9_IA32_OBJCOPY_FLAGS =3D > +*_CLANG9_IA32_NASM_FLAGS =3D -f win32 > +*_CLANG9_IA32_PP_FLAGS =3D DEF(GCC_PP_FLAGS) DEF(CLANG9_IA32= _TARGET) > +*_CLANG9_IA32_ASLPP_FLAGS =3D DEF(GCC_ASLPP_FLAGS) DEF(CLANG9_I= A32_TARGET) > +*_CLANG9_IA32_VFRPP_FLAGS =3D DEF(GCC_VFRPP_FLAGS) DEF(CLANG9_I= A32_TARGET) > + > +DEBUG_CLANG9_IA32_CC_FLAGS =3D DEF(CLANG9_ALL_CC_FLAGS) -m32 -Oz= -flto -march=3Di586 DEF(CLANG9_IA32_TARGET) -gcodeview > +DEBUG_CLANG9_IA32_DLINK_FLAGS =3D /NOLOGO /NODEFAULTLIB /IGNORE:400= 1 /OPT:REF /OPT:ICF=3D10 /ALIGN:32 /FILEALIGN:32 /SECTION:.xdata,D /SECTION= :.pdata,D /MACHINE:X86 /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT= _SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DEBUG:GHASH /lldmap > +DEBUG_CLANG9_IA32_DLINK2_FLAGS =3D > + > +RELEASE_CLANG9_IA32_CC_FLAGS =3D DEF(CLANG9_ALL_CC_FLAGS) -m32 -Oz= -flto -march=3Di586 DEF(CLANG9_IA32_TARGET) > +RELEASE_CLANG9_IA32_DLINK_FLAGS =3D /NOLOGO /NODEFAULTLIB /IGNORE:400= 1 /IGNORE:4254 /OPT:REF /OPT:ICF=3D10 /ALIGN:32 /FILEALIGN:32 /SECTION:.xda= ta,D /SECTION:.pdata,D /MACHINE:X86 /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSY= STEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /MERGE:.rdata=3D.data /ll= dmap > +RELEASE_CLANG9_IA32_DLINK2_FLAGS =3D=20 git complains for trailing whitespace ^ > + > +NOOPT_CLANG9_IA32_CC_FLAGS =3D DEF(CLANG9_ALL_CC_FLAGS) -m32 -O0= -march=3Di586 DEF(CLANG9_IA32_TARGET) -gcodeview > +NOOPT_CLANG9_IA32_DLINK_FLAGS =3D /NOLOGO /NODEFAULTLIB /IGNORE:400= 1 /OPT:REF /OPT:ICF=3D10 /ALIGN:32 /FILEALIGN:32 /SECTION:.xdata,D /SECTION= :.pdata,D /MACHINE:X86 /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT= _SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DEBUG:GHASH /lldmap > +NOOPT_CLANG9_IA32_DLINK2_FLAGS =3D=20 Here too, > + > +########################## > +# CLANGWIN X64 definitions > +########################## > +*_CLANG9_X64_CC_PATH =3D DEF(CLANG9_X64_PREFIX)clang > +*_CLANG9_X64_SLINK_PATH =3D DEF(CLANG9_X64_PREFIX)llvm-lib > +*_CLANG9_X64_DLINK_PATH =3D DEF(CLANG9_X64_PREFIX)lld-link > +*_CLANG9_X64_ASLDLINK_PATH =3D DEF(CLANG9_X64_PREFIX)lld-link > +*_CLANG9_X64_ASM_PATH =3D DEF(CLANG9_X64_PREFIX)clang > +*_CLANG9_X64_PP_PATH =3D DEF(CLANG9_X64_PREFIX)clang > +*_CLANG9_X64_VFRPP_PATH =3D DEF(CLANG9_X64_PREFIX)clang > +*_CLANG9_X64_ASLCC_PATH =3D DEF(CLANG9_X64_PREFIX)clang > +*_CLANG9_X64_ASLPP_PATH =3D DEF(CLANG9_X64_PREFIX)clang > +*_CLANG9_X64_RC_PATH =3D DEF(CLANG9_IA32_PREFIX)llvm-rc > + > +*_CLANG9_X64_ASLCC_FLAGS =3D DEF(GCC_ASLCC_FLAGS) -m64 -fno-lto= DEF(CLANG9_X64_TARGET) > +*_CLANG9_X64_ASM_FLAGS =3D DEF(GCC5_ASM_FLAGS) -m64 DEF(CLANG= 9_X64_TARGET) > +*_CLANG9_X64_OBJCOPY_FLAGS =3D > +*_CLANG9_X64_NASM_FLAGS =3D -f win64 > +*_CLANG9_X64_PP_FLAGS =3D DEF(GCC_PP_FLAGS) DEF(CLANG9_X64_T= ARGET) > +*_CLANG9_X64_ASLPP_FLAGS =3D DEF(GCC_ASLPP_FLAGS) DEF(CLANG9_X6= 4_TARGET) > +*_CLANG9_X64_VFRPP_FLAGS =3D DEF(GCC_VFRPP_FLAGS) DEF(CLANG9_X6= 4_TARGET) > + > +DEBUG_CLANG9_X64_CC_FLAGS =3D DEF(CLANG9_ALL_CC_FLAGS) -m64 "-DE= FIAPI=3D__attribute__((ms_abi))" -mno-red-zone -mcmodel=3Dsmall -Oz -flto D= EF(CLANG9_X64_TARGET) -gcodeview > +DEBUG_CLANG9_X64_DLINK_FLAGS =3D /NOLOGO /NODEFAULTLIB /IGNORE:4001= /OPT:REF /OPT:ICF=3D10 /ALIGN:32 /FILEALIGN:32 /SECTION:.xdata,D /SECTION:= .pdata,D /Machine:X64 /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_= SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DEBUG:GHASH /lldmap > +DEBUG_CLANG9_X64_DLINK2_FLAGS =3D=20 Here > + > +RELEASE_CLANG9_X64_CC_FLAGS =3D DEF(CLANG9_ALL_CC_FLAGS) -m64 "-DE= FIAPI=3D__attribute__((ms_abi))" -mno-red-zone -mcmodel=3Dsmall -Oz -flto D= EF(CLANG9_X64_TARGET) > +RELEASE_CLANG9_X64_DLINK_FLAGS =3D /NOLOGO /NODEFAULTLIB /IGNORE:4001= /IGNORE:4254 /OPT:REF /OPT:ICF=3D10 /ALIGN:32 /FILEALIGN:32 /SECTION:.xdat= a,D /SECTION:.pdata,D /Machine:X64 /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYS= TEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /MERGE:.rdata=3D.data /lld= map > +RELEASE_CLANG9_X64_DLINK2_FLAGS =3D=20 Here > + > +NOOPT_CLANG9_X64_CC_FLAGS =3D DEF(CLANG9_ALL_CC_FLAGS) -m64 "-DE= FIAPI=3D__attribute__((ms_abi))" -mno-red-zone -mcmodel=3Dsmall -O0 DEF(CLA= NG9_X64_TARGET) -gcodeview > +NOOPT_CLANG9_X64_DLINK_FLAGS =3D /NOLOGO /NODEFAULTLIB /IGNORE:4001= /OPT:REF /OPT:ICF=3D10 /ALIGN:32 /FILEALIGN:32 /SECTION:.xdata,D /SECTION:= .pdata,D /Machine:X64 /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_= SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DEBUG:GHASH /lldmap > +NOOPT_CLANG9_X64_DLINK2_FLAGS =3D=20 And here. Just few nits ;) Regards, Phil.