From: "Steven Shi" <steven.shi@intel.com>
To: "ardb@kernel.org" <ardb@kernel.org>,
"leif@nuviainc.com" <leif@nuviainc.com>,
"Chang, Abner" <abner.chang@hpe.com>,
"Schaefer, Daniel" <daniel.schaefer@hpe.com>
Cc: "Feng, Bob C" <bob.c.feng@intel.com>,
"Chen, Christine" <yuwei.chen@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools: Enable GNU make parallel jobs by default
Date: Wed, 19 Jan 2022 10:52:05 +0000 [thread overview]
Message-ID: <DM4PR11MB5549C685194FC30422E9B7018C599@DM4PR11MB5549.namprd11.prod.outlook.com> (raw)
In-Reply-To: <DM4PR11MB55492723CA8373259A8DBCFB8C579@DM4PR11MB5549.namprd11.prod.outlook.com>
Hello Ard, Leif, Abner, Daniel,
Are you ok to enable the GNU make "--jobs" option in GCC5 toolchain by default?
Thanks
Steven Shi
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Steven
> Shi
> Sent: Monday, January 17, 2022 10:54 PM
> To: ardb@kernel.org; leif@nuviainc.com; Chang, Abner
> <abner.chang@hpe.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>
> Cc: Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine
> <yuwei.chen@intel.com>; devel@edk2.groups.io
> Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools: Enable GNU make parallel
> jobs by default
>
> Hello Ard, Leif, Abner, Daniel,
> I changed the GNU make flag to enable the "--jobs" option in GCC5 toolchain
> by default for all architectures. Please verify whether this change has impact
> to the ARM and RISCV GCC5 builds. Thanks!
>
>
> Thanks
> Steven Shi
>
> > -----Original Message-----
> > From: Shi, Steven <steven.shi@intel.com>
> > Sent: Monday, January 17, 2022 10:43 PM
> > To: devel@edk2.groups.io
> > Cc: Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine
> > <yuwei.chen@intel.com>; ardb@kernel.org; leif@nuviainc.com; Chang,
> > Abner <abner.chang@hpe.com>; Schaefer, Daniel
> > <daniel.schaefer@hpe.com>; Shi, Steven <steven.shi@intel.com>
> > Subject: [PATCH 1/1] BaseTools: Enable GNU make parallel jobs by default
> >
> > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3807
> >
> > * 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 <steven.shi@intel.com>
> > ---
> > 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.template
> > 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 = -
> z
> > common-page-size=0x20
> > *_GCC5_*_*_FAMILY = GCC
> >
> >
> >
> > *_GCC5_*_MAKE_PATH = DEF(GCC_HOST_PREFIX)make
> >
> > +*_GCC5_*_GMAKE_FLAGS = --jobs
> >
> > +*_GCC5_*_NMAKE_FLAGS = /nologo
> >
> > *_GCC5_*_*_DLL = ENV(GCC5_DLL)
> >
> > *_GCC5_*_ASL_PATH = DEF(UNIX_IASL_BIN)
> >
> >
> >
> > @@ -2742,6 +2744,8 @@ RELEASE_CLANG38_AARCH64_DLINK_FLAGS =
> > DEF(CLANG38_AARCH64_DLINK_FLAGS) -flto -Wl
> > *_CLANGPDB_*_*_FAMILY = GCC
> >
> > *_CLANGPDB_*_*_BUILDRULEFAMILY = CLANGPDB
> >
> > *_CLANGPDB_*_MAKE_PATH = ENV(CLANG_HOST_BIN)make
> >
> > +*_CLANGPDB_*_GMAKE_FLAGS = --jobs
> >
> > +*_CLANGPDB_*_NMAKE_FLAGS = /nologo
> >
> > *_CLANGPDB_*_*_DLL = ENV(CLANGPDB_DLL)
> >
> > *_CLANGPDB_*_ASL_PATH = DEF(UNIX_IASL_BIN)
> >
> >
> >
> > 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 = CopyCmd
> >
> > Src = self.ReplaceMacro(Src)
> >
> > Dst = self.ReplaceMacro(Dst)
> >
> > + Efi = 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_TEMPLATE_[self._Platform] %{'Src': Src, 'Dst': Dst})
> >
> >
> >
> > FfsCmdList = Cmd[0]
> >
> > @@ -778,7 +779,7 @@ cleanlib:
> > SecDepsFileList.append(SecCmdList[index + 1])
> >
> > index = index + 1
> >
> > if CmdName == 'Trim':
> >
> > - SecDepsFileList.append(os.path.join('$(DEBUG_DIR)',
> > 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.endswith('.ver'):
> >
> > SecDepsFileList.append(os.path.join('$(MODULE_DIR)',
> > '$(MODULE_FILE)'))
> >
> > self.FfsOutputFileList.append((OutputFile, '
> > '.join(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] = OrderedDict()
> >
> > if Attr not in RetVal[Tool]:
> >
> > RetVal[Tool][Attr] = Value
> >
> > -
> >
> > + if 'NMAKE' in RetVal.keys() or 'GMAKE' in RetVal.keys():
> >
> > + if RetVal['MAKE']['PATH'] == "nmake":
> >
> > + if 'FLAGS' in RetVal['MAKE'].keys():
> >
> > + RetVal['MAKE']['FLAGS'] += ' ' + RetVal['NMAKE']['FLAGS']
> >
> > + else:
> >
> > + RetVal['MAKE']['FLAGS'] = RetVal['NMAKE']['FLAGS']
> >
> > + else:
> >
> > + if 'FLAGS' in RetVal['MAKE'].keys():
> >
> > + RetVal['MAKE']['FLAGS'] += ' ' + RetVal['GMAKE']['FLAGS']
> >
> > + else:
> >
> > + RetVal['MAKE']['FLAGS'] = RetVal['GMAKE']['FLAGS']
> >
> > ToolsDef = ''
> >
> > if GlobalData.gOptions.SilentMode and "MAKE" in RetVal:
> >
> > if "FLAGS" not in RetVal["MAKE"]:
> >
> > --
> > 2.22.0.windows.1
>
>
>
>
>
next prev parent reply other threads:[~2022-01-19 10:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-17 14:42 [PATCH 0/1] Enable GNU make parallel jobs by default for GCC5 and CLANGPDB ToolChains Steven Shi
2022-01-17 14:42 ` [PATCH 1/1] BaseTools: Enable GNU make parallel jobs by default Steven Shi
2022-01-17 14:54 ` Steven Shi
2022-01-19 10:52 ` Steven Shi [this message]
2022-01-19 15:03 ` [edk2-devel] " Abner Chang
2022-01-27 3:00 ` Bob Feng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DM4PR11MB5549C685194FC30422E9B7018C599@DM4PR11MB5549.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox