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.web11.2578.1584440259321637480 for ; Tue, 17 Mar 2020 03:17:39 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: zhijux.fan@intel.com) IronPort-SDR: pZ47kn8aTG2OKZ+nKBQ9c6gHmDbNN8+BTnvLxhYOBkli6uTBFU5CFWBvl+LrndsVm75lPx3cIa IbPGmECQT1Pg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2020 03:17:39 -0700 IronPort-SDR: Hx/h1ra6dvryiaSxdEeMcsUSucUXIFmCvw6jNg6CpaNbJPHBBElraMbX1GkHOOXDqPqj/Orjg7 cr2d/d7CLelA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,564,1574150400"; d="scan'208";a="267912740" Received: from zhijufax-mobl.ccr.corp.intel.com ([10.238.4.120]) by fmsmga004.fm.intel.com with ESMTP; 17 Mar 2020 03:17:37 -0700 From: "Fan, ZhijuX" To: devel@edk2.groups.io Cc: "Zhiju . Fan" , Liming Gao , Bob Feng Subject: [PATCH V3] BaseTools:GuidedSectionTools.txt is not generated correctly Date: Tue, 17 Mar 2020 18:17:13 +0800 Message-Id: <20200317101713.11188-1-zhijux.fan@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2538 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 = 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 --- Change full path is only used on non-windows systems BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 4 +++- BaseTools/Source/Python/build/build.py | 3 ++- 2 files changed, 5 insertions(+), 2 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 += " " + self._BuildOptionWithToolDef(RetVal)[Tool][Attr] else: Value = self._BuildOptionWithToolDef(RetVal)[Tool][Attr] - + Def = '_'.join([self.BuildTarget, self.ToolChain, self.Arch, Tool, Attr]) + if self.Workspace.ToolDef.ToolsDefTxtDictionary.get(Def): + self.Workspace.ToolDef.ToolsDefTxtDictionary[Def] = Value if Attr == "PATH": # Don't put MAKE definition in the file if Tool != "MAKE": diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index d841fefdc502..4d4615c0e94a 100755 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -2347,7 +2347,8 @@ class Build(): toolName = split[3] path = '_'.join(split[0:4]) + '_PATH' path = self.ToolDef.ToolsDefTxtDictionary[path] - path = self.GetFullPathOfTool(path) + if sys.platform != "win32": + path = self.GetFullPathOfTool(path) guidAttribs.append((guid, toolName, path)) # Write out GuidedSecTools.txt -- 2.14.1.windows.1