From nobody Sun Jan 12 23:19:41 2025
Delivered-To: importer@patchew.org
Authentication-Results: mx.zohomail.com;
	spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain
 of lists.01.org)  smtp.mailfrom=edk2-devel-bounces@lists.01.org
Return-Path: <edk2-devel-bounces@lists.01.org>
Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com
	with SMTPS id 1519480470173125.896934845754;
 Sat, 24 Feb 2018 05:54:30 -0800 (PST)
Received: from [127.0.0.1] (localhost [IPv6:::1])
	by ml01.01.org (Postfix) with ESMTP id 9F7542243692F;
	Sat, 24 Feb 2018 05:48:25 -0800 (PST)
Received: from mga07.intel.com (mga07.intel.com [134.134.136.100])
 (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 CC4172243692B
 for <edk2-devel@lists.01.org>; Sat, 24 Feb 2018 05:48:23 -0800 (PST)
Received: from fmsmga005.fm.intel.com ([10.253.24.32])
 by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 24 Feb 2018 05:54:26 -0800
Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.129])
 by fmsmga005.fm.intel.com with ESMTP; 24 Feb 2018 05:54:25 -0800
X-Original-To: edk2-devel@lists.01.org
Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by
 domain of lists.01.org) client-ip=198.145.21.10;
 envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org;
Received-SPF: Pass (sender SPF authorized) identity=mailfrom;
 client-ip=134.134.136.100; helo=mga07.intel.com;
 envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.47,388,1515484800"; d="scan'208";a="206652229"
From: Yonghong Zhu <yonghong.zhu@intel.com>
To: edk2-devel@lists.01.org
Date: Sat, 24 Feb 2018 21:54:22 +0800
Message-Id: <1519480462-16108-1-git-send-email-yonghong.zhu@intel.com>
X-Mailer: git-send-email 2.6.1.windows.1
Subject: [edk2] [Patch] BaseTools:Override the MAKE_FLAGS by BuildOptions in
 DSC
X-BeenThere: edk2-devel@lists.01.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: EDK II Development  <edk2-devel.lists.01.org>
List-Unsubscribe: <https://lists.01.org/mailman/options/edk2-devel>,
 <mailto:edk2-devel-request@lists.01.org?subject=unsubscribe>
List-Archive: <http://lists.01.org/pipermail/edk2-devel/>
List-Post: <mailto:edk2-devel@lists.01.org>
List-Help: <mailto:edk2-devel-request@lists.01.org?subject=help>
List-Subscribe: <https://lists.01.org/mailman/listinfo/edk2-devel>,
 <mailto:edk2-devel-request@lists.01.org?subject=subscribe>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Errors-To: edk2-devel-bounces@lists.01.org
Sender: "edk2-devel" <edk2-devel-bounces@lists.01.org>
X-ZohoMail: RSF_4  Z_629925259 SPT_0
Content-Type: text/plain; charset="utf-8"

The issue that *_*_*_MAKE_FLAGS doesn't work in DSC [BuildOptions]
section. It means MAKE flags can't be set in platform DSC file.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
---
 BaseTools/Source/Python/AutoGen/AutoGen.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/=
Python/AutoGen/AutoGen.py
index 405bfa1..1787dec 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -1905,10 +1905,17 @@ class PlatformAutoGen(AutoGen):
                 self._BuildCommand +=3D SplitOption(self.ToolDefinition["M=
AKE"]["PATH"])
                 if "FLAGS" in self.ToolDefinition["MAKE"]:
                     NewOption =3D self.ToolDefinition["MAKE"]["FLAGS"].str=
ip()
                     if NewOption !=3D '':
                         self._BuildCommand +=3D SplitOption(NewOption)
+                if "MAKE" in self.EdkIIBuildOption:
+                    if "FLAGS" in self.EdkIIBuildOption["MAKE"]:
+                        Flags =3D self.EdkIIBuildOption["MAKE"]["FLAGS"]
+                        if Flags.startswith('=3D'):
+                            self._BuildCommand =3D [self._BuildCommand[0]]=
 + [Flags[1:]]
+                        else:
+                            self._BuildCommand +=3D [Flags]
         return self._BuildCommand
=20
     ## Get tool chain definition
     #
     #  Get each tool defition for given tool chain from tools_def.txt and =
platform
--=20
2.6.1.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel