From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id BB60621A16E47 for ; Tue, 23 May 2017 02:25:26 -0700 (PDT) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 May 2017 02:25:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,381,1491289200"; d="scan'208";a="105827209" Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.121]) by fmsmga006.fm.intel.com with ESMTP; 23 May 2017 02:25:25 -0700 From: Yonghong Zhu To: edk2-devel@lists.01.org Cc: Liming Gao Date: Tue, 23 May 2017 17:25:23 +0800 Message-Id: <1495531523-1104-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [Patch] BaseTools: Fix the bug that different DSC file use same build output X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 09:25:26 -0000 We meet a corner case that build different DSC file, but the DSC file use same build output directory, and the different DSC file use a same PCD with different Pcd Type, it cause build failure. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/AutoGen.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index fa6ec56..e89b61d 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -659,17 +659,24 @@ class WorkspaceAutoGen(AutoGen): self._FvDir = None self._MakeFileDir = None self._BuildCommand = None # - # Create BuildOptions Macro & PCD metafile. + # Create BuildOptions Macro & PCD metafile, also add the Active Platform and FDF file. # content = 'gCommandLineDefines: ' content += str(GlobalData.gCommandLineDefines) content += os.linesep content += 'BuildOptionPcd: ' content += str(GlobalData.BuildOptionPcd) + content += os.linesep + content += 'Active Platform: ' + content += str(self.Platform) + content += os.linesep + if self.FdfFile: + content += 'Flash Image Definition: ' + content += str(self.FdfFile) SaveFileOnChange(os.path.join(self.BuildDir, 'BuildOptions'), content, False) # # Create PcdToken Number file for Dynamic/DynamicEx Pcd. # -- 2.6.1.windows.1