From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web12.26793.1618192134708912452 for ; Sun, 11 Apr 2021 18:48:55 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=fPO24jq8; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: yuwei.chen@intel.com) IronPort-SDR: 3fzZYUEUicIOoCPdSPD5OuRBb0qdSk7LmAHcxRAKHajPF1DL+EXA/GEQlRumGEOj0LGOp34bsq +wuYBkRQF9pA== X-IronPort-AV: E=McAfee;i="6000,8403,9951"; a="194203699" X-IronPort-AV: E=Sophos;i="5.82,214,1613462400"; d="scan'208";a="194203699" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2021 18:48:53 -0700 IronPort-SDR: pKfi+eHgyKK98UkC8LSapLffVwyXNugPm2BiEYc4wERFR/PAQINF3svzSAPa9NoC7N6CBE6K8M aDuZiWdSvqsA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,214,1613462400"; d="scan'208";a="388486265" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga007.fm.intel.com with ESMTP; 11 Apr 2021 18:48:53 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Sun, 11 Apr 2021 18:48:52 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Sun, 11 Apr 2021 18:48:52 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.100) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Sun, 11 Apr 2021 18:48:41 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k0MLcIqvDJYhlCF7Wtfzm8FVqApIiFsZS4/DaVkk7w30nkF6q/h2pw9PntII4aJGzBfHpYdkKtRy6MEAKC5MG79s/U9zDnVAa0rtha5df6S6bKmqJTiN1f6elCWx+xdZzVIMILTP3YkTG35VSlIGttuh0HSgQskFBnGiJ2RDCPrQR5dGDAAPsj6x+qJ8K3csVUYWUggLIKUPAd/XaUyjzJ5NwN+cGcD7fC2YFBWwrUggH97IXjRsz7Eb60siDbj7mxHgDk7wsN1X88oePM3t7wcpwgRFEhvtZS9xmpqCCIOxJktGXllZ0tylnxoIs6Z7KO1VSDFMI1s2bpUT7wixDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iovqVxhI7qr/lDwUelgJ8MgD8/otVZdfv+MNVYqTrLw=; b=TCJ2wNJfNeeWQsOAh0IMHZT0eF6k6h67fczc/QtPnIaocSQmjzOqFW5EbESKlObnYAYn02QB+YnTH8WAPjIZ9CV+vkHmbHm6sYETEsI7nDc1jaB3/abp78GHhXG/nX9Q2Kwq1c89AUxLaX/0pWVG3of+kXvXYwM0nnDPY3If5BGEqRDWwWowdiRGDTajqp7H3wqFSOzHMjwDxw+6ADzakGgkWR/7L8ZjUNMu+27Rnpp3cKqbBxv8MycK+7rcUPNN3LSlIU3IJk/Dvrrh0gC1K1naflWRswVTC6AlomVv5BT+52slXXHGhnyS75j9IgWXsHyaGWDleVYlr0EbmwbUMA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iovqVxhI7qr/lDwUelgJ8MgD8/otVZdfv+MNVYqTrLw=; b=fPO24jq8aLwLZWb+rNZA0yMFCT3dMTKJBXq75OOEnEjpYglF70ZYtzj0E9K6YPBcSmR8G0quXplPnU1K+ZRQAy1O0y2Kno7GzmW1LdKtNE5zDB0skSEyML3Eyqzbj7d4bfDljOmR0Moqs2ModRp4FY90Ea8fnCSGI2uWwkoFbvs= Received: from DM5PR11MB1594.namprd11.prod.outlook.com (2603:10b6:4:5::16) by DM6PR11MB3051.namprd11.prod.outlook.com (2603:10b6:5:61::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.22; Mon, 12 Apr 2021 01:48:40 +0000 Received: from DM5PR11MB1594.namprd11.prod.outlook.com ([fe80::8d2a:f371:783f:3a55]) by DM5PR11MB1594.namprd11.prod.outlook.com ([fe80::8d2a:f371:783f:3a55%7]) with mapi id 15.20.4020.022; Mon, 12 Apr 2021 01:48:40 +0000 From: "Yuwei Chen" To: "Kinney, Michael D" , "devel@edk2.groups.io" CC: "Feng, Bob C" , Liming Gao Subject: Re: [Patch 1/1] BaseTools/PlatformAutoGen: MAKE_FLAGS and MAKE_PATH fixes Thread-Topic: [Patch 1/1] BaseTools/PlatformAutoGen: MAKE_FLAGS and MAKE_PATH fixes Thread-Index: AQHXLYogMt506dbXVEyDc8zl7Yu72aqwIMWQ Date: Mon, 12 Apr 2021 01:48:40 +0000 Message-ID: References: <20210409214838.1501-1-michael.d.kinney@intel.com> In-Reply-To: <20210409214838.1501-1-michael.d.kinney@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.211] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 39dce5a0-b0f5-43bb-fd04-08d8fd5518ff x-ms-traffictypediagnostic: DM6PR11MB3051: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:820; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: fxrHgcK8Ne/3RQEwrL1MkbP593Tng0zmy/pDsmeymUvognNtg3tMA50kirpSF+IofxIZT2pUbyfj3YR5SSmK0PFF8n3akr6MWPJhtzJyQe5hjT9R1zzeJgwb/hCzvKtPIkf4bMeHiM+qqUBRSohSzJhu9aTByJK6U2Vo5eEeg8f0nn2N5kTpZg/gF57PUR9tdINrdQzciX0qLAWUlbe1tWxRsNgfnsrO9PJS4qS5Mm4ItnNhOSl1dxjFp+M8Q++WTTW/8BVAyDUgQf2Jipa00FbYE4IvKKijuvQGj4U0jsFnjoRu6MxfsLsZnHjlaHm9HT586FdP7Y6oxdb9Cv/mvZ3nZyz8FQ9OwFqQ5hYe3Zix4yX5zXF4GPR77TAawXTkdz397szVjAZk3BC0dotMFvzl+74S0yxfDIZhLQR58LcTr0hBnTiQ3pMeiJB4F1X0mWd5Ld6zZL4fOIOb087AeIM4okq9EFwE5qORxoyo/5HmpwMQZqhUkd7g8j/GDTE35uVtFLcPxb/OXn0ds4luH5e8hxh8avbCPSvUO5c6J5DQNEF3HF9hEofJcgdxQd6c0P85ZZbqogRlI5wOf3FTeU58B4EAB3J3/uWff5ZgFvcl8roIgsfgIWXaYKwIGTtxC+u9QPcsXcJIaIIHEw5YopjxtqcN3DLYr2UQof9lP1nWblihrHF8BfaQazqiMe28 x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR11MB1594.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(39860400002)(366004)(396003)(136003)(376002)(346002)(316002)(2906002)(966005)(52536014)(76116006)(38100700002)(110136005)(66556008)(66946007)(66446008)(66476007)(4326008)(71200400001)(26005)(55016002)(64756008)(5660300002)(54906003)(53546011)(33656002)(6506007)(186003)(478600001)(7696005)(86362001)(8936002)(9686003)(8676002)(83380400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?Pg6udLLVgC5+E2tDKOf5lTAVCfjLmP6zmv5A7muidqsUQSEZwP9k3oSfEsA9?= =?us-ascii?Q?zk+NZ0iyTLaqZJrsmrHbi2pQeWKOkFt0/WvxeHWo5ayJ+DVLjgJCPJwfX1jY?= =?us-ascii?Q?8qqCklWX9RxzpDq+lcToCK1jgqZU4QW2WibXw0eaD9iOTEI9SJsBIVmpthjF?= =?us-ascii?Q?+I5wQRNLOla0sQrHCDX1tLTEh1/8JFRI1+C2QPRfHLlj994TRaIFCrmRsDmp?= =?us-ascii?Q?yy5w2PWbTGIsBiZavIav++XB+6IXTwy2aOUmz+XyK3lIEzTfSRLZaBH2rNrc?= =?us-ascii?Q?fnm0JIKh17PcXmyhJpwfs3hKZQtk8PPmAbWIr4+dgiUrVPBm+iscqM75MiZZ?= =?us-ascii?Q?EbBDIu07L51Gg7mGFii63rHgV+pWctUhCS1MJrxEHb5LZzvNf0owMnyVzN6h?= =?us-ascii?Q?buVoysfMVTewc8v9F7nSkSrz9d/bzvS0F5jqWWlWfJVT1VVFPo5Ar+WHi876?= =?us-ascii?Q?3ODBfXWt4GNT141SyKv5rq11XP9ndc/qu/A+OYhcPecEclosfKQI5NfQiwho?= =?us-ascii?Q?ZqBLwFOVzWNrEymhIAa+nOTpKU7//GUAA0yWJE51WbcPOce/N9rU3AWJxDbV?= =?us-ascii?Q?4RN3shIcTMjjriY/iiCgrvknURfgv5vZN3yVfItZywe2AdzmdlqQ4YJbZJks?= =?us-ascii?Q?lbiHPqwSfuTRrao7bRaMNfmIQ7Xf/bD4eZ4F47BpXG80dhOQzjiZmAeTBrQQ?= =?us-ascii?Q?iF9ue9dTtu1DGwobkCPdRXCtoP61W0NoeAvwNL+baGihMrMQ+/isfIdpjqSB?= =?us-ascii?Q?GZoYf0EVTX+8gtU3Pl7cjWYs5l/JPRA2+xkmmQ6dxcxENr3oBbnPePCYHxfb?= =?us-ascii?Q?ii9zre+US/ruPDJspdrK8/Xpz2iWLBVv2CGUDzqHl6CAbi7kqjDuOC6TEyW2?= =?us-ascii?Q?T/VoIRsHtueZEPKM0RPu7ctJD69nexIUDuDf+4OLwG5p0f/Ml4jwdltNcC+5?= =?us-ascii?Q?HG3fI/5SluJmoTR0ocN75YrmgMpaDcdiMCK0WfnkWWtF1WhNHZRurcjkqjYh?= =?us-ascii?Q?KcSwSHfz1gBVv7DVvvzLxMSSgR+YNH7AcQ/dkCVzX97RtSBG79HQfKGWW/s8?= =?us-ascii?Q?FLW7kPgRzLhJsmd43m+4B75mwcFxXYhYWWL2GjjWS9+ElunNHdoEdIPGdklp?= =?us-ascii?Q?BLgM7wBKi3jM/7KGq6wiS3adMANbAvpdBNd5L6u4LuJcWKh/vQZGYrxWTc1P?= =?us-ascii?Q?aEatDKaTAdlYnmevYNGqMCn1S3n9Cdf8pIV8KV+cxto4UqaPnfveNfky8gGl?= =?us-ascii?Q?pk1ExbD7Ii8EKV5B2k2+hGG7qZWkSyRj42ToqJ2WEd8OSiTfxNXYcczkm9Uv?= =?us-ascii?Q?0CG9U9lvaJbfOBdnQifhYFr0?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM5PR11MB1594.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 39dce5a0-b0f5-43bb-fd04-08d8fd5518ff X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Apr 2021 01:48:40.4942 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 7dbC4/FguDEdH6FgSUCzRbFFFfSjeEBSOgpIsxEwnHkzyAahT4p1XNqh2dexYSTUprBkP8wtMBgnF6O6sHJKqw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3051 Return-Path: yuwei.chen@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Yuwei Chen > -----Original Message----- > From: Kinney, Michael D > Sent: Saturday, April 10, 2021 5:49 AM > To: devel@edk2.groups.io > Cc: Feng, Bob C ; Liming Gao > ; Chen, Christine > Subject: [Patch 1/1] BaseTools/PlatformAutoGen: MAKE_FLAGS and > MAKE_PATH fixes >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3312 >=20 > Update parsing of MAKE_FLAGS in DSC [BuildOptions] sections to split the > flags into a list to be compatible with running the make command using > Popen(). Parsing MAKE_FLAGS from tools_def.txt already uses _SplitOption= (). > This change uses the same _SplitOption() method for MAKE_FLAGS from a > DSC [BuildOptions] section. >=20 > Also update the parsing of MAKE_PATH to support MAKE_PATH from > tools_def.txt or the DSC [BuildOptions] section. MAKE_PATH in DSC > [BuildOptions] section is higher priority than MAKE_PATH in tools_def.txt= . >=20 > Cc: Bob Feng > Cc: Liming Gao > Cc: Yuwei Chen > Signed-off-by: Michael D Kinney > --- > .../Source/Python/AutoGen/PlatformAutoGen.py | 36 +++++++++++-------- > 1 file changed, 21 insertions(+), 15 deletions(-) >=20 > diff --git a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py > b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py > index 7d8e7b3c7cc1..c16f2e4cd8b7 100644 > --- a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py > +++ b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py > @@ -1,7 +1,7 @@ > ## @file > # Create makefile for MS nmake and GNU make # -# Copyright (c) 2019, In= tel > Corporation. All rights reserved.
> +# Copyright (c) 2019 - 2021, Intel Corporation. All rights > +reserved.
> # Copyright (c) 2020, ARM Limited. All rights reserved.
# SPDX-Lic= ense- > Identifier: BSD-2-Clause-Patent # @@ -805,20 +805,26 @@ class > PlatformAutoGen(AutoGen): > # > @cached_property > def BuildCommand(self): > - RetVal =3D [] > - if "MAKE" in self.ToolDefinition and "PATH" in > self.ToolDefinition["MAKE"]: > - RetVal +=3D _SplitOption(self.ToolDefinition["MAKE"]["PATH"]= ) > - if "FLAGS" in self.ToolDefinition["MAKE"]: > - NewOption =3D self.ToolDefinition["MAKE"]["FLAGS"].strip= () > - if NewOption !=3D '': > - RetVal +=3D _SplitOption(NewOption) > - if "MAKE" in self.EdkIIBuildOption: > - if "FLAGS" in self.EdkIIBuildOption["MAKE"]: > - Flags =3D self.EdkIIBuildOption["MAKE"]["FLAGS"] > - if Flags.startswith('=3D'): > - RetVal =3D [RetVal[0]] + [Flags[1:]] > - else: > - RetVal.append(Flags) > + if "MAKE" in self.EdkIIBuildOption and "PATH" in > self.EdkIIBuildOption["MAKE"]: > + # MAKE_PATH in DSC [BuildOptions] section is higher priority > + Path =3D self.EdkIIBuildOption["MAKE"]["PATH"] > + if Path.startswith('=3D'): > + Path =3D Path[1:].strip() > + RetVal =3D _SplitOption(Path) > + elif "MAKE" in self.ToolDefinition and "PATH" in > self.ToolDefinition["MAKE"]: > + RetVal =3D _SplitOption(self.ToolDefinition["MAKE"]["PATH"]) > + else: > + return [] > + if "MAKE" in self.ToolDefinition and "FLAGS" in > self.ToolDefinition["MAKE"]: > + NewOption =3D self.ToolDefinition["MAKE"]["FLAGS"].strip() > + if NewOption !=3D '': > + RetVal +=3D _SplitOption(NewOption) > + if "MAKE" in self.EdkIIBuildOption and "FLAGS" in > self.EdkIIBuildOption["MAKE"]: > + Flags =3D self.EdkIIBuildOption["MAKE"]["FLAGS"] > + if Flags.startswith('=3D'): > + RetVal =3D [RetVal[0]] + _SplitOption(Flags[1:].strip()) > + else: > + RetVal =3D RetVal + _SplitOption(Flags.strip()) > return RetVal >=20 > ## Get tool chain definition > -- > 2.31.1.windows.1