From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web10.4046.1573518112450500421 for ; Mon, 11 Nov 2019 16:21:52 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: bob.c.feng@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Nov 2019 16:21:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,294,1569308400"; d="scan'208";a="202487784" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga007.fm.intel.com with ESMTP; 11 Nov 2019 16:21:51 -0800 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 11 Nov 2019 16:21:51 -0800 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 11 Nov 2019 16:21:51 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.127]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.41]) with mapi id 14.03.0439.000; Tue, 12 Nov 2019 08:21:49 +0800 From: "Bob Feng" To: "Gao, Liming" , "devel@edk2.groups.io" Subject: Re: [edk2-devel] [Patch 0/4] Enhance Incremental Build Thread-Topic: [edk2-devel] [Patch 0/4] Enhance Incremental Build Thread-Index: AQHVmHQCxjwJ3zrJ2E2JTIUklfzjoKeGq+dQgAAA+gA= Date: Tue, 12 Nov 2019 00:21:48 +0000 Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D161562BF3@SHSMSX104.ccr.corp.intel.com> References: <20191111093956.17032-1-bob.c.feng@intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E53CC50@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E53CC50@SHSMSX104.ccr.corp.intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: bob.c.feng@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Yes. I agree. This patch if for next stable tag.=20 -----Original Message----- From: Gao, Liming=20 Sent: Tuesday, November 12, 2019 8:18 AM To: devel@edk2.groups.io; Feng, Bob C Subject: RE: [edk2-devel] [Patch 0/4] Enhance Incremental Build Bob: This is a fundamental change. It needs more review and test.=20 But now, 201911 stable tag softfreeze will be coming on 11-15. So, I don= 't think this change will catch 201911 stable tag. Right?=20 Thanks Liming >-----Original Message----- >From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of=20 >Bob Feng >Sent: Monday, November 11, 2019 5:40 PM >To: devel@edk2.groups.io >Subject: [edk2-devel] [Patch 0/4] Enhance Incremental Build > >Incremental build reduces the build time by only building the module=20 >that need to update. Edk2 Build system is a Makefile based build=20 >system. The incrememtal build ability is provided by the Make program.=20 >But Edk2 build tool need to generate correct makefile to have Make=20 >program do incremental build correctly. > >The current solution in build tool to support incremental build is that= =20 >build tool find out the include file list for each source file of a=20 >module, and in module's makefile, build tool add the include file list=20 >as the source file's dependency. >In this way Make program can decide if it need to rebuild a source code= =20 >by checking its dependency. This solution has 2 shortcommings, one is=20 >the process of finding include list is slow, the other is this method=20 >can't handle case that a MACRO in #include statement so the related=20 >source file is always built. > >This patch provides another method to support incremental build. That=20 >is to use c preprocessor and trim tool to generate dependency files for= =20 >the source file. >This method will save much time in AutoGen phase and handle MACRO in=20 >#include correctly. > >For C files: > 1. MSVS. > cl.exe has a build option /showIncludes to display include files = on stdout. >Build tool captures > that messages and generate dependency files, .deps files. > 2. CLANG and GCC > -MMD -MF build option are used to generate dependency files by=20 >preprocessor. Build tool updates the > .deps files. >For ASL files: > 1. Trim find out all the included files, which are asl specific=20 >include format, and generate .trim.deps file. > 2. ASL PP use c preprocessor to find out all included files with=20 >#include format and generate a .deps file > 3. build tool updates the .deps file For ASM files (.asm, .s or=20 >.nasm): > 1. Trim find out all the included files, which are asm specific=20 >include format, and generate .trim.deps file. > 2. ASM PP use c preprocessor to find out all included files with=20 >#include format and generate a deps file > 3. build tool updates the .deps file > >Build tool add "include" instruction for those deps files in the Makefile= . > >This patch does not support RVCT tool chain for the BZ >https://bugzilla.tianocore.org/show_bug.cgi?id=3D1750 > >Feng, Bob C (4): > BaseTools: Add build option for dependency file generation > BaseTools: Generate dependent files for ASL and ASM files > BaseTools: Update build_rule.txt to generate dependent files. > BaseTools: Enhance Basetool for incremental build > > BaseTools/Conf/build_rule.template | 94 ++++--- > BaseTools/Conf/tools_def.template | 173 ++++++------ > BaseTools/Source/Python/AutoGen/GenMake.py | 83 ++---- > .../Source/Python/AutoGen/IncludesAutoGen.py | 255 >++++++++++++++++++ > .../Source/Python/AutoGen/ModuleAutoGen.py | 23 ++ > BaseTools/Source/Python/Trim/Trim.py | 115 ++++++-- > BaseTools/Source/Python/build/build.py | 63 ++++- > 7 files changed, 588 insertions(+), 218 deletions(-) create mode=20 >100644 BaseTools/Source/Python/AutoGen/IncludesAutoGen.py > >-- >2.20.1.windows.1 > > >