From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web11.54202.1583753650012523844 for ; Mon, 09 Mar 2020 04:34:10 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: liming.gao@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Mar 2020 04:34:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,533,1574150400"; d="scan'208";a="276482065" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga002.fm.intel.com with ESMTP; 09 Mar 2020 04:34:09 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 9 Mar 2020 04:34:09 -0700 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by SHSMSX601.ccr.corp.intel.com (10.109.6.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 9 Mar 2020 19:34:07 +0800 Received: from shsmsx606.ccr.corp.intel.com ([10.109.6.216]) by SHSMSX606.ccr.corp.intel.com ([10.109.6.216]) with mapi id 15.01.1713.004; Mon, 9 Mar 2020 19:34:07 +0800 From: "Liming Gao" To: "Fan, ZhijuX" , "devel@edk2.groups.io" CC: "Feng, Bob C" , "Gao, Liming" Subject: Re: [PATCH 1/1] BaseTools:copy the common PcdValueCommon.obj to output directory Thread-Topic: [PATCH 1/1] BaseTools:copy the common PcdValueCommon.obj to output directory Thread-Index: AQHV9eG1GiGDaSB3CEWHbXfSBKcy1qhAIUPQ Date: Mon, 9 Mar 2020 11:34:07 +0000 Message-ID: <96018521b45b4ed69dd4323a94bb6a9f@intel.com> References: <20200309070856.21052-1-zhijux.fan@intel.com> In-Reply-To: <20200309070856.21052-1-zhijux.fan@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-product: dlpe-windows dlp-reaction: no-action x-originating-ip: [10.239.127.36] MIME-Version: 1.0 Return-Path: liming.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Zhiju: Please specify the command of copy source file PcdValueCommon.c in the ge= nerated Makefile instead of do it in python script. Thanks Liming > -----Original Message----- > From: Fan, ZhijuX > Sent: Monday, March 9, 2020 3:09 PM > To: devel@edk2.groups.io > Cc: Gao, Liming ; Feng, Bob C ; Fan, ZhijuX > Subject: [PATCH 1/1] BaseTools:copy the common PcdValueCommon.obj to outp= ut directory >=20 > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2568 >=20 > PcdValueInit shares the same Edk2\BaseTools\Source\C\PcdValueCommon.obj. > To avoid the conflict, it should copy this file to its output directory, > If so, PcdValueCommon.obj file will be private for PcdValueInit >=20 > Cc: Liming Gao > Cc: Bob Feng > Signed-off-by: Zhiju.Fan > --- > BaseTools/Source/Python/Workspace/DscBuildData.py | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) >=20 > diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTool= s/Source/Python/Workspace/DscBuildData.py > index 476c7edaf9da..15c4a0c4ab01 100644 > --- a/BaseTools/Source/Python/Workspace/DscBuildData.py > +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py > @@ -55,6 +55,7 @@ def _IsFieldValueAnArray (Value): > return False >=20 > PcdValueInitName =3D 'PcdValueInit' > +PcdValueCommonName =3D 'PcdValueCommon' >=20 > PcdMainCHeader =3D ''' > /** > @@ -2634,10 +2635,14 @@ class DscBuildData(PlatformBuildClassObject): >=20 > MakeApp =3D PcdMakefileHeader > if sys.platform =3D=3D "win32": > - MakeApp =3D MakeApp + 'APPFILE =3D %s\%s.exe\n' % (self.Outp= utPath, PcdValueInitName) + 'APPNAME =3D %s\n' % > (PcdValueInitName) + 'OBJECTS =3D %s\%s.obj %s.obj\n' % (self.OutputPath,= PcdValueInitName, > os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"], "S= ource/C/Common/PcdValueCommon"))) + 'INC =3D ' > + PcdValueCommonPath =3D os.path.normpath(mws.join(GlobalData.= gGlobalDefines["EDK_TOOLS_PATH"], > "Source/C/Common/PcdValueCommon")) > + shutil.copy2('%s.obj' % PcdValueCommonPath, os.path.join(sel= f.OutputPath,'%s.obj' % PcdValueCommonName)) > + MakeApp =3D MakeApp + 'APPFILE =3D %s\%s.exe\n' % (self.Outp= utPath, PcdValueInitName) + 'APPNAME =3D %s\n' % > (PcdValueInitName) + 'OBJECTS =3D %s\%s.obj %s.obj\n' % (self.OutputPath,= PcdValueInitName, os.path.join(self.OutputPath,'%s' % > PcdValueCommonName)) + 'INC =3D ' > else: > MakeApp =3D MakeApp + PcdGccMakefile > - MakeApp =3D MakeApp + 'APPFILE =3D %s/%s\n' % (self.OutputPa= th, PcdValueInitName) + 'APPNAME =3D %s\n' % (PcdValueInitName) > + 'OBJECTS =3D %s/%s.o %s.o\n' % (self.OutputPath, PcdValueInitName, > os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"], "S= ource/C/Common/PcdValueCommon"))) + \ > + PcdValueCommonPath =3D os.path.normpath(mws.join(GlobalData.= gGlobalDefines["EDK_TOOLS_PATH"], > "Source/C/Common/PcdValueCommon")) > + shutil.copy2('%s.o' % PcdValueCommonPath, os.path.join(self.= OutputPath, '%s.o' % PcdValueCommonName)) > + MakeApp =3D MakeApp + 'APPFILE =3D %s/%s\n' % (self.OutputPa= th, PcdValueInitName) + 'APPNAME =3D %s\n' % (PcdValueInitName) > + 'OBJECTS =3D %s/%s.o %s.o\n' % (self.OutputPath, PcdValueInitName, os.p= ath.join(self.OutputPath,'%s' % PcdValueCommonName)) + \ > 'include $(MAKEROOT)/Makefiles/app.makefile\n' + '= INCLUDE +=3D' >=20 > IncSearchList =3D [] > -- > 2.14.1.windows.1