From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web10.3549.1603328673927763836 for ; Wed, 21 Oct 2020 18:04:35 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Thu, 22 Oct 2020 09:04:27 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: "'Feng, Bob C'" , "'Sean Brogan'" , Cc: "'Chen, Christine'" , "'Kinney, Michael D'" , "'Sean Brogan'" References: <20201015112037.26556-1-bob.c.feng@intel.com> <000701d6a5b3$a50ed4f0$ef2c7ed0$@byosoft.com.cn> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BhdGNoXSBCYXNlVG9vbHM6IEZpeCBQY2RWYWx1ZUluaXQgdG9vbCBidWlsZCBpc3N1ZSB3aXRoIFZTIGNvbXBpbGVyIHg2NA==?= Date: Thu, 22 Oct 2020 09:04:29 +0800 Message-ID: <008501d6a80f$4b8e2170$e2aa6450$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQLrgAxI5MVKTkD210Opd6iTWwnPmwOQzVMxARD0JSEA4rEUfadM+tLw Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Got it. Reviewed-by: Liming Gao =20 > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: Feng, Bob C > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: = 2020=E5=B9=B410=E6=9C=8819=E6=97=A5 9:57 > =E6=94=B6=E4=BB=B6=E4=BA=BA: gaoliming ; = 'Sean Brogan' > ; devel@edk2.groups.io > =E6=8A=84=E9=80=81: Chen, Christine ; Kinney, = Michael D > ; 'Sean Brogan' = > =E4=B8=BB=E9=A2=98: RE: [edk2-devel] [Patch] BaseTools: Fix = PcdValueInit tool build issue > with VS compiler x64 >=20 > Liming, >=20 > To reproduce the issue and verify the change locally you can do, >=20 > 1. Clone edk2 > a. Git clone https://github.com/tianocore/edk2 > b. Cd edk2 > 2. Add Matts repo as a remote. > a. git remote add matt https://github.com/matthewfcarlson/edk2.git > b. git fetch --all --prune > 3. check out his branch > a. git checkout matt/personal/macarl/test-array-struct-pcd > 4. Create a virtual environment > a. Cd .. > b. Python -m venv venv > 5. Activate it > a. Venv/scripts/activate > 6. Cd edk2 > 7. Pip install -r pip-requirements.txt > 8. stuart_setup -c .pytool\CISettings.py -p MdeModulePkg -a X64 > TOOL_CHAIN_TAG=3DVS2019 > 9. stuart_update -c .pytool\CISettings.py -p MdeModulePkg -a X64 > TOOL_CHAIN_TAG=3DVS2019 > 10. stuart_ci_build -c .pytool\CISettings.py -p MdeModulePkg -a X64 > TOOL_CHAIN_TAG=3DVS2019 >=20 > Thanks, > Bob >=20 > -----Original Message----- > From: gaoliming > Sent: Monday, October 19, 2020 9:03 AM > To: 'Sean Brogan' ; devel@edk2.groups.io; Feng, > Bob C > Cc: Chen, Christine ; Kinney, Michael D > ; 'Sean Brogan' = > Subject: =E5=9B=9E=E5=A4=8D: [edk2-devel] [Patch] BaseTools: Fix = PcdValueInit tool build > issue with VS compiler x64 >=20 > Sean and Bob: > How verify this change? >=20 > Thanks > Liming > > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > > =E5=8F=91=E4=BB=B6=E4=BA=BA: Sean Brogan > > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: = 2020=E5=B9=B410=E6=9C=8817=E6=97=A5 6:17 > > =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io; = bob.c.feng@intel.com > > =E6=8A=84=E9=80=81: Liming Gao ; Yuwei = Chen > > ; Michael D Kinney > ; > > Sean Brogan > > =E4=B8=BB=E9=A2=98: Re: [edk2-devel] [Patch] BaseTools: Fix = PcdValueInit tool build > > issue with VS compiler x64 > > > > Reviewed-by: Sean Brogan > > > > On 10/15/2020 4:20 AM, Bob Feng wrote: > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3001 > > > > > > When the 64-bit version of VS compiler is used, the generated > > > PcdValueInit tool will be failed to compile. > > > > > > This patch is going to fix that issue. > > > > > > Signed-off-by: Bob Feng > > > Cc: Liming Gao > > > Cc: Yuwei Chen > > > Cc: Michael D Kinney > > > Cc: Sean Brogan > > > > > > --- > > > BaseTools/Source/C/Common/PcdValueCommon.h | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/BaseTools/Source/C/Common/PcdValueCommon.h > > b/BaseTools/Source/C/Common/PcdValueCommon.h > > > index cfd3bb76e1..1652bd5430 100644 > > > --- a/BaseTools/Source/C/Common/PcdValueCommon.h > > > +++ b/BaseTools/Source/C/Common/PcdValueCommon.h > > > @@ -12,11 +12,11 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > > > #include > > > #include > > > > > > #define __FIELD_SIZE(TYPE, Field) (sizeof((TYPE *)0)->Field) > > > #define __ARRAY_ELEMENT_SIZE(TYPE, Field) (sizeof((TYPE > > *)0)->Field[0]) > > > -#define __OFFSET_OF(TYPE, Field) ((UINT32) &(((TYPE *)0)->Field)) > > > +#define __OFFSET_OF(TYPE, Field) ((UINT32)(size_t) &(((TYPE > > > +*)0)->Field)) > > > #define __FLEXIBLE_SIZE(Size, TYPE, Field, MaxIndex) if > > (__FIELD_SIZE(TYPE, Field) =3D=3D 0) Size =3D MAX((__OFFSET_OF(TYPE, = Field) > > + __ARRAY_ELEMENT_SIZE(TYPE, Field) * (MaxIndex)), Size) > > > #define __ARRAY_SIZE(Array) (sizeof(Array)/sizeof(Array[0])) > > > > > > #if defined(_MSC_EXTENSIONS) > > > #define __STATIC_ASSERT static_assert > > > >=20