From nobody Mon May 6 12:49:16 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+55948+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+55948+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1584501501; cv=none; d=zohomail.com; s=zohoarc; b=MHCC4McAGvDi+hQcGc8dRixUkSUz7c5CGEwtu+xl5eBq80kuRu5SvSV/pebUIkX/cDit4XfyZFxlUlozBrqLVyRKwTLLacxzKKCXzwrhiflMfjsOoDtsAKl730SwyRpDHAnsp6rxlYMR31zZvK/IVfu0xvRHZjdp5B8nujdeBV8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584501501; h=Cc:Date:From:List-Id:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To; bh=o+HKCFjiuEtvc8DnZCEHHPFgAld//YpGBTNxEL9EGGQ=; b=X5bqPEiwYLG+mOnIY4oHXeoUlj3QAENhdBNreA64v7NW7Dhsav2l0uGi2JHRonExYg/zWVTrCsHeOxlT/IW2OVvZD3pXjvOdYPsNcv9nQmkcRIo1ys3lX0jc0TE/OVqz/9GihMVUjH5M82PGKVh0KZUB0xjRhhO7BGBOfTPpZhY= 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+55948+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 1584501501874757.6053703512044; Tue, 17 Mar 2020 20:18:21 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id eSA3YY1788612xeMabXyaXar; Tue, 17 Mar 2020 20:18:21 -0700 X-Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web12.8153.1584501500721747813 for ; Tue, 17 Mar 2020 20:18:20 -0700 IronPort-SDR: VHKcFRclVWtvhGEtnzRW8h+CRBnins1a0/dUeD1z15IfeIGeKuCqgfqUol+QpluvvUoysy8gQg 9s2+XbHyFqFA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2020 20:18:20 -0700 IronPort-SDR: kYU5udQBIoKHJGatNigV7/rTuqP9kjdRajeMQ5db9qPGBTNZjgv1WkeK2HfHvyKVsz8b/XgwOy xRZVDj/Rk3kA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,566,1574150400"; d="scan'208";a="417795737" X-Received: from zhijufax-mobl.ccr.corp.intel.com ([10.238.4.120]) by orsmga005.jf.intel.com with ESMTP; 17 Mar 2020 20:18:18 -0700 From: "Fan, ZhijuX" To: devel@edk2.groups.io Cc: "Zhiju . Fan" , Liming Gao , Bob Feng Subject: [edk2-devel] [PATCH V4] BaseTools:GuidedSectionTools.txt is not generated correctly Date: Wed, 18 Mar 2020 11:18:06 +0800 Message-Id: <20200318031806.13560-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: qqbli6SkeoKQESzBma3h7LzCx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1584501501; bh=kX8mQk+KdfxwqPIRXNG2DznHKwvnJTD9L4ws2JfaruE=; h=Cc:Date:From:Reply-To:Subject:To; b=EwlYveDizw50weVRxePGtY3ncX8xnS1LvasCKVXmemUJn5/fiovyzj7SGMLiNE/vIGb L6JcCDH15xCFQdDUl4nSNSzs9eq/Z1qP+6p56bBHulsFid8gvSmUtOb7ynkQ0PzvyDvWm XDaraNn4jFqMfXyJZBlk+sg2jx9KB1DDgyg= 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 --- BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 4 +++- BaseTools/Source/Python/build/build.py | 17 ----------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py b/BaseTools= /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._BuildOptionWithToolDef(= RetVal)[Tool][Attr] else: Value =3D self._BuildOptionWithToolDef(RetVal)= [Tool][Attr] - + Def =3D '_'.join([self.BuildTarget, self.ToolC= hain, self.Arch, Tool, Attr]) + if self.Workspace.ToolDef.ToolsDefTxtDictionar= y.get(Def): + self.Workspace.ToolDef.ToolsDefTxtDictiona= ry[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/Pyth= on/build/build.py index d841fefdc502..487c57d6e7ff 100755 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -2347,7 +2347,6 @@ 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) guidAttribs.append((guid, toolName, path)) =20 # Write out GuidedSecTools.txt @@ -2357,22 +2356,6 @@ class Build(): print(' '.join(guidedSectionTool), file=3DtoolsFil= e) toolsFile.close() =20 - ## Returns the full path of the tool. - # - def GetFullPathOfTool (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 (#55948): https://edk2.groups.io/g/devel/message/55948 Mute This Topic: https://groups.io/mt/72041911/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-