From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web09.23326.1643252476698925941 for ; Wed, 26 Jan 2022 19:01:17 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=entQTkHv; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: bob.c.feng@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643252476; x=1674788476; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=GMirXHpLwn+7f2UdF6FNceGk3BJzkTLUxg2YXODldJ8=; b=entQTkHv9RdBI4QbJCJvoUgXaPVOLScoq+hZT8tIHaafuSCsXe3RBEbR dBIzslTt+euaR+qbOFeFJf3ibbl8S40gGkEatcAaGAKfLQ+i+JSYhuUfy pgCf8UJ3xQo+LYFcBu0FfL6hSavf1NjgQUR6BURJcpHsBQfKZB0mHB8NW shEiGxU3WfiR/o+SEThD9Tb7Sw9ehIcJBIxmNKF89AULvyfBL3biad7Vu jQj0JCU15blM5EQFLXKGWHmAM63+zFCVRrSkhX6LhQV5s9jqrzGpFUHg/ a89axAUrDT9/3+0PMx6lpadgHU47722bEoi4N5PB7DcTqRJsWsc8vGA5r A==; X-IronPort-AV: E=McAfee;i="6200,9189,10239"; a="245570285" X-IronPort-AV: E=Sophos;i="5.88,319,1635231600"; d="scan'208";a="245570285" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2022 19:00:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,319,1635231600"; d="scan'208";a="480124298" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga006.jf.intel.com with ESMTP; 26 Jan 2022 19:00:57 -0800 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 26 Jan 2022 19:00:57 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) 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.2308.20 via Frontend Transport; Wed, 26 Jan 2022 19:00:57 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.171) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Wed, 26 Jan 2022 19:00:57 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Izcaidg4vwn960+QIvIUdIeYw2ry/mk80gl3o4ZbTDyK+dQ44t20ywyl97r+FJo1+9w07LXVJ0iky1mSm/EIWXoXb5df4HIizOLqoX8qpnLYxXdF3UKPO8zSL0NbhC0sFEwKzEdXt4opDg6YljEEPFVhmuhRxAd7VprAt9Pdz0/I6YhnHX2RN7HdkNjxQfQK2QKCGAAePENFfvPY4b5+HV+PlCg3bUixAQY0JbkYXlIJEZ4KBRppY4mFoKAAJ1YJ200rgKlT4boyhqx/32C4NKQB1HSB98/wsbA2xUu71cD/m/KUoZyeL1oPhbQXyDa1fVYHovXCJGSiBt45dSWmjQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mzbkQMkuP8JisuVeqFlJQnPJJoHwqEPVQV8MaSsFDOI=; b=hheSXc9jEt0gpA+xMw3ACd1CjbyvaM8kSaTageI9MhImLJE443FHkaLZqU/Fjgdfc2eySFEebLKpaqayv3WZqDQeqPjINkltxsBTImjETBRg6NzEjdK59Y3oQIbfcUfRuAOmWNU0d8n43ftHYmL5/6471s11/IIRA7wtnIu+SqVHbIpUDdrvJE/wzlVedJ9IwVuNYjzZO/3MjD4D+aZQlDv7oP9ySZkf1hkmtvpF/LDlef7XMP0tQFL9Wo+ZbetBHKhzy7fOF1TWbrUOzD6YFKixOmu2Ln1QgqYh+gq3DKfXUnqMuNChdokL9vn1TgFL0oHEu59QPFlezAeFlCu5LA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from PH7PR11MB5863.namprd11.prod.outlook.com (2603:10b6:510:135::11) by PH0PR11MB4855.namprd11.prod.outlook.com (2603:10b6:510:41::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.12; Thu, 27 Jan 2022 03:00:55 +0000 Received: from PH7PR11MB5863.namprd11.prod.outlook.com ([fe80::3593:10ef:94ba:830]) by PH7PR11MB5863.namprd11.prod.outlook.com ([fe80::3593:10ef:94ba:830%6]) with mapi id 15.20.4909.017; Thu, 27 Jan 2022 03:00:55 +0000 From: "Bob Feng" To: "Shi, Steven" , "devel@edk2.groups.io" CC: "Chen, Christine" , "ardb@kernel.org" , "leif@nuviainc.com" , "Chang, Abner" , "Schaefer, Daniel" Subject: Re: [PATCH 1/1] BaseTools: Enable GNU make parallel jobs by default Thread-Topic: [PATCH 1/1] BaseTools: Enable GNU make parallel jobs by default Thread-Index: AQHYC7CZat5KQ2mTTU+AFme3kYAjNKx2Ofxw Date: Thu, 27 Jan 2022 03:00:55 +0000 Message-ID: References: <20220117144251.1087-1-steven.shi@intel.com> <20220117144251.1087-2-steven.shi@intel.com> In-Reply-To: <20220117144251.1087-2-steven.shi@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 789eb29b-8aad-4c53-8a44-08d9e1413c87 x-ms-traffictypediagnostic: PH0PR11MB4855:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1443; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: nq/fu/APbiHkvC2JnTofQv+QCW2ADEnYnTCj+HEFVw+Tj32MzITiBt+rNogW5PCHCeN5sbG3gTP77nVXdhb2eNPppQq7Dod9SzwlmBX0YnIXbgGixnV1Rh04ugSa4jgvWiFMrnQuleoP9O3HOZvAtOxoDeVLYvqI/G5J2bbsk/McrxANvNAm20RAGRtXUS3mPBUWOzc2+kSPlsYoUCvBUg4V9iX1puvgaK3T16dDdo9ZNLtBq7sidMPzEH3ymVmpjc/TmVDQSp+pkUhJSu+wgFZP/7DiU2gjc+IVRbo/CmAST50I0Gd6R2qpQwvXUU8MiOKDH+Bor+17SYeNplz0VSx4njMvPnW5v6+nOs2/6wgUetvIBzMaGpeB3L9KaORt3DlqAPkydIeQxnYjD9o/2b0Rv2w3A2JMqIgx0uJX400y1d/mTjEG5/iCZ8DcW8jexi0V/s0IBEVhZUETKQbasK7lJTL8BpZEgGFjyR9M1pIZQ3Jv/U9jLXsIAxNMbnXXYYcb9Fbu44k+MSvzAO633e4j04NhbGAcgtGnNFKyGH/+oAo2DiUqrwFIwFW0M+ihOYcWGcrKvNEFPd1e3pN2ff6iTJ4OLohBuv15U7okDDH3uJwDXzqARXJ3A03NqgTWlBDic85IOf5VVAcNv4FGiX1S5lfrhqee1N+EkLk19tKWBaWl4k0kbLj5SgmnzyNLC2jC5NuKK5QvEyh+6DATb3VTR5sf3WTHwtoxo6YVZPdrrbtKxDI0Tzx4+W3l00qXHjdgTtIWPNPuEeJGlz1ZNAXgjvPl0fMa6FIcJDo+73M= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR11MB5863.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(71200400001)(186003)(122000001)(38100700002)(110136005)(26005)(54906003)(53546011)(6506007)(316002)(86362001)(2906002)(8936002)(66476007)(66446008)(64756008)(66556008)(508600001)(83380400001)(4326008)(38070700005)(8676002)(9686003)(5660300002)(82960400001)(7696005)(966005)(66946007)(76116006)(55016003)(33656002)(52536014);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?aMJb9Q2xXyLHkALXbEr6lsdnnHtSDCMil8dW4TVljReATwnU3jxf5tWfXsv3?= =?us-ascii?Q?NMM5wLSIlMEAX8ZcM0uLjuivUNtxGqvdFhuC3sH0zsaHklGuBu6S/fuzaXDr?= =?us-ascii?Q?nRsJXisfQeM55B3StIxuVgxoyAWLboF4R6iSB11phpvbhLMUBx1ftDGGIKqb?= =?us-ascii?Q?C2c9E/kiTtXiVqGhyaCRpVXLpfbMeV4C2OlWDxE2PsFbA85f1pZdmnwEjhsS?= =?us-ascii?Q?3ElgSWhQy8RF2tvpu1B4Qa9TlG9JaaNWh7jz1eiA0I7lZJh0ev9EfDl9okrQ?= =?us-ascii?Q?fIMpDYOf3Hq+9hyHSbeOiSJvMw1djENAsQ1AAoECfYGKf0BRUDvQiXQO2pqk?= =?us-ascii?Q?tkG8EI/vuS1RQjimiFd0ASQRhgufuDRnRPU+XETAaoN226vf3lPk4yTYgldp?= =?us-ascii?Q?IkcP7u2x2c/yDC5BMXjtCakblwkHX90aBdllmOT69CInVmoWRHyu2G/2jgH1?= =?us-ascii?Q?BX7iBv4016JdnBoIEroaEQsKIIgSsaVw9qApk6CnWgJwJdTp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+4bLoW0ZNX5QdiRJBKFLyZSkUNgXeLSWX+srY98fMd5mfctj5u?= =?us-ascii?Q?BdlWvyeZSsRBgP+1mICusfr6BfNmE4fpiReWasdly/879UmkkzDBfuDn3kZg?= =?us-ascii?Q?tsG3/DSyzXVPb/hxuENCRzH2al9tg8+C+wMBzcGl7Li5+LYCSMs0LJQRUI3t?= =?us-ascii?Q?ar9YKNg9ZAvBgVyr0SzOoAeOXZPDTf97tIoi1daqiT6zGJCv56gyCukCWMzJ?= =?us-ascii?Q?FcDJ/5KzUaYnp3Rl4npih2I=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR11MB5863.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 789eb29b-8aad-4c53-8a44-08d9e1413c87 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jan 2022 03:00:55.2713 (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: s0mHoPdwBXdlGKPtb5IFWi6nlN0ekTwid9LrK7kiRU9/YR191/3K5mr33p6rk+GI92wDEzJgvjvuWnjAwp43Kg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4855 Return-Path: bob.c.feng@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Steven, I'd suggest appending the threads number to the --jobs FLAG. The threads nu= mber can be got via build.py ThreadNum(),=20 and suggest testing the incremental build functionality.=20 Thanks, Bob -----Original Message----- From: Shi, Steven =20 Sent: Monday, January 17, 2022 10:43 PM To: devel@edk2.groups.io Cc: Feng, Bob C ; Chen, Christine ; ardb@kernel.org; leif@nuviainc.com; Chang, Abner = ; Schaefer, Daniel ; Shi, Steven Subject: [PATCH 1/1] BaseTools: Enable GNU make parallel jobs by default BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3807 * Enable GNU make parallel jobs support(--jobs flag) by default in GCC5 and CLANGPDB toolchains. This gmake flag can save full features bios linux build time by +20%. * Explictly distinguish and define the MS nmake flag and GNU gmake flag in the toolchain which might support both, e.g. CLANGPDB can use nmake in Windows and gmake in Linux. General make flags cannot work for such hybrid make usage scenario. Signed-off-by: Steven Shi --- BaseTools/Conf/tools_def.template | 4 ++++ BaseTools/Source/Python/AutoGen/GenMake.py | 5 +++-- BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 12 +++++++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.t= emplate index 2e6b382ab623..84af08cca6ae 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -2283,6 +2283,8 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS =3D -z common-pa= ge-size=3D0x20 *_GCC5_*_*_FAMILY =3D GCC =20 *_GCC5_*_MAKE_PATH =3D DEF(GCC_HOST_PREFIX)make +*_GCC5_*_GMAKE_FLAGS =3D --jobs +*_GCC5_*_NMAKE_FLAGS =3D /nologo *_GCC5_*_*_DLL =3D ENV(GCC5_DLL) *_GCC5_*_ASL_PATH =3D DEF(UNIX_IASL_BIN) =20 @@ -2742,6 +2744,8 @@ RELEASE_CLANG38_AARCH64_DLINK_FLAGS =3D DEF(CLANG38_A= ARCH64_DLINK_FLAGS) -flto -Wl *_CLANGPDB_*_*_FAMILY =3D GCC *_CLANGPDB_*_*_BUILDRULEFAMILY =3D CLANGPDB *_CLANGPDB_*_MAKE_PATH =3D ENV(CLANG_HOST_BIN)make +*_CLANGPDB_*_GMAKE_FLAGS =3D --jobs +*_CLANGPDB_*_NMAKE_FLAGS =3D /nologo *_CLANGPDB_*_*_DLL =3D ENV(CLANGPDB_DLL) *_CLANGPDB_*_ASL_PATH =3D DEF(UNIX_IASL_BIN) =20 diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/= Python/AutoGen/GenMake.py index e55efff059f9..c6636d99fc7d 100755 --- a/BaseTools/Source/Python/AutoGen/GenMake.py +++ b/BaseTools/Source/Python/AutoGen/GenMake.py @@ -732,10 +732,11 @@ cleanlib: Src, Dst =3D CopyCmd Src =3D self.ReplaceMacro(Src) Dst =3D self.ReplaceMacro(Dst) + Efi =3D Src[:-3] + 'efi' if Dst not in self.ResultFileList: self.ResultFileList.append(Dst) if '%s :' %(Dst) not in self.BuildTargetList: - self.BuildTargetList.append("%s : %s" %(Dst,Src)) + self.BuildTargetList.append("%s : %s" %(Dst, Efi)) self.BuildTargetList.append('\t' + self._CP_TEMPLA= TE_[self._Platform] %{'Src': Src, 'Dst': Dst}) =20 FfsCmdList =3D Cmd[0] @@ -778,7 +779,7 @@ cleanlib: SecDepsFileList.append(SecCmdList[index + = 1]) index =3D index + 1 if CmdName =3D=3D 'Trim': - SecDepsFileList.append(os.path.join('$(DEBUG_D= IR)', os.path.basename(OutputFile).replace('offset', 'efi'))) + SecDepsFileList.append(os.path.join('$(OUTPUT_= DIR)', os.path.basename(OutputFile).replace('offset', 'efi'))) if OutputFile.endswith('.ui') or OutputFile.endswi= th('.ver'): SecDepsFileList.append(os.path.join('$(MODULE_= DIR)', '$(MODULE_FILE)')) self.FfsOutputFileList.append((OutputFile, ' '.joi= n(SecDepsFileList), SecCmdStr)) diff --git a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py b/BaseTools= /Source/Python/AutoGen/PlatformAutoGen.py index 592d4824a4b3..632c960c8d3d 100644 --- a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py +++ b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py @@ -893,7 +893,17 @@ class PlatformAutoGen(AutoGen): RetVal[Tool] =3D OrderedDict() if Attr not in RetVal[Tool]: RetVal[Tool][Attr] =3D Value - + if 'NMAKE' in RetVal.keys() or 'GMAKE' in RetVal.keys(): + if RetVal['MAKE']['PATH'] =3D=3D "nmake": + if 'FLAGS' in RetVal['MAKE'].keys(): + RetVal['MAKE']['FLAGS'] +=3D ' ' + RetVal['NMAKE']['FL= AGS'] + else: + RetVal['MAKE']['FLAGS'] =3D RetVal['NMAKE']['FLAGS'] + else: + if 'FLAGS' in RetVal['MAKE'].keys(): + RetVal['MAKE']['FLAGS'] +=3D ' ' + RetVal['GMAKE']['FL= AGS'] + else: + RetVal['MAKE']['FLAGS'] =3D RetVal['GMAKE']['FLAGS'] ToolsDef =3D '' if GlobalData.gOptions.SilentMode and "MAKE" in RetVal: if "FLAGS" not in RetVal["MAKE"]: --=20 2.22.0.windows.1