From nobody Thu May 16 13:37:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+49548+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+49548+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1572259635; cv=none; d=zoho.com; s=zohoarc; b=kZvCzNyLvy5hQHndvRxygfBwltOa6nMWvvzPhlLWsGy1+TNYSIAWeVk6NTaom81I4UEUtOHcizRX21N4qRER4CTTz/A1WHnidcrIcrbipFKp0oMFS5ry0yfz0+DMc08NF50hX3eoJuejMQwGE5g+rvswquaC1UN8DJQ5MEKHIh0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572259635; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=xHX8PzUhI6rB2R052DjkmHTvQpjWpeOpbeJSSB2j4+I=; b=B8JHafmdPu586f/3rx/zjZZxVJfvLOCBcHr0AduCsqjpBJNrcv9aZPlBrycX+CRFXDTm2ThMjdGfVi9fzDI5LaAnutyzRGIemQ0Vi9pwIkxrS2/+o13ctEKadfz5KtEgxZLBbcFk9rlCP3W9lhNKh6y53Rufd9G3KyVhVCGYCIQ= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+49548+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1572259635223732.3414110434592; Mon, 28 Oct 2019 03:47:15 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id zateYY1788612xKJvy6Nz4zA; Mon, 28 Oct 2019 03:47:14 -0700 X-Received: from mga02.intel.com (mga02.intel.com []) by mx.groups.io with SMTP id smtpd.web12.4274.1572259632065190199 for ; Mon, 28 Oct 2019 03:47:14 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Oct 2019 03:47:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,239,1569308400"; d="scan'208";a="203229623" X-Received: from shwdepsi1121.ccr.corp.intel.com ([10.239.158.47]) by orsmga006.jf.intel.com with ESMTP; 28 Oct 2019 03:47:11 -0700 From: "Bob Feng" To: devel@edk2.groups.io Cc: Liming Gao , Steven Shi , Bob Feng Subject: [edk2-devel] [Patch 1/1] BaseTools: Generate source file dependency in Make phase Date: Mon, 28 Oct 2019 18:47:02 +0800 Message-Id: <20191028104702.30620-2-bob.c.feng@intel.com> In-Reply-To: <20191028104702.30620-1-bob.c.feng@intel.com> References: <20191028104702.30620-1-bob.c.feng@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,bob.c.feng@intel.com X-Gm-Message-State: 5WmD9CRAIygzB7h5vtoVz8WXx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1572259634; bh=HH1pPQtT1VmLkyAuH8aE4fBwqdQRSnubrKIFg8rgI1Q=; h=Cc:Date:From:Reply-To:Subject:To; b=eePz+RYUFc+dnGTRJhH9+K1rOelVW4PeZmKjeQRoXK4exY12CHOVX45k5itFt7v+ikK Cz8tDxLFHq8uHcrUx9E78XpeG5R5As09UKUvge5wRb8OckHjLL5tr2nl5VKVbMD8BUkeF 7csKeJsegOs2PPDRRGPknUF3s2Y3uoulcB8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2311 Current method to get source file dependency is to use regular expression to match "include" pattern in each source file during AutoGen phase, it's slow and can't get accurate include files, for example when there is Macro using in #include. This patch is to use compiler, C preprocessor and Trim to generate included file list in Make phase. This method will reduce AutoGen phase time and generate accurate include files. Cc: Liming Gao Cc: Steven Shi Signed-off-by: Bob Feng --- BaseTools/Conf/build_rule.template | 89 ++++++----- BaseTools/Conf/tools_def.template | 138 +++++++++--------- BaseTools/Source/Python/AutoGen/GenMake.py | 73 +++------ .../Source/Python/AutoGen/IncludesAutoGen.py | 99 +++++++++++++ BaseTools/Source/Python/Trim/Trim.py | 113 +++++++++++--- BaseTools/Source/Python/build/build.py | 58 ++++++-- 6 files changed, 378 insertions(+), 192 deletions(-) create mode 100644 BaseTools/Source/Python/AutoGen/IncludesAutoGen.py diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule= .template index 3a58ac8015..de9144ffda 100755 --- a/BaseTools/Conf/build_rule.template +++ b/BaseTools/Conf/build_rule.template @@ -121,18 +121,18 @@ =20 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj =20 - "$(CC)" /Fo${dst} $(CC_FLAGS) $(INC) ${src} + "$(CC)" /showIncludes /Fo${dst} $(CC_FLAGS) $(INC) ${src} =20 # For RVCTCYGWIN CC_FLAGS must be first to work around pathing iss= ues - "$(CC)" $(CC_FLAGS) -c -o ${dst} $(INC) ${src} + "$(CC)" -MMD $(CC_FLAGS) -c -o ${dst} $(INC) ${src} =20 - "$(CC)" $(CC_FLAGS) -o ${dst} $(INC) ${src} + "$(CC)" -MMD $(CC_FLAGS) -o ${dst} $(INC) ${src} =20 [C-Code-File.BASE.AARCH64,C-Code-File.SEC.AARCH64,C-Code-File.PEI_CORE.AAR= CH64,C-Code-File.PEIM.AARCH64,C-Code-File.BASE.ARM,C-Code-File.SEC.ARM,C-Co= de-File.PEI_CORE.ARM,C-Code-File.PEIM.ARM] ?.c =20 @@ -141,11 +141,11 @@ =20 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj =20 - "$(CC)" $(CC_FLAGS) $(CC_XIPFLAGS) -c -o ${dst} $(INC) ${src} + "$(CC)" -MMD $(CC_FLAGS) $(CC_XIPFLAGS) -c -o ${dst} $(INC) ${src} =20 [C-Header-File] *.h, *.H =20 @@ -165,19 +165,21 @@ =20 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj =20 - "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i - Trim --source-code --convert-hex --trim-long -o ${d_path}(+)${s_ba= se}.iii ${d_path}(+)${s_base}.i - "$(ASM)" /Fo${dst} $(ASM_FLAGS) /I${s_path} $(INC) ${d_path}(+)${s= _base}.iii + Trim --asm-file -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i -i $(INC= _LIST) ${src} + "$(PP)" /showIncludes $(PP_FLAGS) $(INC) $(OUTPUT_DIR)(+)${s_dir}(= +)${s_base}.i > ${d_path}(+)${s_base}.ii + Trim --source-code --convert-hex --trim-long -o ${d_path}(+)${s_ba= se}.iiii ${d_path}(+)${s_base}.ii + "$(ASM)" /Fo${dst} $(ASM_FLAGS) /I${s_path} $(INC) ${d_path}(+)${s= _base}.iiii =20 - "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i - Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iii ${d_pa= th}(+)${s_base}.i + Trim --asm-file -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i -i $(INC= _LIST) ${src} + "$(PP)" -MMD $(PP_FLAGS) $(INC) $(OUTPUT_DIR)(+)${s_dir}(+)${s_bas= e}.i > ${d_path}(+)${s_base}.ii + Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iiii ${d_p= ath}(+)${s_base}.ii # For RVCTCYGWIN ASM_FLAGS must be first to work around pathing is= sues - "$(ASM)" $(ASM_FLAGS) -o ${dst} $(INC) ${d_path}(+)${s_base}.iii + "$(ASM)" $(ASM_FLAGS) -o ${dst} $(INC) ${d_path}(+)${s_base}.iiii =20 [Assembly-Code-File.COMMON.ARM,Assembly-Code-File.COMMON.AARCH64] # Remove --convert-hex for ARM as it breaks MSFT assemblers ?.asm, ?.Asm, ?.ASM @@ -190,24 +192,27 @@ =20 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj =20 - "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i - Trim --source-code --convert-hex --trim-long -o ${d_path}(+)${s_ba= se}.iii ${d_path}(+)${s_base}.i - "$(ASM)" /Fo${dst} $(ASM_FLAGS) /I${s_path} $(INC) ${d_path}(+)${s= _base}.iii + Trim --asm-file -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i -i $(INC= _LIST) ${src} + "$(PP)" /showIncludes $(PP_FLAGS) $(INC) $(OUTPUT_DIR)(+)${s_dir}(= +)${s_base}.i > ${d_path}(+)${s_base}.ii + Trim --source-code --convert-hex --trim-long -o ${d_path}(+)${s_ba= se}.iiii ${d_path}(+)${s_base}.ii + "$(ASM)" /Fo${dst} $(ASM_FLAGS) /I${s_path} $(INC) ${d_path}(+)${s= _base}.iiii =20 - "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i - Trim --source-code --trim-long -o ${d_path}(+)${s_base}.iii ${d_pa= th}(+)${s_base}.i - "$(ASM)" /Fo${dst} $(ASM_FLAGS) /I${s_path} $(INC) ${d_path}(+)${s= _base}.iii + Trim --asm-file -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i -i $(IN= C_LIST) ${src} + "$(PP)" /showIncludes $(PP_FLAGS) $(INC) $(OUTPUT_DIR)(+)${s_dir}(= +)${s_base}.i > ${d_path}(+)${s_base}.ii + Trim --source-code --trim-long -o ${d_path}(+)${s_base}.iiii ${d_p= ath}(+)${s_base}.ii + "$(ASM)" /Fo${dst} $(ASM_FLAGS) /I${s_path} $(INC) ${d_path}(+)${s= _base}.iiii =20 - "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i - Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iii ${d_pa= th}(+)${s_base}.i + Trim --asm-file -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i -i $(INC= _LIST) ${src} + "$(PP)" -MMD $(PP_FLAGS) $(INC) $(OUTPUT_DIR)(+)${s_dir}(+)${s_bas= e}.i > ${d_path}(+)${s_base}.ii + Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iiii ${d_p= ath}(+)${s_base}.ii # For RVCTCYGWIN ASM_FLAGS must be first to work around pathing is= sues - "$(ASM)" $(ASM_FLAGS) -o ${dst} $(INC) ${d_path}(+)${s_base}.iii + "$(ASM)" $(ASM_FLAGS) -o ${dst} $(INC) ${d_path}(+)${s_base}.iiii =20 [Nasm-Assembly-Code-File.COMMON.COMMON] ?.nasm =20 @@ -215,15 +220,18 @@ $(MAKE_FILE) =20 $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj =20 - - "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i + + "$(PP)" -MMD $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iii ${d_pa= th}(+)${s_base}.i - "$(NASM)" -I${s_path}(+) $(NASM_INC) $(NASM_FLAGS) -o $dst ${d_pat= h}(+)${s_base}.iii - + "$(NASM)" -I${s_path}(+) $(NASM_INC) $(NASM_FLAGS) -o $dst ${d_pat= h}(+)${s_base}.iii -MD ${d_path}(+)${s_base}.iii.d + + "$(PP)" /showIncludes $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_= base}.i + Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iii ${d_pa= th}(+)${s_base}.i + "$(NASM)" -I${s_path}(+) $(NASM_INC) $(NASM_FLAGS) -o $dst ${d_pat= h}(+)${s_base}.iii -MD ${d_path}(+)${s_base}.iii.d [Device-Tree-Source-File] ?.dts =20 @@ -246,12 +254,16 @@ $(MAKE_FILE) =20 $(DEBUG_DIR)(+)${s_dir}(+)${s_base}.c =20 - - "$(VFRPP)" $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_base= }.i + + "$(VFRPP)" -MMD $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s= _base}.i + "$(VFR)" $(VFR_FLAGS) --string-db $(OUTPUT_DIR)(+)$(MODULE_NAME)St= rDefs.hpk --output-directory ${d_path} $(OUTPUT_DIR)(+)${s_base}.i + + + "$(VFRPP)" /showIncludes $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_D= IR)(+)${s_base}.i "$(VFR)" $(VFR_FLAGS) --string-db $(OUTPUT_DIR)(+)$(MODULE_NAME)St= rDefs.hpk --output-directory ${d_path} $(OUTPUT_DIR)(+)${s_base}.i =20 [Object-File] *.obj @@ -413,17 +425,17 @@ =20 $(MAKE_FILE) =20 - Trim --asl-file -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i -i $(INC= _LIST) ${src} + Trim --asl-file --asl-deps -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}= .i -i $(INC_LIST) ${src} "$(ASLPP)" $(ASLPP_FLAGS) $(INC) /I${s_path} $(OUTPUT_DIR)(+)${s_d= ir}(+)${s_base}.i > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii Trim --source-code -l -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii= $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii=20 "$(ASL)" $(ASL_FLAGS) $(ASL_OUTFLAGS)${dst} $(OUTPUT_DIR)(+)${s_di= r}(+)${s_base}.iiii =20 - Trim --asl-file -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i -i $(INC= _LIST) ${src} + Trim --asl-file --asl-deps -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}= .i -i $(INC_LIST) ${src} "$(ASLPP)" $(ASLPP_FLAGS) $(INC) -I${s_path} $(OUTPUT_DIR)(+)${s_d= ir}(+)${s_base}.i > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii Trim --source-code -l -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iiii= $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii=20 "$(ASL)" $(ASL_FLAGS) $(ASL_OUTFLAGS)${dst} $(OUTPUT_DIR)(+)${s_di= r}(+)${s_base}.iiii =20 [C-Code-File.AcpiTable] @@ -435,16 +447,16 @@ =20 $(MAKE_FILE) =20 - "$(ASLCC)" /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLA= GS) $(INC) ${src} + "$(ASLCC)" /showIncludes /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.o= bj $(ASLCC_FLAGS) $(INC) ${src} "$(ASLDLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLD= LINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj "$(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_FLA= GS) $(ASLCC_FLAGS) $(INC) ${src} + "$(ASLCC)" -MMD -c -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(C= C_FLAGS) $(ASLCC_FLAGS) $(INC) ${src} "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLI= NK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $= (GENFW_FLAGS) =20 [Acpi-Table-Code-File] @@ -455,26 +467,26 @@ =20 $(MAKE_FILE) =20 - "$(ASLCC)" /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FLA= GS) $(INC) ${src} + "$(ASLCC)" /showIncludes /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.o= bj $(ASLCC_FLAGS) $(INC) ${src} "$(ASLDLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLD= LINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj "$(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_FLA= GS) $(ASLCC_FLAGS) $(INC) ${src} + "$(ASLCC)" -MMD -c -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(C= C_FLAGS) $(ASLCC_FLAGS) $(INC) ${src} "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLI= NK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(ASLCC_FLAG= S) "$(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_FLA= GS) $(ASLCC_FLAGS) $(INC) ${src} "$(ASLDLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLD= LINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $= (GENFW_FLAGS) =20 =20 - "$(ASLCC)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASLCC_FL= AGS) $(INC) ${src} + "$(ASLCC)" -MMD -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(ASL= CC_FLAGS) $(INC) ${src} "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(ASLDLI= NK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj "$(MTOC)" -subsystem $(MODULE_TYPE) $(MTOC_FLAGS) $(OUTPUT_DIR)(+= )${s_dir}(+)${s_base}.dll $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.pecoff "$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.pecof= f $(GENFW_FLAGS) =20 =20 @@ -517,14 +529,21 @@ $(MAKE_FILE) =20 $(OUTPUT_DIR)(+)${s_base}.bin =20 - - "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i + + "$(PP)" -MMD $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i + Trim --source-code --convert-hex -o ${d_path}(+)${s_base}.iii ${d_= path}(+)${s_base}.i + "$(NASM)" -I${s_path}(+) -l ${d_path}(+)${s_base}.lst $(NASMB_FLAG= S) -o $dst ${d_path}(+)${s_base}.iii -MD ${d_path}(+)${s_base}.iii.d + # copy the output file with .com postfix that be same to the outpu= t file of .asm16 + $(CP) ${dst} $(OUTPUT_DIR)(+)${s_base}.com + + + "$(PP)" /showIncludes $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_= base}.i Trim --source-code --convert-hex -o ${d_path}(+)${s_base}.iii ${d_= path}(+)${s_base}.i - "$(NASM)" -I${s_path}(+) -l ${d_path}(+)${s_base}.lst $(NASMB_FLAG= S) -o $dst ${d_path}(+)${s_base}.iii + "$(NASM)" -I${s_path}(+) -l ${d_path}(+)${s_base}.lst $(NASMB_FLAG= S) -o $dst ${d_path}(+)${s_base}.iii -MD ${d_path}(+)${s_base}.iii.d # copy the output file with .com postfix that be same to the outpu= t file of .asm16 $(CP) ${dst} $(OUTPUT_DIR)(+)${s_base}.com =20 [Microcode-File.USER_DEFINED, Microcode-File.Microcode] diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.t= emplate index dce6c5875a..28b5ccde86 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -462,13 +462,13 @@ NOOPT_VS2008_IA32_DLINK_FLAGS =3D /NOLOGO /NODEFA= ULTLIB /IGNORE:4001 /OPT:REF *_VS2008_X64_DLINK_PATH =3D DEF(VS2008_BINX64)\link.exe *_VS2008_X64_ASLCC_PATH =3D DEF(VS2008_BINX64)\cl.exe *_VS2008_X64_ASLPP_PATH =3D DEF(VS2008_BINX64)\cl.exe *_VS2008_X64_ASLDLINK_PATH =3D DEF(VS2008_BINX64)\link.exe =20 - DEBUG_VS2008_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /MP -RELEASE_VS2008_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /MP -NOOPT_VS2008_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od /MP + DEBUG_VS2008_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 +RELEASE_VS2008_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF +NOOPT_VS2008_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od =20 DEBUG_VS2008_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi RELEASE_VS2008_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd NOOPT_VS2008_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi =20 @@ -546,13 +546,13 @@ NOOPT_VS2008_X64_DLINK_FLAGS =3D /NOLOGO /NODEFAULTL= IB /IGNORE:4001 /OPT:REF /OPT *_VS2008x86_IA32_APP_PATH =3D DEF(VS2008x86_BIN)\cl.exe *_VS2008x86_IA32_PP_PATH =3D DEF(VS2008x86_BIN)\cl.exe *_VS2008x86_IA32_ASM_PATH =3D DEF(VS2008x86_BIN)\ml.exe =20 *_VS2008x86_IA32_MAKE_FLAGS =3D /nologo - DEBUG_VS2008x86_IA32_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /MP -RELEASE_VS2008x86_IA32_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /MP -NOOPT_VS2008x86_IA32_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Od /MP + DEBUG_VS2008x86_IA32_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 +RELEASE_VS2008x86_IA32_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF +NOOPT_VS2008x86_IA32_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Od =20 DEBUG_VS2008x86_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd /Zi RELEASE_VS2008x86_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd NOOPT_VS2008x86_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd /Zi =20 @@ -578,13 +578,13 @@ NOOPT_VS2008x86_IA32_DLINK_FLAGS =3D /NOLOGO /NODEF= AULTLIB /IGNORE:4001 /OPT:REF *_VS2008x86_X64_ASM_PATH =3D DEF(VS2008x86_BINX64)\ml64.exe *_VS2008x86_X64_SLINK_PATH =3D DEF(VS2008x86_BINX64)\lib.exe *_VS2008x86_X64_DLINK_PATH =3D DEF(VS2008x86_BINX64)\link.exe *_VS2008x86_X64_ASLDLINK_PATH =3D DEF(VS2008x86_BINX64)\link.exe =20 - DEBUG_VS2008x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /MP -RELEASE_VS2008x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /MP -NOOPT_VS2008x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od /MP + DEBUG_VS2008x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 +RELEASE_VS2008x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF +NOOPT_VS2008x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od =20 DEBUG_VS2008x86_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi RELEASE_VS2008x86_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd NOOPT_VS2008x86_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi =20 @@ -665,13 +665,13 @@ NOOPT_VS2008x86_X64_DLINK_FLAGS =3D /NOLOGO /NODEF= AULTLIB /IGNORE:4001 /OPT:REF *_VS2010_IA32_ASLCC_PATH =3D DEF(VS2010_BIN)\cl.exe *_VS2010_IA32_ASLPP_PATH =3D DEF(VS2010_BIN)\cl.exe *_VS2010_IA32_ASLDLINK_PATH =3D DEF(VS2010_BIN)\link.exe =20 *_VS2010_IA32_MAKE_FLAGS =3D /nologo - DEBUG_VS2010_IA32_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D = UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /MP -RELEASE_VS2010_IA32_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D = UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /MP -NOOPT_VS2010_IA32_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D = UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Od /MP + DEBUG_VS2010_IA32_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D = UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 +RELEASE_VS2010_IA32_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D = UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF +NOOPT_VS2010_IA32_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D = UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Od =20 DEBUG_VS2010_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd /Zi RELEASE_VS2010_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd NOOPT_VS2010_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd /Zi =20 @@ -697,13 +697,13 @@ NOOPT_VS2010_IA32_DLINK_FLAGS =3D /NOLOGO /NODEFA= ULTLIB /IGNORE:4001 /OPT:REF *_VS2010_X64_DLINK_PATH =3D DEF(VS2010_BINX64)\link.exe *_VS2010_X64_ASLCC_PATH =3D DEF(VS2010_BINX64)\cl.exe *_VS2010_X64_ASLPP_PATH =3D DEF(VS2010_BINX64)\cl.exe *_VS2010_X64_ASLDLINK_PATH =3D DEF(VS2010_BINX64)\link.exe =20 - DEBUG_VS2010_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /MP -RELEASE_VS2010_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /MP -NOOPT_VS2010_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od /MP + DEBUG_VS2010_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 +RELEASE_VS2010_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF +NOOPT_VS2010_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od =20 DEBUG_VS2010_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi RELEASE_VS2010_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd NOOPT_VS2010_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi =20 @@ -781,13 +781,13 @@ NOOPT_VS2010_X64_DLINK_FLAGS =3D /NOLOGO /NODEFAULTL= IB /IGNORE:4001 /OPT:REF /OPT *_VS2010x86_IA32_APP_PATH =3D DEF(VS2010x86_BIN)\cl.exe *_VS2010x86_IA32_PP_PATH =3D DEF(VS2010x86_BIN)\cl.exe *_VS2010x86_IA32_ASM_PATH =3D DEF(VS2010x86_BIN)\ml.exe =20 *_VS2010x86_IA32_MAKE_FLAGS =3D /nologo - DEBUG_VS2010x86_IA32_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /MP -RELEASE_VS2010x86_IA32_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /MP -NOOPT_VS2010x86_IA32_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Od /MP + DEBUG_VS2010x86_IA32_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 +RELEASE_VS2010x86_IA32_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF +NOOPT_VS2010x86_IA32_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Od =20 DEBUG_VS2010x86_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd /Zi RELEASE_VS2010x86_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd NOOPT_VS2010x86_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd /Zi =20 @@ -813,13 +813,13 @@ NOOPT_VS2010x86_IA32_DLINK_FLAGS =3D /NOLOGO /NODEF= AULTLIB /IGNORE:4001 /OPT:REF *_VS2010x86_X64_ASM_PATH =3D DEF(VS2010x86_BINX64)\ml64.exe *_VS2010x86_X64_SLINK_PATH =3D DEF(VS2010x86_BINX64)\lib.exe *_VS2010x86_X64_DLINK_PATH =3D DEF(VS2010x86_BINX64)\link.exe *_VS2010x86_X64_ASLDLINK_PATH =3D DEF(VS2010x86_BINX64)\link.exe =20 - DEBUG_VS2010x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /MP -RELEASE_VS2010x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /MP -NOOPT_VS2010x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od /MP + DEBUG_VS2010x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 +RELEASE_VS2010x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF +NOOPT_VS2010x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od =20 DEBUG_VS2010x86_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi RELEASE_VS2010x86_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd NOOPT_VS2010x86_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi =20 @@ -899,13 +899,13 @@ NOOPT_VS2010x86_X64_DLINK_FLAGS =3D /NOLOGO /NODEF= AULTLIB /IGNORE:4001 /OPT:REF *_VS2012_IA32_ASLCC_PATH =3D DEF(VS2012_BIN)\cl.exe *_VS2012_IA32_ASLPP_PATH =3D DEF(VS2012_BIN)\cl.exe *_VS2012_IA32_ASLDLINK_PATH =3D DEF(VS2012_BIN)\link.exe =20 *_VS2012_IA32_MAKE_FLAGS =3D /nologo - DEBUG_VS2012_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /= Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /MP -RELEASE_VS2012_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /= Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /MP -NOOPT_VS2012_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /= Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Od /MP + DEBUG_VS2012_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /= Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 +RELEASE_VS2012_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /= Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF +NOOPT_VS2012_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /= Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Od =20 DEBUG_VS2012_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd /Zi RELEASE_VS2012_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd NOOPT_VS2012_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd /Zi =20 @@ -931,13 +931,13 @@ NOOPT_VS2012_IA32_DLINK_FLAGS =3D /NOLOGO /NODEFA= ULTLIB /IGNORE:4001 /OPT:REF *_VS2012_X64_DLINK_PATH =3D DEF(VS2012_BINX64)\link.exe *_VS2012_X64_ASLCC_PATH =3D DEF(VS2012_BINX64)\cl.exe *_VS2012_X64_ASLPP_PATH =3D DEF(VS2012_BINX64)\cl.exe *_VS2012_X64_ASLDLINK_PATH =3D DEF(VS2012_BINX64)\link.exe =20 - DEBUG_VS2012_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /MP -RELEASE_VS2012_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /MP -NOOPT_VS2012_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od /MP + DEBUG_VS2012_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 +RELEASE_VS2012_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF +NOOPT_VS2012_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od =20 DEBUG_VS2012_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi RELEASE_VS2012_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd NOOPT_VS2012_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi =20 @@ -1015,13 +1015,13 @@ NOOPT_VS2012_X64_DLINK_FLAGS =3D /NOLOGO /NODEFAUL= TLIB /IGNORE:4001 /OPT:REF /OPT *_VS2012x86_IA32_APP_PATH =3D DEF(VS2012x86_BIN)\cl.exe *_VS2012x86_IA32_PP_PATH =3D DEF(VS2012x86_BIN)\cl.exe *_VS2012x86_IA32_ASM_PATH =3D DEF(VS2012x86_BIN)\ml.exe =20 *_VS2012x86_IA32_MAKE_FLAGS =3D /nologo - DEBUG_VS2012x86_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 = /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /MP -RELEASE_VS2012x86_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 = /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /MP -NOOPT_VS2012x86_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 = /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Od /MP + DEBUG_VS2012x86_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 = /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 +RELEASE_VS2012x86_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 = /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF +NOOPT_VS2012x86_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 = /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Od =20 DEBUG_VS2012x86_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd /Zi RELEASE_VS2012x86_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd NOOPT_VS2012x86_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd /Zi =20 @@ -1047,13 +1047,13 @@ NOOPT_VS2012x86_IA32_DLINK_FLAGS =3D /NOLOGO /NOD= EFAULTLIB /IGNORE:4001 /OPT:REF *_VS2012x86_X64_ASM_PATH =3D DEF(VS2012x86_BINX64)\ml64.exe *_VS2012x86_X64_SLINK_PATH =3D DEF(VS2012x86_BINX64)\lib.exe *_VS2012x86_X64_DLINK_PATH =3D DEF(VS2012x86_BINX64)\link.exe *_VS2012x86_X64_ASLDLINK_PATH =3D DEF(VS2012x86_BINX64)\link.exe =20 - DEBUG_VS2012x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /MP -RELEASE_VS2012x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /MP -NOOPT_VS2012x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od /MP + DEBUG_VS2012x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 +RELEASE_VS2012x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF +NOOPT_VS2012x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od =20 DEBUG_VS2012x86_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi RELEASE_VS2012x86_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd NOOPT_VS2012x86_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi =20 @@ -1133,13 +1133,13 @@ NOOPT_VS2012x86_X64_DLINK_FLAGS =3D /NOLOGO /NOD= EFAULTLIB /IGNORE:4001 /OPT:REF *_VS2013_IA32_ASLCC_PATH =3D DEF(VS2013_BIN)\cl.exe *_VS2013_IA32_ASLPP_PATH =3D DEF(VS2013_BIN)\cl.exe *_VS2013_IA32_ASLDLINK_PATH =3D DEF(VS2013_BIN)\link.exe =20 *_VS2013_IA32_MAKE_FLAGS =3D /nologo - DEBUG_VS2013_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /= Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Gw /MP -RELEASE_VS2013_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /= Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw /MP -NOOPT_VS2013_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /= Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Od /MP + DEBUG_VS2013_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /= Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Gw +RELEASE_VS2013_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /= Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw +NOOPT_VS2013_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /= Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Od =20 DEBUG_VS2013_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd /Zi RELEASE_VS2013_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd NOOPT_VS2013_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd /Zi =20 @@ -1165,13 +1165,13 @@ NOOPT_VS2013_IA32_DLINK_FLAGS =3D /NOLOGO /NODE= FAULTLIB /IGNORE:4001 /OPT:REF *_VS2013_X64_DLINK_PATH =3D DEF(VS2013_BINX64)\link.exe *_VS2013_X64_ASLCC_PATH =3D DEF(VS2013_BINX64)\cl.exe *_VS2013_X64_ASLPP_PATH =3D DEF(VS2013_BINX64)\cl.exe *_VS2013_X64_ASLDLINK_PATH =3D DEF(VS2013_BINX64)\link.exe =20 - DEBUG_VS2013_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Gw /MP -RELEASE_VS2013_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Gw /MP -NOOPT_VS2013_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od /MP + DEBUG_VS2013_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Gw +RELEASE_VS2013_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Gw +NOOPT_VS2013_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od =20 DEBUG_VS2013_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi RELEASE_VS2013_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd NOOPT_VS2013_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi =20 @@ -1249,13 +1249,13 @@ NOOPT_VS2013_X64_DLINK_FLAGS =3D /NOLOGO /NODEFAUL= TLIB /IGNORE:4001 /OPT:REF /OPT *_VS2013x86_IA32_APP_PATH =3D DEF(VS2013x86_BIN)\cl.exe *_VS2013x86_IA32_PP_PATH =3D DEF(VS2013x86_BIN)\cl.exe *_VS2013x86_IA32_ASM_PATH =3D DEF(VS2013x86_BIN)\ml.exe =20 *_VS2013x86_IA32_MAKE_FLAGS =3D /nologo - DEBUG_VS2013x86_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 = /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Gw /MP -RELEASE_VS2013x86_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 = /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw /MP -NOOPT_VS2013x86_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 = /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Od /MP + DEBUG_VS2013x86_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 = /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Gw +RELEASE_VS2013x86_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 = /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw +NOOPT_VS2013x86_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 = /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Od =20 DEBUG_VS2013x86_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd /Zi RELEASE_VS2013x86_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd NOOPT_VS2013x86_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd /Zi =20 @@ -1281,13 +1281,13 @@ NOOPT_VS2013x86_IA32_DLINK_FLAGS =3D /NOLOGO /NOD= EFAULTLIB /IGNORE:4001 /OPT:REF *_VS2013x86_X64_ASM_PATH =3D DEF(VS2013x86_BINX64)\ml64.exe *_VS2013x86_X64_SLINK_PATH =3D DEF(VS2013x86_BINX64)\lib.exe *_VS2013x86_X64_DLINK_PATH =3D DEF(VS2013x86_BINX64)\link.exe *_VS2013x86_X64_ASLDLINK_PATH =3D DEF(VS2013x86_BINX64)\link.exe =20 - DEBUG_VS2013x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Gw /MP -RELEASE_VS2013x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Gw /MP -NOOPT_VS2013x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od /MP + DEBUG_VS2013x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Gw +RELEASE_VS2013x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Gw +NOOPT_VS2013x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od =20 DEBUG_VS2013x86_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi RELEASE_VS2013x86_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd NOOPT_VS2013x86_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi =20 @@ -1368,13 +1368,13 @@ NOOPT_VS2013x86_X64_DLINK_FLAGS =3D /NOLOGO /NOD= EFAULTLIB /IGNORE:4001 /OPT:REF *_VS2015_IA32_ASLCC_PATH =3D DEF(VS2015_BIN)\cl.exe *_VS2015_IA32_ASLPP_PATH =3D DEF(VS2015_BIN)\cl.exe *_VS2015_IA32_ASLDLINK_PATH =3D DEF(VS2015_BIN)\link.exe =20 *_VS2015_IA32_MAKE_FLAGS =3D /nologo - DEBUG_VS2015_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /= Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Gw /MP -RELEASE_VS2015_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /= Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw /MP -NOOPT_VS2015_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /= Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Od /MP + DEBUG_VS2015_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /= Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Gw +RELEASE_VS2015_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /= Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw +NOOPT_VS2015_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /= Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Od =20 DEBUG_VS2015_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd /Zi RELEASE_VS2015_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd NOOPT_VS2015_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd /Zi =20 @@ -1400,13 +1400,13 @@ NOOPT_VS2015_IA32_DLINK_FLAGS =3D /NOLOGO /NODE= FAULTLIB /IGNORE:4001 /OPT:REF *_VS2015_X64_DLINK_PATH =3D DEF(VS2015_BINX64)\link.exe *_VS2015_X64_ASLCC_PATH =3D DEF(VS2015_BINX64)\cl.exe *_VS2015_X64_ASLPP_PATH =3D DEF(VS2015_BINX64)\cl.exe *_VS2015_X64_ASLDLINK_PATH =3D DEF(VS2015_BINX64)\link.exe =20 - DEBUG_VS2015_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Gw /MP -RELEASE_VS2015_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Gw /MP -NOOPT_VS2015_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od /MP + DEBUG_VS2015_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Gw +RELEASE_VS2015_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Gw +NOOPT_VS2015_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od =20 DEBUG_VS2015_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi RELEASE_VS2015_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd NOOPT_VS2015_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi =20 @@ -1485,13 +1485,13 @@ NOOPT_VS2015_X64_DLINK_FLAGS =3D /NOLOGO /NODEFAUL= TLIB /IGNORE:4001 /OPT:REF /OPT *_VS2015x86_IA32_APP_PATH =3D DEF(VS2015x86_BIN)\cl.exe *_VS2015x86_IA32_PP_PATH =3D DEF(VS2015x86_BIN)\cl.exe *_VS2015x86_IA32_ASM_PATH =3D DEF(VS2015x86_BIN)\ml.exe =20 *_VS2015x86_IA32_MAKE_FLAGS =3D /nologo - DEBUG_VS2015x86_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 = /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Gw /MP -RELEASE_VS2015x86_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 = /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw /MP -NOOPT_VS2015x86_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 = /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Od /MP + DEBUG_VS2015x86_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 = /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Gw +RELEASE_VS2015x86_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 = /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw +NOOPT_VS2015x86_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 = /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Od =20 DEBUG_VS2015x86_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd /Zi RELEASE_VS2015x86_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd NOOPT_VS2015x86_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd /Zi =20 @@ -1517,13 +1517,13 @@ NOOPT_VS2015x86_IA32_DLINK_FLAGS =3D /NOLOGO /NOD= EFAULTLIB /IGNORE:4001 /OPT:REF *_VS2015x86_X64_ASM_PATH =3D DEF(VS2015x86_BINX64)\ml64.exe *_VS2015x86_X64_SLINK_PATH =3D DEF(VS2015x86_BINX64)\lib.exe *_VS2015x86_X64_DLINK_PATH =3D DEF(VS2015x86_BINX64)\link.exe *_VS2015x86_X64_ASLDLINK_PATH =3D DEF(VS2015x86_BINX64)\link.exe =20 - DEBUG_VS2015x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Gw /MP -RELEASE_VS2015x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Gw /MP -NOOPT_VS2015x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od /MP + DEBUG_VS2015x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Gw +RELEASE_VS2015x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Gw +NOOPT_VS2015x86_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D= UNICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od =20 DEBUG_VS2015x86_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi RELEASE_VS2015x86_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd NOOPT_VS2015x86_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi =20 @@ -1599,13 +1599,13 @@ NOOPT_VS2015x86_X64_DLINK_FLAGS =3D /NOLOGO /NOD= EFAULTLIB /IGNORE:4001 /OPT:REF *_VS2017_IA32_APP_PATH =3D DEF(VS2017_BIN_IA32)\cl.exe *_VS2017_IA32_PP_PATH =3D DEF(VS2017_BIN_IA32)\cl.exe *_VS2017_IA32_ASM_PATH =3D DEF(VS2017_BIN_IA32)\ml.exe =20 *_VS2017_IA32_MAKE_FLAGS =3D /nologo - DEBUG_VS2017_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /Gs= 32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Gw /MP -RELEASE_VS2017_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /Gs= 32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw /MP -NOOPT_VS2017_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /Gs= 32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Od /MP + DEBUG_VS2017_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /Gs= 32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Gw +RELEASE_VS2017_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /Gs= 32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw +NOOPT_VS2017_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /Gs= 32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Od =20 DEBUG_VS2017_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd /Zi RELEASE_VS2017_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd NOOPT_VS2017_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd /Zi =20 @@ -1629,13 +1629,13 @@ NOOPT_VS2017_IA32_DLINK_FLAGS =3D /NOLOGO /NODEFA= ULTLIB /IGNORE:4001 /OPT:REF /O *_VS2017_X64_ASM_PATH =3D DEF(VS2017_BIN_X64)\ml64.exe *_VS2017_X64_SLINK_PATH =3D DEF(VS2017_BIN_X64)\lib.exe *_VS2017_X64_DLINK_PATH =3D DEF(VS2017_BIN_X64)\link.exe *_VS2017_X64_ASLDLINK_PATH =3D DEF(VS2017_BIN_X64)\link.exe =20 - DEBUG_VS2017_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Gw /MP -RELEASE_VS2017_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Gw /MP -NOOPT_VS2017_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od /MP + DEBUG_VS2017_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Gw +RELEASE_VS2017_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Gw +NOOPT_VS2017_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od =20 DEBUG_VS2017_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi RELEASE_VS2017_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd NOOPT_VS2017_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi =20 @@ -1762,13 +1762,13 @@ NOOPT_VS2017_AARCH64_DLINK_FLAGS =3D /NOLOGO /NOD= EFAULTLIB /IGNORE:4001 /OPT:REF *_VS2019_IA32_APP_PATH =3D DEF(VS2019_BIN_IA32)\cl.exe *_VS2019_IA32_PP_PATH =3D DEF(VS2019_BIN_IA32)\cl.exe *_VS2019_IA32_ASM_PATH =3D DEF(VS2019_BIN_IA32)\ml.exe =20 *_VS2019_IA32_MAKE_FLAGS =3D /nologo - DEBUG_VS2019_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /Gs= 32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Gw /MP -RELEASE_VS2019_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /Gs= 32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw /MP -NOOPT_VS2019_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /Gs= 32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Od /MP + DEBUG_VS2019_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /Gs= 32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Gw +RELEASE_VS2019_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /Gs= 32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw +NOOPT_VS2019_IA32_CC_FLAGS =3D /nologo /arch:IA32 /c /WX /GS- /W4 /Gs= 32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Od =20 DEBUG_VS2019_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd /Zi RELEASE_VS2019_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd NOOPT_VS2019_IA32_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /coff /Zd /Zi =20 @@ -1792,13 +1792,13 @@ NOOPT_VS2019_IA32_DLINK_FLAGS =3D /NOLOGO /NODEFA= ULTLIB /IGNORE:4001 /OPT:REF /O *_VS2019_X64_ASM_PATH =3D DEF(VS2019_BIN_X64)\ml64.exe *_VS2019_X64_SLINK_PATH =3D DEF(VS2019_BIN_X64)\lib.exe *_VS2019_X64_DLINK_PATH =3D DEF(VS2019_BIN_X64)\link.exe *_VS2019_X64_ASLDLINK_PATH =3D DEF(VS2019_BIN_X64)\link.exe =20 - DEBUG_VS2019_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Gw /MP -RELEASE_VS2019_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Gw /MP -NOOPT_VS2019_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od /MP + DEBUG_VS2019_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Gw +RELEASE_VS2019_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Gw +NOOPT_VS2019_X64_CC_FLAGS =3D /nologo /c /WX /GS- /W4 /Gs32768 /D UN= ICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od =20 DEBUG_VS2019_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi RELEASE_VS2019_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd NOOPT_VS2019_X64_ASM_FLAGS =3D /nologo /c /WX /W3 /Cx /Zd /Zi =20 diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/= Python/AutoGen/GenMake.py index 59a01a7f24..b4cd68c989 100755 --- a/BaseTools/Source/Python/AutoGen/GenMake.py +++ b/BaseTools/Source/Python/AutoGen/GenMake.py @@ -183,10 +183,13 @@ class BuildFile(object): EdkLogger.error("build", PARAMETER_INVALID, "Invalid build typ= e [%s]" % FileType, ExtraData=3D"[%s]" % str(self._AutoGenObject)) self._FileType =3D FileType FileContent =3D self._TEMPLATE_.Replace(self._TemplateDict) FileName =3D self._FILE_NAME_[FileType] + if not os.path.exists(os.path.join(self._AutoGenObject.MakeFileDir= , "deps.txt")): + with open(os.path.join(self._AutoGenObject.MakeFileDir, "deps.= txt"),"w+") as fd: + fd.write("COMMON_DEPS =3D \n") return SaveFileOnChange(os.path.join(self._AutoGenObject.MakeFileD= ir, FileName), FileContent, False) =20 ## Return a list of directory creation command string # # @param DirList The list of directory to be created @@ -302,12 +305,11 @@ MAKE_FILE =3D ${makefile_path} # Build Macro # ${BEGIN}${file_macro} ${END} =20 -COMMON_DEPS =3D ${BEGIN}${common_dependency_file} \\ - ${END} +${INCLUDETAG} =20 # # Overridable Target Macro Definitions # FORCE_REBUILD =3D force_build @@ -588,14 +590,13 @@ cleanlib: "source_file" : Includ= ePathList } ) FileMacroList.append(FileMacro) # Add support when compiling .nasm source files - for File in self.FileCache.keys(): - if not str(File).endswith('.nasm'): - continue - IncludePathList =3D [] + IncludePathList =3D [] + asmsource =3D [item for item in MyAgo.SourceFileList if item.File.= upper().endswith((".NASM",".ASM"))] + if asmsource: for P in MyAgo.IncludePathList: IncludePath =3D self._INC_FLAG_['NASM'] + self.PlaceMacro(= P, self.Macros) if IncludePath.endswith(os.sep): IncludePath =3D IncludePath.rstrip(os.sep) # When compiling .nasm files, need to add a literal backsl= ash at each path @@ -604,11 +605,10 @@ cleanlib: IncludePath =3D ''.join([IncludePath, '^', os.sep]) else: IncludePath =3D os.path.join(IncludePath, '') IncludePathList.append(IncludePath) FileMacroList.append(self._FILE_MACRO_TEMPLATE.Replace({"macro= _name": "NASM_INC", "source_file": IncludePathList})) - break =20 # Generate macros used to represent files containing list of input= files for ListFileMacro in self.ListFileMacros: ListFileName =3D os.path.join(MyAgo.OutputDir, "%s.lst" % List= FileMacro.lower()[:len(ListFileMacro) - 5]) FileMacroList.append("%s =3D %s" % (ListFileMacro, ListFileNam= e)) @@ -694,10 +694,11 @@ cleanlib: "dependent_library_build_directory" : self.LibraryBuildDirecto= ryList, "library_build_command" : LibraryMakeCommandList, "file_macro" : FileMacroList, "file_build_target" : self.BuildTargetList, "backward_compatible_target": BcTargetList, + "INCLUDETAG" : self._INCLUDE_CMD_[self._File= Type] + " " + os.path.join("$(MODULE_BUILD_DIR)","deps.txt") } =20 return MakefileTemplateDict =20 def ParserGenerateFfsCmd(self): @@ -901,20 +902,14 @@ cleanlib: if OutPutFileList: for Item in OutPutFileList: if Item in SourceFileList: SourceFileList.remove(Item) =20 - FileDependencyDict =3D self.GetFileDependency( - SourceFileList, - ForceIncludedFile, - self._AutoGenObject.IncludePathList + = self._AutoGenObject.BuildOptionIncPathList - ) + FileDependencyDict =3D {item:ForceIncludedFile for item in SourceF= ileList} =20 - - if FileDependencyDict: - for Dependency in FileDependencyDict.values(): - self.DependencyHeaderFileSet.update(set(Dependency)) + for Dependency in FileDependencyDict.values(): + self.DependencyHeaderFileSet.update(set(Dependency)) =20 # Get a set of unique package includes from MetaFile parentMetaFileIncludes =3D set() for aInclude in self._AutoGenObject.PackageIncludePathList: aIncludeName =3D str(aInclude) @@ -970,46 +965,22 @@ cleanlib: GlobalData.gModuleBuildTracking[self._AutoGenObject] =3D '= FAIL_METAFILE' EdkLogger.warn("build","Module MetaFile [Sources] is missing l= ocal header!", ExtraData =3D "Local Header: " + aFile + " not fou= nd in " + self._AutoGenObject.MetaFile.Path ) =20 - DepSet =3D None for File,Dependency in FileDependencyDict.items(): if not Dependency: - FileDependencyDict[File] =3D ['$(FORCE_REBUILD)'] + FileDependencyDict[File] =3D ["$(COMMON_DEPS)"] continue + FileDependencyDict[File] =3D ["$(COMMON_DEPS)"] =20 self._AutoGenObject.AutoGenDepSet |=3D set(Dependency) =20 - # skip non-C files - if File.Ext not in [".c", ".C"] or File.Name =3D=3D "AutoGen.c= ": - continue - elif DepSet is None: - DepSet =3D set(Dependency) - else: - DepSet &=3D set(Dependency) - # in case nothing in SourceFileList - if DepSet is None: - DepSet =3D set() - # - # Extract common files list in the dependency files - # - for File in DepSet: - self.CommonFileDependency.append(self.PlaceMacro(File.Path, se= lf.Macros)) - CmdSumDict =3D {} CmdTargetDict =3D {} CmdCppDict =3D {} DependencyDict =3D FileDependencyDict.copy() - for File in FileDependencyDict: - # skip non-C files - if File.Ext not in [".c", ".C"] or File.Name =3D=3D "AutoGen.c= ": - continue - NewDepSet =3D set(FileDependencyDict[File]) - NewDepSet -=3D DepSet - FileDependencyDict[File] =3D ["$(COMMON_DEPS)"] + list(NewDepS= et) - DependencyDict[File] =3D list(NewDepSet) =20 # Convert target description object to target string in makefile if self._AutoGenObject.BuildRuleFamily =3D=3D TAB_COMPILER_MSFT an= d TAB_C_CODE_FILE in self._AutoGenObject.Targets: for T in self._AutoGenObject.Targets[TAB_C_CODE_FILE]: NewFile =3D self.PlaceMacro(str(T), self.Macros) @@ -1078,21 +1049,17 @@ cleanlib: if CmdCppDict.get(item.Target.SubDir): CmdCppDict[item.Target.SubDir].append(Path) else: CmdCppDict[item.Target.SubDir] =3D ['$(MAKE_FILE)'= , Path] if CppPath.Path in DependencyDict: - if '$(FORCE_REBUILD)' in DependencyDict[CppPath.Pa= th]: - if '$(FORCE_REBUILD)' not in (self.CommonFileD= ependency + CmdCppDict[item.Target.SubDir]): - CmdCppDict[item.Target.SubDir].append('$(F= ORCE_REBUILD)') - else: - for Temp in DependencyDict[CppPath.Path]: - try: - Path =3D self.PlaceMacro(Temp.Path, se= lf.Macros) - except: - continue - if Path not in (self.CommonFileDependency = + CmdCppDict[item.Target.SubDir]): - CmdCppDict[item.Target.SubDir].append(= Path) + for Temp in DependencyDict[CppPath.Path]: + try: + Path =3D self.PlaceMacro(Temp.Path, self.M= acros) + except: + continue + if Path not in (self.CommonFileDependency + Cm= dCppDict[item.Target.SubDir]): + CmdCppDict[item.Target.SubDir].append(Path) if T.Commands: CommandList =3D T.Commands[:] for Item in CommandList[:]: SingleCommandList =3D Item.split() if len(SingleCommandList) > 0 and self.CheckCCCmd(SingleCo= mmandList): diff --git a/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py b/BaseTools= /Source/Python/AutoGen/IncludesAutoGen.py new file mode 100644 index 0000000000..c64a75e8e4 --- /dev/null +++ b/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py @@ -0,0 +1,99 @@ +## @file +# Build cache intermediate result and state +# +# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent +# +from Common.caching import cached_property +import Common.EdkLogger as EdkLogger +import Common.LongFilePathOs as os +from Common.BuildToolError import * +from Common.Misc import SaveFileOnChange + +gIsFileMap =3D {} +class IncludesAutoGen(): + def __init__(self, makefile_folder, ModuleAuto): + self.d_folder =3D makefile_folder + self.makefile_folder =3D makefile_folder + self.module_autogen =3D ModuleAuto + self.ToolChainFamily =3D ModuleAuto.ToolChainFamily + self.workspace =3D ModuleAuto.WorkspaceDir + def CreateCommenDeps(self): + SaveFileOnChange(os.path.join(self.makefile_folder,"deps.txt"),"\n= ".join(self.DepsCollection),False) + + @cached_property + def DepsCollection(self): + includes =3D set() + + for root, _, files in os.walk(self.d_folder, topdown=3DFalse): + for name in files: + if not name.endswith(".d"): + continue + abspath =3D os.path.join(root, name) + try: + with open(abspath,"r") as fd: + lines =3D fd.readlines() + for item in lines: + linestr =3D item.strip("\\ : \n") + if not linestr: + continue + if os.path.normpath(linestr +".d") =3D=3D abspath: + continue + filename =3D os.path.basename(linestr).strip() + if filename in self.SourceFileList: + continue + if filename in self.TargetFileList: + continue + if filename.endswith(".o") and filename+"bj" in se= lf.TargetFileList: + continue + includes.add(linestr.strip()) + except Exception as e: + EdkLogger.error("build",FILE_NOT_FOUND, "%s doesn't ex= ist" % abspath, ExtraData=3Dstr(e), RaiseError=3DFalse) + continue + rt =3D sorted(list(set([" "+item.strip("\\ \n") + " \\" for i= tem in includes]))) + if rt: + rt[-1] =3D rt[-1].rstrip(" \\") + rt.insert(0,'COMMON_DEPS =3D \\') + return rt + @cached_property + def SourceFileList(self): + source =3D [os.path.basename(item.File) for item in self.module_au= togen.SourceFileList] + middle_file =3D [] + for afile in source: + if afile.upper().endswith(".VFR"): + middle_file.append(afile.split(".")[0]+".c") + if afile.upper().endswith((".S","ASM")): + middle_file.append(afile.split(".")[0]+".i") + if afile.upper().endswith(".ASL"): + middle_file.append(afile.split(".")[0]+".i") + source.append("AutoGen.c") + source.extend(middle_file) + return source + @cached_property + def TargetFileList(self): + targets =3D set() + targets.add("AutoGen.obj") + for item in self.module_autogen.Targets.values(): + for block in item: + targets.add(block.Target.Name) + return targets + def CreateDepsFileForWin(self, DepList): + if not DepList: + return + ModuleDepDict =3D {} + current_source =3D "" + for line in DepList: + if line.strip() in self.SourceFileList: + current_source =3D line.strip() + ModuleDepDict[current_source] =3D [] + elif "Note: including file:" =3D=3D line.lstrip()[:21]: + if not current_source: + EdkLogger.error("build",BUILD_ERROR, "Parse /showInclu= des output failed. line: %s. \n" % line, RaiseError=3DFalse) + else: + ModuleDepDict[current_source].append(line.lstrip()[22:= ].strip()) + else: + current_source =3D "" + + for source in ModuleDepDict: + dep_file_name =3D source + ".d" + SaveFileOnChange(os.path.join(self.makefile_folder,dep_file_na= me)," \\\n".join(ModuleDepDict[source]),False) diff --git a/BaseTools/Source/Python/Trim/Trim.py b/BaseTools/Source/Python= /Trim/Trim.py index 24c3fafa76..593de12d39 100644 --- a/BaseTools/Source/Python/Trim/Trim.py +++ b/BaseTools/Source/Python/Trim/Trim.py @@ -54,10 +54,14 @@ gLongNumberPattern =3D re.compile("(?<=3D[^a-zA-Z0-9_])= (0[xX][0-9a-fA-F]+|[0-9]+)U?L gAslIncludePattern =3D re.compile("^(\s*)[iI]nclude\s*\(\"?([^\"\(\)]+)\"\= )", re.MULTILINE) ## Regular expression for matching C style #include "XXX.asl" in asl file gAslCIncludePattern =3D re.compile(r'^(\s*)#include\s*[<"]\s*([-\\/\w.]+)\= s*([>"])', re.MULTILINE) ## Patterns used to convert EDK conventions to EDK2 ECP conventions =20 +## Regular expression for finding header file inclusions +gIncludePattern =3D re.compile(r"^[ \t]*[#%]?[ \t]*include(?:[ \t]*(?:\\(?= :\r\n|\r|\n))*[ \t]*)*(?:\(?[\"<]?[ \t]*)([-\w.\\/() \t]+)(?:[ \t]*[\">]?\)= ?)", re.MULTILINE | re.UNICODE | re.IGNORECASE) + + ## file cache to avoid circular include in ASL file gIncludedAslFile =3D [] =20 ## Trim preprocessed source code # @@ -251,13 +255,14 @@ def TrimPreprocessedVfr(Source, Target): # @param IncludePathList The list of external include file # @param LocalSearchPath If LocalSearchPath is specified, this path wil= l be searched # first for the included file; otherwise, only t= he path specified # in the IncludePathList will be searched. # -def DoInclude(Source, Indent=3D'', IncludePathList=3D[], LocalSearchPath= =3DNone): +def DoInclude(Source, Indent=3D'', IncludePathList=3D[], LocalSearchPath= =3DNone, IncludeFileList =3D None, filetype=3DNone): NewFileContent =3D [] - + if IncludeFileList is None: + IncludeFileList =3D [] try: # # Search LocalSearchPath first if it is specified. # if LocalSearchPath: @@ -286,28 +291,41 @@ def DoInclude(Source, Indent=3D'', IncludePathList=3D= [], LocalSearchPath=3DNone): if IncludeFile in gIncludedAslFile: EdkLogger.warn("Trim", "Circular include", ExtraData=3D "%s -> %s" % (" -> ".join(gIncludedAsl= File), IncludeFile)) return [] gIncludedAslFile.append(IncludeFile) - + IncludeFileList.append(IncludeFile.strip()) for Line in F: LocalSearchPath =3D None - Result =3D gAslIncludePattern.findall(Line) - if len(Result) =3D=3D 0: - Result =3D gAslCIncludePattern.findall(Line) - if len(Result) =3D=3D 0 or os.path.splitext(Result[0][1])[1].l= ower() not in [".asl", ".asi"]: + if filetype =3D=3D "ASL": + Result =3D gAslIncludePattern.findall(Line) + if len(Result) =3D=3D 0: + Result =3D gAslCIncludePattern.findall(Line) + if len(Result) =3D=3D 0 or os.path.splitext(Result[0][1])[= 1].lower() not in [".asl", ".asi"]: + NewFileContent.append("%s%s" % (Indent, Line)) + continue + # + # We should first search the local directory if current fi= le are using pattern #include "XXX" + # + if Result[0][2] =3D=3D '"': + LocalSearchPath =3D os.path.dirname(IncludeFile) + CurrentIndent =3D Indent + Result[0][0] + IncludedFile =3D Result[0][1] + NewFileContent.extend(DoInclude(IncludedFile, CurrentIndent, I= ncludePathList, LocalSearchPath,IncludeFileList,filetype)) + NewFileContent.append("\n") + elif filetype =3D=3D "ASM": + Result =3D gIncludePattern.findall(Line) + if len(Result) =3D=3D 0: NewFileContent.append("%s%s" % (Indent, Line)) continue - # - # We should first search the local directory if current file a= re using pattern #include "XXX" - # - if Result[0][2] =3D=3D '"': - LocalSearchPath =3D os.path.dirname(IncludeFile) - CurrentIndent =3D Indent + Result[0][0] - IncludedFile =3D Result[0][1] - NewFileContent.extend(DoInclude(IncludedFile, CurrentIndent, Inclu= dePathList, LocalSearchPath)) - NewFileContent.append("\n") + + IncludedFile =3D Result[0] + + IncludedFile =3D IncludedFile.strip() + IncludedFile =3D os.path.normpath(IncludedFile) + NewFileContent.extend(DoInclude(IncludedFile, '', IncludePathL= ist, LocalSearchPath,IncludeFileList,filetype)) + NewFileContent.append("\n") =20 gIncludedAslFile.pop() =20 return NewFileContent =20 @@ -318,22 +336,21 @@ def DoInclude(Source, Indent=3D'', IncludePathList=3D= [], LocalSearchPath=3DNone): # # @param Source File to be trimmed # @param Target File to store the trimmed content # @param IncludePathFile The file to log the external include path # -def TrimAslFile(Source, Target, IncludePathFile): +def TrimAslFile(Source, Target, IncludePathFile,AslDeps =3D False): CreateDirectory(os.path.dirname(Target)) =20 SourceDir =3D os.path.dirname(Source) if SourceDir =3D=3D '': SourceDir =3D '.' =20 # # Add source directory as the first search directory # IncludePathList =3D [SourceDir] - # # If additional include path file is specified, append them all # to the search directory list. # if IncludePathFile: @@ -347,12 +364,14 @@ def TrimAslFile(Source, Target, IncludePathFile): IncludePathList.append(Line[2:].strip()) else: EdkLogger.warn("Trim", "Invalid include line in includ= e list file.", IncludePathFile, LineNum) except: EdkLogger.error("Trim", FILE_OPEN_FAILURE, ExtraData=3DInclude= PathFile) - - Lines =3D DoInclude(Source, '', IncludePathList) + AslIncludes =3D [] + Lines =3D DoInclude(Source, '', IncludePathList,IncludeFileList=3DAslI= ncludes,filetype=3D'ASL') + if AslDeps: + SaveFileOnChange(Target+".d", "\n".join(AslIncludes),False) =20 # # Undef MIN and MAX to avoid collision in ASL source code # Lines.insert(0, "#undef MIN\n#undef MAX\n") @@ -362,10 +381,56 @@ def TrimAslFile(Source, Target, IncludePathFile): with open(Target, 'w') as File: File.writelines(Lines) except: EdkLogger.error("Trim", FILE_OPEN_FAILURE, ExtraData=3DTarget) =20 +## Trim ASM file +# +# Output ASM include statement with the content the included file +# +# @param Source File to be trimmed +# @param Target File to store the trimmed content +# @param IncludePathFile The file to log the external include path +# +def TrimAsmFile(Source, Target, IncludePathFile): + CreateDirectory(os.path.dirname(Target)) + + SourceDir =3D os.path.dirname(Source) + if SourceDir =3D=3D '': + SourceDir =3D '.' + + # + # Add source directory as the first search directory + # + IncludePathList =3D [SourceDir] + # + # If additional include path file is specified, append them all + # to the search directory list. + # + if IncludePathFile: + try: + LineNum =3D 0 + with open(IncludePathFile, 'r') as File: + FileLines =3D File.readlines() + for Line in FileLines: + LineNum +=3D 1 + if Line.startswith("/I") or Line.startswith ("-I"): + IncludePathList.append(Line[2:].strip()) + else: + EdkLogger.warn("Trim", "Invalid include line in includ= e list file.", IncludePathFile, LineNum) + except: + EdkLogger.error("Trim", FILE_OPEN_FAILURE, ExtraData=3DInclude= PathFile) + AsmIncludes =3D [] + Lines =3D DoInclude(Source, '', IncludePathList,IncludeFileList=3DAsmI= ncludes,filetype=3D'ASM') + SaveFileOnChange(Target+".d", "\n".join(AsmIncludes),False) + # save all lines trimmed + try: + with open(Target, 'w') as File: + File.writelines(Lines) + except: + EdkLogger.error("Trim", FILE_OPEN_FAILURE, ExtraData=3DTarget) + def GenerateVfrBinSec(ModuleName, DebugDir, OutputFile): VfrNameList =3D [] if os.path.isdir(DebugDir): for CurrentDir, Dirs, Files in os.walk(DebugDir): for FileName in Files: @@ -438,12 +503,16 @@ def Options(): help=3D"The input file is preprocessed source co= de, including C or assembly code"), make_option("-r", "--vfr-file", dest=3D"FileType", const=3D"Vfr", = action=3D"store_const", help=3D"The input file is preprocessed VFR file"= ), make_option("--Vfr-Uni-Offset", dest=3D"FileType", const=3D"VfrOff= setBin", action=3D"store_const", help=3D"The input file is EFI image"), + make_option("--asl-deps", dest=3D"AslDeps", const=3D"True", action= =3D"store_const", + help=3D"Generate Asl dependent files."), make_option("-a", "--asl-file", dest=3D"FileType", const=3D"Asl", = action=3D"store_const", help=3D"The input file is ASL file"), + make_option( "--asm-file", dest=3D"FileType", const=3D"Asm", actio= n=3D"store_const", + help=3D"The input file is asm file"), make_option("-c", "--convert-hex", dest=3D"ConvertHex", action=3D"= store_true", help=3D"Convert standard hex format (0xabcd) to = MASM format (abcdh)"), =20 make_option("-l", "--trim-long", dest=3D"TrimLong", action=3D"stor= e_true", help=3D"Remove postfix of long number"), @@ -513,13 +582,15 @@ def Main(): CommandOptions.OutputFile =3D os.path.splitext(InputFile)[= 0] + '.iii' TrimPreprocessedVfr(InputFile, CommandOptions.OutputFile) elif CommandOptions.FileType =3D=3D "Asl": if CommandOptions.OutputFile is None: CommandOptions.OutputFile =3D os.path.splitext(InputFile)[= 0] + '.iii' - TrimAslFile(InputFile, CommandOptions.OutputFile, CommandOptio= ns.IncludePathFile) + TrimAslFile(InputFile, CommandOptions.OutputFile, CommandOptio= ns.IncludePathFile,CommandOptions.AslDeps) elif CommandOptions.FileType =3D=3D "VfrOffsetBin": GenerateVfrBinSec(CommandOptions.ModuleName, CommandOptions.De= bugDir, CommandOptions.OutputFile) + elif CommandOptions.FileType =3D=3D "Asm": + TrimAsmFile(InputFile, CommandOptions.OutputFile, CommandOptio= ns.IncludePathFile) else : if CommandOptions.OutputFile is None: CommandOptions.OutputFile =3D os.path.splitext(InputFile)[= 0] + '.iii' TrimPreprocessedFile(InputFile, CommandOptions.OutputFile, Com= mandOptions.ConvertHex, CommandOptions.TrimLong) except FatalError as X: diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Pyth= on/build/build.py index bcd832c525..8668aa315e 100755 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -55,11 +55,11 @@ from GenFds.GenFds import GenFds, GenFdsApi import multiprocessing as mp from multiprocessing import Manager from AutoGen.DataPipe import MemoryDataPipe from AutoGen.ModuleAutoGenHelper import WorkSpaceInfo, PlatformInfo from GenFds.FdfParser import FdfParser - +from AutoGen.IncludesAutoGen import IncludesAutoGen =20 ## standard targets of build command gSupportedTarget =3D ['all', 'genc', 'genmake', 'modules', 'libraries', 'f= ds', 'clean', 'cleanall', 'cleanlib', 'run'] =20 ## build configuration file @@ -173,33 +173,46 @@ def NormFile(FilePath, Workspace): # # @param From The stream message read from # @param To The stream message put on # @param ExitFlag The flag used to indicate stopping reading # -def ReadMessage(From, To, ExitFlag): +def ReadMessage(From, To, ExitFlag,MemTo=3DNone): while True: # read one line a time Line =3D From.readline() # empty string means "end" if Line is not None and Line !=3D b"": - To(Line.rstrip().decode(encoding=3D'utf-8', errors=3D'ignore')) + LineStr =3D Line.rstrip().decode(encoding=3D'utf-8', errors=3D= 'ignore') + if MemTo is not None: + if "Note: including file:" =3D=3D LineStr.lstrip()[:21]: + MemTo.append(LineStr) + else: + To(LineStr) + MemTo.append(LineStr) + else: + To(LineStr) else: break if ExitFlag.isSet(): break =20 +class MakeSubProc(Popen): + def __init__(self,*args, **argv): + super(MakeSubProc,self).__init__(*args, **argv) + self.ProcOut =3D [] + ## Launch an external program # # This method will call subprocess.Popen to execute an external program wi= th # given options in specified directory. Because of the dead-lock issue dur= ing # redirecting output of the external program, threads are used to to do the # redirection work. # # @param Command A list or string containing the call of th= e program # @param WorkingDir The directory in which the program will be= running # -def LaunchCommand(Command, WorkingDir): +def LaunchCommand(Command, WorkingDir,ModuleAuto =3D None): BeginTime =3D time.time() # if working directory doesn't exist, Popen() will raise an exception if not os.path.isdir(WorkingDir): EdkLogger.error("build", FILE_NOT_FOUND, ExtraData=3DWorkingDir) =20 @@ -214,23 +227,23 @@ def LaunchCommand(Command, WorkingDir): =20 Proc =3D None EndOfProcedure =3D None try: # launch the command - Proc =3D Popen(Command, stdout=3DPIPE, stderr=3DPIPE, env=3Dos.env= iron, cwd=3DWorkingDir, bufsize=3D-1, shell=3DTrue) + Proc =3D MakeSubProc(Command, stdout=3DPIPE, stderr=3DPIPE, env=3D= os.environ, cwd=3DWorkingDir, bufsize=3D-1, shell=3DTrue) =20 # launch two threads to read the STDOUT and STDERR EndOfProcedure =3D Event() EndOfProcedure.clear() if Proc.stdout: - StdOutThread =3D Thread(target=3DReadMessage, args=3D(Proc.std= out, EdkLogger.info, EndOfProcedure)) + StdOutThread =3D Thread(target=3DReadMessage, args=3D(Proc.std= out, EdkLogger.info, EndOfProcedure,Proc.ProcOut)) StdOutThread.setName("STDOUT-Redirector") StdOutThread.setDaemon(False) StdOutThread.start() =20 if Proc.stderr: - StdErrThread =3D Thread(target=3DReadMessage, args=3D(Proc.std= err, EdkLogger.quiet, EndOfProcedure)) + StdErrThread =3D Thread(target=3DReadMessage, args=3D(Proc.std= err, EdkLogger.quiet, EndOfProcedure,Proc.ProcOut)) StdErrThread.setName("STDERR-Redirector") StdErrThread.setDaemon(False) StdErrThread.start() =20 # waiting for program exit @@ -261,10 +274,14 @@ def LaunchCommand(Command, WorkingDir): RespContent =3D f.read() f.close() EdkLogger.info(RespContent) =20 EdkLogger.error("build", COMMAND_FAILURE, ExtraData=3D"%s [%s]" % = (Command, WorkingDir)) + if ModuleAuto: + iau =3D IncludesAutoGen(WorkingDir,ModuleAuto) + iau.CreateDepsFileForWin(Proc.ProcOut) + iau.CreateCommenDeps() return "%dms" % (int(round((time.time() - BeginTime) * 1000))) =20 ## The smallest unit that can be built in multi-thread build mode # # This is the base class of build unit. The "Obj" parameter must provide @@ -606,11 +623,11 @@ class BuildTask: # @param Command A list or string contains the call of = the command # @param WorkingDir The directory in which the program wil= l be running # def _CommandThread(self, Command, WorkingDir): try: - self.BuildItem.BuildObject.BuildTime =3D LaunchCommand(Command= , WorkingDir) + self.BuildItem.BuildObject.BuildTime =3D LaunchCommand(Command= , WorkingDir,self.BuildItem.BuildObject) self.CompleteFlag =3D True =20 # Run hash operation post dependency, to account for libs if GlobalData.gUseHashCache and self.BuildItem.BuildObject.IsL= ibrary: HashFile =3D path.join(self.BuildItem.BuildObject.BuildDir= , self.BuildItem.BuildObject.Name + ".hash") @@ -1274,23 +1291,36 @@ class Build(): self.BuildModules =3D [] return True =20 # build library if Target =3D=3D 'libraries': - for Lib in AutoGenObject.LibraryBuildDirectoryList: + DirList =3D [] + for Lib in AutoGenObject.LibraryAutoGenList: + if not Lib.IsBinaryModule: + DirList.append((os.path.join(AutoGenObject.BuildDir, L= ib.BuildDir),Lib)) + for Lib, LibAutoGen in DirList: NewBuildCommand =3D BuildCommand + ['-f', os.path.normpath= (os.path.join(Lib, makefile)), 'pbuild'] - LaunchCommand(NewBuildCommand, AutoGenObject.MakeFileDir) + LaunchCommand(NewBuildCommand, AutoGenObject.MakeFileDir,L= ibAutoGen) return True =20 # build module if Target =3D=3D 'modules': - for Lib in AutoGenObject.LibraryBuildDirectoryList: + DirList =3D [] + for Lib in AutoGenObject.LibraryAutoGenList: + if not Lib.IsBinaryModule: + DirList.append((os.path.join(AutoGenObject.BuildDir, L= ib.BuildDir),Lib)) + for Lib, LibAutoGen in DirList: NewBuildCommand =3D BuildCommand + ['-f', os.path.normpath= (os.path.join(Lib, makefile)), 'pbuild'] - LaunchCommand(NewBuildCommand, AutoGenObject.MakeFileDir) - for Mod in AutoGenObject.ModuleBuildDirectoryList: + LaunchCommand(NewBuildCommand, AutoGenObject.MakeFileDir,L= ibAutoGen) + + DirList =3D [] + for ModuleAutoGen in AutoGenObject.ModuleAutoGenList: + if not ModuleAutoGen.IsBinaryModule: + DirList.append((os.path.join(AutoGenObject.BuildDir, M= oduleAutoGen.BuildDir),ModuleAutoGen)) + for Mod,ModAutoGen in DirList: NewBuildCommand =3D BuildCommand + ['-f', os.path.normpath= (os.path.join(Mod, makefile)), 'pbuild'] - LaunchCommand(NewBuildCommand, AutoGenObject.MakeFileDir) + LaunchCommand(NewBuildCommand, AutoGenObject.MakeFileDir,M= odAutoGen) self.CreateAsBuiltInf() if GlobalData.gBinCacheDest: self.UpdateBuildCache() self.BuildModules =3D [] return True --=20 2.20.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#49548): https://edk2.groups.io/g/devel/message/49548 Mute This Topic: https://groups.io/mt/38877549/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-