From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web10.10050.1583890606689945234 for ; Tue, 10 Mar 2020 18:36:46 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: liming.gao@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Mar 2020 18:36:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,539,1574150400"; d="scan'208";a="242520699" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga003.jf.intel.com with ESMTP; 10 Mar 2020 18:36:45 -0700 Received: from shsmsx603.ccr.corp.intel.com (10.109.6.143) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 10 Mar 2020 18:36:44 -0700 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by SHSMSX603.ccr.corp.intel.com (10.109.6.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 11 Mar 2020 09:36:42 +0800 Received: from shsmsx606.ccr.corp.intel.com ([10.109.6.216]) by SHSMSX606.ccr.corp.intel.com ([10.109.6.216]) with mapi id 15.01.1713.004; Wed, 11 Mar 2020 09:36:42 +0800 From: "Liming Gao" To: "Feng, Bob C" , "Fan, ZhijuX" , "devel@edk2.groups.io" Subject: Re: [PATCH V2] BaseTools:GuidedSectionTools.txt is not generated correctly Thread-Topic: [PATCH V2] BaseTools:GuidedSectionTools.txt is not generated correctly Thread-Index: AQHV83iQGKIyNRtmLEWMMsh9DxZKEqg/QT2AgANiZPA= Date: Wed, 11 Mar 2020 01:36:42 +0000 Message-ID: <516c323ced994b5a8beb5972ec28efb7@intel.com> References: <20200306053126.21376-1-zhijux.fan@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-product: dlpe-windows dlp-reaction: no-action x-originating-ip: [10.239.127.36] MIME-Version: 1.0 Return-Path: liming.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Zhiju: I expect the output tool name is same to the one specified in tools_def.t= xt or [BuildOptions] in platform.dsc file.=20 Thanks Liming > -----Original Message----- > From: Feng, Bob C > Sent: Monday, March 9, 2020 1:54 PM > To: Fan, ZhijuX ; devel@edk2.groups.io > Cc: Gao, Liming > Subject: RE: [PATCH V2] BaseTools:GuidedSectionTools.txt is not generated= correctly >=20 > Zhiju, >=20 > + BaseName, Ext =3D os.path.splitext(foundPath) > + if os.path.isdir(foundPath) or Ext: >=20 > Did you check the tool behavior under Linux? The file under Linux can hav= e no extension file name. >=20 > Thanks, > Bob >=20 > -----Original Message----- > From: Fan, ZhijuX > Sent: Friday, March 6, 2020 1:31 PM > To: devel@edk2.groups.io > Cc: Fan, ZhijuX ; Gao, Liming ; Feng, Bob C > Subject: [PATCH V2] BaseTools:GuidedSectionTools.txt is not generated cor= rectly >=20 > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2538 >=20 > For LzmaCompress or BrotliCompress, the platform may use the different op= tions and add their batch file, such as > LzmaCompressPlatform. > Then, specify it in platform.dsc [BuildOptions] to override the default o= ne in tools_def.txt. >=20 > *_*_*_LZMA_PATH =3D LzmaCompressPlatform >=20 > This override tool will be used. But, its name is not specified in the ge= nerated GuidedSectionTools.txt. >=20 > Signed-off-by: Zhiju.Fan > Cc: Liming Gao > Cc: Bob Feng > --- > Changed an issue with an incorrect full path in GuidedSectionTools >=20 > BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 4 +++- > BaseTools/Source/Python/build/build.py | 3 ++- > 2 files changed, 5 insertions(+), 2 deletions(-) >=20 > diff --git a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py b/BaseToo= ls/Source/Python/AutoGen/PlatformAutoGen.py > index d32178b00c93..478a5116fd7a 100644 > --- a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py > +++ b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py > @@ -866,7 +866,9 @@ class PlatformAutoGen(AutoGen): > Value +=3D " " + self._BuildOptionWithToolDe= f(RetVal)[Tool][Attr] > else: > Value =3D self._BuildOptionWithToolDef(RetVa= l)[Tool][Attr] > - > + Def =3D '_'.join([self.BuildTarget, self.Too= lChain, self.Arch, Tool, Attr]) > + if self.Workspace.ToolDef.ToolsDefTxtDiction= ary.get(Def): > + > + self.Workspace.ToolDef.ToolsDefTxtDictionary[Def] =3D Value > if Attr =3D=3D "PATH": > # Don't put MAKE definition in the file > if Tool !=3D "MAKE": > diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Py= thon/build/build.py > index d841fefdc502..01c4c6fe2b84 100755 > --- a/BaseTools/Source/Python/build/build.py > +++ b/BaseTools/Source/Python/build/build.py > @@ -2367,7 +2367,8 @@ class Build(): > # PATH environment variable. > for dirInPath in os.environ['PATH'].split(os.pathsep): > foundPath =3D os.path.join(dirInPath, tool) > - if os.path.exists(foundPath): > + BaseName, Ext =3D os.path.splitext(foundPath) > + if os.path.isdir(foundPath) or Ext: > return os.path.realpath(foundPath) >=20 > # If the tool was not found in the path then we just return > -- > 2.14.1.windows.1