From nobody Fri Apr 19 21:30:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+56384+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+56384+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1585216251; cv=none; d=zohomail.com; s=zohoarc; b=cG1l0kbo8ZqV4DWZqZOmtcKtzTELT8v8UM9sbPrRi4pRYnmpN6r1OKF/rS1htY1U+/VNDABD82CgOCh16+M+IAdQTSMqy677gKlYFHqsqN6MzDZKe04omyTOnWilsp2H211tFFGT/0PZ8vF0jHhby/nyRWS6jJpqJe8Ja3NZeNU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585216251; h=Cc:Date:From:List-Id:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To; bh=oWdjz8xC8K1awmn3XIC9033b0r1OXtn2RV/E7qmDc/Q=; b=nFmIy6PXSzVwX4y2y/UAluKw67q0CFwvFN0ARJajLp9DpKVAnXJh82fH7waGQHJhMkpD77S37ysCM2uRy+ztWgN/vHztfAp9DX4BP+Zoo8U0ihQrzTWLrgqPJYItTlW7ndL44rTg4H2ss/a+C4e5CIE4kJzqyhGeA1OTMt6MmfI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+56384+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 1585216251413228.29626374223324; Thu, 26 Mar 2020 02:50:51 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id InZCYY1788612xjZafNw65kN; Thu, 26 Mar 2020 02:50:51 -0700 X-Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web12.33547.1585216250071564031 for ; Thu, 26 Mar 2020 02:50:50 -0700 IronPort-SDR: z3GM0dJ9NnLepGg3MMEGBemBuC30F44K2Z10OfSPRBEAst2CG4b0aZ/LdWOa294Io+Sbmmx/eL Nt8K85SZ5PBA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2020 02:50:49 -0700 IronPort-SDR: 3krbz4VHgiBcETpY3rNje9Kx4XSGbT7k1PAxazmGyeFCyKFl/XsZHAmDg7bU6sN4PMdaksdf/7 MvZeVAZiMtTg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,308,1580803200"; d="scan'208";a="446949757" X-Received: from zhijufax-mobl.ccr.corp.intel.com ([10.238.4.120]) by fmsmga005.fm.intel.com with ESMTP; 26 Mar 2020 02:50:48 -0700 From: "Fan, ZhijuX" To: devel@edk2.groups.io Cc: "Zhiju . Fan" , Liming Gao , Bob Feng Subject: [edk2-devel] [PATCH V6] BaseTools:GuidedSectionTools.txt is not generated correctly Date: Thu, 26 Mar 2020 17:48:04 +0800 Message-Id: <20200326094804.21368-1-zhijux.fan@intel.com> 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,zhijux.fan@intel.com X-Gm-Message-State: Dl0DawqwfHUafyqyjAO09Sv0x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1585216251; bh=3j5v/ws3GHDWA24ff8qoV9OG/h8F05LKt62RiIRp0Wg=; h=Cc:Date:From:Reply-To:Subject:To; b=fSX7OLqxBFCcCdpAjalqW7aRjoAAf3alLD8R6NCaUcoMYRlOuz4ETRTU1Ucp2YDIQQ7 lSZ+6E+SRevQL2CAq74QF89SPWHnOhu4fmUyOLm4TL4dOaXzUMb5PHP6S93qi2rWQYHaR tXBMKdwAaDNZmGozBd4Cj8x5SIOrkneCmqE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2538 For LzmaCompress or BrotliCompress, the platform may use the different options and add their batch file, such as LzmaCompressPlatform. Then, specify it in platform.dsc [BuildOptions] to override the default one in tools_def.txt. *_*_*_LZMA_PATH =3D LzmaCompressPlatform This override tool will be used. But, its name is not specified in the generated GuidedSectionTools.txt. Signed-off-by: Zhiju.Fan Cc: Liming Gao Cc: Bob Feng Reviewed-by: Bob Feng --- Some unnecessary comments were removed BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 3 ++- BaseTools/Source/Python/build/build.py | 16 +++------------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py b/BaseTools= /Source/Python/AutoGen/PlatformAutoGen.py index d32178b00c93..af66c48c7d6a 100644 --- a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py +++ b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py @@ -866,7 +866,8 @@ class PlatformAutoGen(AutoGen): Value +=3D " " + self._BuildOptionWithToolDef(= RetVal)[Tool][Attr] else: Value =3D self._BuildOptionWithToolDef(RetVal)= [Tool][Attr] - + Def =3D '_'.join([self.BuildTarget, self.ToolC= hain, self.Arch, Tool, Attr]) + self.Workspace.ToolDef.ToolsDefTxtDictionary[D= ef] =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/Pyth= on/build/build.py index d841fefdc502..bec848a7b2e3 100755 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -2347,7 +2347,7 @@ class Build(): toolName =3D split[3] path =3D '_'.join(split[0:4]) + '_PATH' path =3D self.ToolDef.ToolsDefTxtDictionar= y[path] - path =3D self.GetFullPathOfTool(path) + path =3D self.GetRealPathOfTool(path) guidAttribs.append((guid, toolName, path)) =20 # Write out GuidedSecTools.txt @@ -2357,21 +2357,11 @@ class Build(): print(' '.join(guidedSectionTool), file=3DtoolsFil= e) toolsFile.close() =20 - ## Returns the full path of the tool. + ## Returns the real path of the tool. # - def GetFullPathOfTool (self, tool): + def GetRealPathOfTool (self, tool): if os.path.exists(tool): return os.path.realpath(tool) - else: - # We need to search for the tool using the - # PATH environment variable. - for dirInPath in os.environ['PATH'].split(os.pathsep): - foundPath =3D os.path.join(dirInPath, tool) - if os.path.exists(foundPath): - return os.path.realpath(foundPath) - - # If the tool was not found in the path then we just return - # the input tool. return tool =20 ## Launch the module or platform build --=20 2.14.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 (#56384): https://edk2.groups.io/g/devel/message/56384 Mute This Topic: https://groups.io/mt/72560484/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-