From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out02.mta.xmission.com (out02.mta.xmission.com [166.70.13.232]) by mx.groups.io with SMTP id smtpd.web11.36982.1620061166481567131 for ; Mon, 03 May 2021 09:59:26 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bsdio.com header.s=xmission header.b=cvsgeGFY; spf=none, err=SPF record not found (domain: bsdio.com, ip: 166.70.13.232, mailfrom: rebecca@bsdio.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=bsdio.com; s=xmission; h=Subject:Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Sender:Reply-To:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe :List-Post:List-Owner:List-Archive; bh=14kGPdoi2aW+UibNGp63rAa/+t+nHJNcV016AZEGCAA=; b=cvsgeGFYrTQIrO5NJs67MZrc07 ORiIXdYFPUWQ2pxY0IFnWbCnHwUBD28cu1M+lU1M9LKYhWDMYwGrqyPloyiGqBUafXsOrAnrFYQT3 hcd/4Jh8U+jBLE3/9K02LixRLM0E7bKweoE4LdaoR3tKRXm38bq6vXy8HDEbYUvHNjo8=; Received: from in02.mta.xmission.com ([166.70.13.52]) by out02.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1ldbul-00GeUr-5v; Mon, 03 May 2021 10:59:24 -0600 Received: from mta5.zcs.xmission.com ([166.70.13.69]) by in02.mta.xmission.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1ldbuj-00DYyW-8d; Mon, 03 May 2021 10:59:22 -0600 Received: from localhost (localhost [127.0.0.1]) by mta5.zcs.xmission.com (Postfix) with ESMTP id F19141280CAD; Mon, 3 May 2021 10:59:20 -0600 (MDT) X-Amavis-Modified: Mail body modified (using disclaimer) - mta5.zcs.xmission.com Received: from mta5.zcs.xmission.com ([127.0.0.1]) by localhost (mta5.zcs.xmission.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id kLye4-nBO-RL; Mon, 3 May 2021 10:59:20 -0600 (MDT) Received: from photon.int.bluestop.org (c-174-52-16-57.hsd1.ut.comcast.net [174.52.16.57]) by mta5.zcs.xmission.com (Postfix) with ESMTPSA id A84E91280CEA; Mon, 3 May 2021 10:59:20 -0600 (MDT) To: devel@edk2.groups.io, michael.d.kinney@intel.com Cc: Bob Feng , Liming Gao , Yuwei Chen , Ray Ni , Steven Shi References: <20210501170241.1185-1-michael.d.kinney@intel.com> From: "Rebecca Cran" Message-ID: <2ac2282f-d43c-3c74-670b-658c0f0d7afa@bsdio.com> Date: Mon, 3 May 2021 10:59:20 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <20210501170241.1185-1-michael.d.kinney@intel.com> X-XM-SPF: eid=1ldbuj-00DYyW-8d;;;mid=<2ac2282f-d43c-3c74-670b-658c0f0d7afa@bsdio.com>;;;hst=in02.mta.xmission.com;;;ip=166.70.13.69;;;frm=rebecca@bsdio.com;;;spf=none X-SA-Exim-Connect-IP: 166.70.13.69 X-SA-Exim-Mail-From: rebecca@bsdio.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on sa06.xmission.com X-Spam-Level: ** X-Spam-Status: No, score=2.3 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,NICE_REPLY_A,T_TM2_M_HEADER_IN_MSG,T_TooManySym_01, TooManyTo_001,XMNoVowels,XMSubLong autolearn=disabled version=3.4.2 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * 0.3 TooManyTo_001 Multiple "To" Header Recipients 2x (uncommon) * 1.5 XMNoVowels Alpha-numberic number with no vowels * 0.7 XMSubLong Long Subject * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa06 1397; IP=ok Body=1 Fuz1=1] [Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject * -0.0 NICE_REPLY_A Looks like a legit reply (A) X-Spam-DCC: XMission; sa06 1397; IP=ok Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: **;devel@edk2.groups.io, michael.d.kinney@intel.com X-Spam-Relay-Country: X-Spam-Timing: total 1391 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 11 (0.8%), b_tie_ro: 9 (0.7%), parse: 1.21 (0.1%), extract_message_metadata: 48 (3.5%), get_uri_detail_list: 6 (0.4%), tests_pri_-1000: 38 (2.8%), tests_pri_-950: 2.3 (0.2%), tests_pri_-900: 1.32 (0.1%), tests_pri_-90: 223 (16.0%), check_bayes: 211 (15.2%), b_tokenize: 19 (1.4%), b_tok_get_all: 9 (0.6%), b_comp_prob: 3.6 (0.3%), b_tok_touch_all: 175 (12.6%), b_finish: 1.47 (0.1%), tests_pri_0: 795 (57.1%), check_dkim_signature: 1.06 (0.1%), check_dkim_adsp: 36 (2.6%), poll_dns_idle: 273 (19.6%), tests_pri_10: 3.6 (0.3%), tests_pri_500: 265 (19.1%), rewrite_mail: 0.00 (0.0%) Subject: Re: [edk2-devel] [Patch 1/1] BaseTools: Fix New Target/ToolChain/Arch in DSC [BuildOptions] issues X-SA-Exim-Version: 4.2.1 (built Sat, 08 Feb 2020 21:53:50 +0000) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Acked-by: Rebecca Cran -- Rebecca Cran On 5/1/21 11:02 AM, Michael D Kinney wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3359 > > * Save/Restore global state in GetToolChainAndFamilyFromDsc() > This resolves an issue where the multi-arch build for > UefiPayloadPkg would skip the autogen and build of IA32 > components. > * Expand tools wildcard. > This resolves the issue where autogen makefile contents > would have a BUIDLRULEFAMILY tools definitions with an > '*' in the tool field that breaks the build from invalid > makefile syntax. > * Build rule family higher priority than Family. > This resolves the issue where flags were appended from > both the BUILDRULEFAMILY and FAMILY when only > BUILDRULEFAMILY should be appended when present. > > Cc: Bob Feng > Cc: Liming Gao > Cc: Yuwei Chen > Cc: Ray Ni > Cc: Steven Shi > Signed-off-by: Michael D Kinney > --- > .../Python/AutoGen/ModuleAutoGenHelper.py | 27 +++++++++---------- > .../Source/Python/AutoGen/PlatformAutoGen.py | 27 +++++++++---------- > BaseTools/Source/Python/build/build.py | 2 ++ > 3 files changed, 26 insertions(+), 30 deletions(-) > > diff --git a/BaseTools/Source/Python/AutoGen/ModuleAutoGenHelper.py b/BaseTools/Source/Python/AutoGen/ModuleAutoGenHelper.py > index 167bb59d2315..036fdac3d7df 100644 > --- a/BaseTools/Source/Python/AutoGen/ModuleAutoGenHelper.py > +++ b/BaseTools/Source/Python/AutoGen/ModuleAutoGenHelper.py > @@ -181,20 +181,12 @@ class AutoGenInfo(object): > if Family == ToolDef[Tool][TAB_TOD_DEFINES_BUILDRULEFAMILY]: > FamilyMatch = True > Found = True > - if TAB_TOD_DEFINES_FAMILY in ToolDef[Tool]: > - if Family == ToolDef[Tool][TAB_TOD_DEFINES_FAMILY]: > - FamilyMatch = True > - Found = True > if TAB_STAR in ToolDef: > FamilyIsNull = False > if TAB_TOD_DEFINES_BUILDRULEFAMILY in ToolDef[TAB_STAR]: > if Family == ToolDef[TAB_STAR][TAB_TOD_DEFINES_BUILDRULEFAMILY]: > FamilyMatch = True > Found = True > - if TAB_TOD_DEFINES_FAMILY in ToolDef[TAB_STAR]: > - if Family == ToolDef[TAB_STAR][TAB_TOD_DEFINES_FAMILY]: > - FamilyMatch = True > - Found = True > if not Found: > continue > # expand any wildcard > @@ -640,14 +632,19 @@ class PlatformInfo(AutoGenInfo): > if Attr == TAB_TOD_DEFINES_BUILDRULEORDER: > continue > Value = Options[Tool][Attr] > - # check if override is indicated > - if Value.startswith('='): > - BuildOptions[Tool][Attr] = mws.handleWsMacro(Value[1:]) > - else: > - if Attr != 'PATH': > - BuildOptions[Tool][Attr] += " " + mws.handleWsMacro(Value) > + ToolList = [Tool] > + if Tool == TAB_STAR: > + ToolList = list(AllTools) > + ToolList.remove(TAB_STAR) > + for ExpandedTool in ToolList: > + # check if override is indicated > + if Value.startswith('='): > + BuildOptions[ExpandedTool][Attr] = mws.handleWsMacro(Value[1:]) > else: > - BuildOptions[Tool][Attr] = mws.handleWsMacro(Value) > + if Attr != 'PATH': > + BuildOptions[ExpandedTool][Attr] += " " + mws.handleWsMacro(Value) > + else: > + BuildOptions[ExpandedTool][Attr] = mws.handleWsMacro(Value) > > return BuildOptions, BuildRuleOrder > > diff --git a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py > index 21e72438e59e..832c0da86bb7 100644 > --- a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py > +++ b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py > @@ -1391,14 +1391,19 @@ class PlatformAutoGen(AutoGen): > if Attr == TAB_TOD_DEFINES_BUILDRULEORDER: > continue > Value = Options[Tool][Attr] > - # check if override is indicated > - if Value.startswith('='): > - BuildOptions[Tool][Attr] = mws.handleWsMacro(Value[1:]) > - else: > - if Attr != 'PATH': > - BuildOptions[Tool][Attr] += " " + mws.handleWsMacro(Value) > + ToolList = [Tool] > + if Tool == TAB_STAR: > + ToolList = list(AllTools) > + ToolList.remove(TAB_STAR) > + for ExpandedTool in ToolList: > + # check if override is indicated > + if Value.startswith('='): > + BuildOptions[ExpandedTool][Attr] = mws.handleWsMacro(Value[1:]) > else: > - BuildOptions[Tool][Attr] = mws.handleWsMacro(Value) > + if Attr != 'PATH': > + BuildOptions[ExpandedTool][Attr] += " " + mws.handleWsMacro(Value) > + else: > + BuildOptions[ExpandedTool][Attr] = mws.handleWsMacro(Value) > > return BuildOptions, BuildRuleOrder > > @@ -1529,20 +1534,12 @@ class PlatformAutoGen(AutoGen): > if Family == ToolDef[Tool][TAB_TOD_DEFINES_BUILDRULEFAMILY]: > FamilyMatch = True > Found = True > - if TAB_TOD_DEFINES_FAMILY in ToolDef[Tool]: > - if Family == ToolDef[Tool][TAB_TOD_DEFINES_FAMILY]: > - FamilyMatch = True > - Found = True > if TAB_STAR in ToolDef: > FamilyIsNull = False > if TAB_TOD_DEFINES_BUILDRULEFAMILY in ToolDef[TAB_STAR]: > if Family == ToolDef[TAB_STAR][TAB_TOD_DEFINES_BUILDRULEFAMILY]: > FamilyMatch = True > Found = True > - if TAB_TOD_DEFINES_FAMILY in ToolDef[TAB_STAR]: > - if Family == ToolDef[TAB_STAR][TAB_TOD_DEFINES_FAMILY]: > - FamilyMatch = True > - Found = True > if not Found: > continue > > diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py > index 0570c29f1ada..e5693c0d27a2 100755 > --- a/BaseTools/Source/Python/build/build.py > +++ b/BaseTools/Source/Python/build/build.py > @@ -897,6 +897,7 @@ class Build(): > # $(TARGET), $(TOOLCHAIN), $(TOOLCHAIN_TAG), or $(ARCH) operands. > # > def GetToolChainAndFamilyFromDsc (self, File): > + SavedGlobalDefines = GlobalData.gGlobalDefines.copy() > for BuildTarget in self.BuildTargetList: > GlobalData.gGlobalDefines['TARGET'] = BuildTarget > for BuildToolChain in self.ToolChainList: > @@ -929,6 +930,7 @@ class Build(): > self.ToolDef.ToolsDefTxtDatabase[TAB_TOD_DEFINES_TOOL_CHAIN_TAG] = [] > if ToolChain not in self.ToolDef.ToolsDefTxtDatabase[TAB_TOD_DEFINES_TOOL_CHAIN_TAG]: > self.ToolDef.ToolsDefTxtDatabase[TAB_TOD_DEFINES_TOOL_CHAIN_TAG].append(ToolChain) > + GlobalData.gGlobalDefines = SavedGlobalDefines > > ## Load configuration > #