public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] BaseTools: Fix PcdValueInit tool build issue with VS compiler x64
@ 2020-10-15 11:20 Bob Feng
  2020-10-16 22:17 ` [edk2-devel] " Sean
  0 siblings, 1 reply; 6+ messages in thread
From: Bob Feng @ 2020-10-15 11:20 UTC (permalink / raw)
  To: devel; +Cc: Liming Gao, Yuwei Chen, Michael D Kinney, Sean Brogan

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3001

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 <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>

---
 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 <Common/UefiBaseTypes.h>
 #include <Common/UefiInternalFormRepresentation.h>
 
 #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) == 0) Size = 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
-- 
2.20.1.windows.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [edk2-devel] [Patch] BaseTools: Fix PcdValueInit tool build issue with VS compiler x64
  2020-10-15 11:20 [Patch] BaseTools: Fix PcdValueInit tool build issue with VS compiler x64 Bob Feng
@ 2020-10-16 22:17 ` Sean
  2020-10-19  1:03   ` 回复: " gaoliming
  0 siblings, 1 reply; 6+ messages in thread
From: Sean @ 2020-10-16 22:17 UTC (permalink / raw)
  To: devel, bob.c.feng; +Cc: Liming Gao, Yuwei Chen, Michael D Kinney, Sean Brogan

Reviewed-by: Sean Brogan <sean.brogan@microsoft.com>

On 10/15/2020 4:20 AM, Bob Feng wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3001
> 
> 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 <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Sean Brogan <sean.brogan@microsoft.com>
> 
> ---
>   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 <Common/UefiBaseTypes.h>
>   #include <Common/UefiInternalFormRepresentation.h>
>   
>   #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) == 0) Size = 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
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* 回复: [edk2-devel] [Patch] BaseTools: Fix PcdValueInit tool build issue with VS compiler x64
  2020-10-16 22:17 ` [edk2-devel] " Sean
@ 2020-10-19  1:03   ` gaoliming
  2020-10-19  1:56     ` Bob Feng
  0 siblings, 1 reply; 6+ messages in thread
From: gaoliming @ 2020-10-19  1:03 UTC (permalink / raw)
  To: 'Sean Brogan', devel, bob.c.feng
  Cc: 'Yuwei Chen', 'Michael D Kinney',
	'Sean Brogan'

Sean and Bob:
  How verify this change?

Thanks
Liming
> -----邮件原件-----
> 发件人: Sean Brogan <spbrogan@outlook.com>
> 发送时间: 2020年10月17日 6:17
> 收件人: devel@edk2.groups.io; bob.c.feng@intel.com
> 抄送: Liming Gao <gaoliming@byosoft.com.cn>; Yuwei Chen
> <yuwei.chen@intel.com>; Michael D Kinney <michael.d.kinney@intel.com>;
> Sean Brogan <sean.brogan@microsoft.com>
> 主题: Re: [edk2-devel] [Patch] BaseTools: Fix PcdValueInit tool build issue
> with VS compiler x64
> 
> Reviewed-by: Sean Brogan <sean.brogan@microsoft.com>
> 
> On 10/15/2020 4:20 AM, Bob Feng wrote:
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3001
> >
> > 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 <bob.c.feng@intel.com>
> > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > Cc: Yuwei Chen <yuwei.chen@intel.com>
> > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > Cc: Sean Brogan <sean.brogan@microsoft.com>
> >
> > ---
> >   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 <Common/UefiBaseTypes.h>
> >   #include <Common/UefiInternalFormRepresentation.h>
> >
> >   #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) == 0) Size = 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
> >



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [edk2-devel] [Patch] BaseTools: Fix PcdValueInit tool build issue with VS compiler x64
  2020-10-19  1:03   ` 回复: " gaoliming
@ 2020-10-19  1:56     ` Bob Feng
  2020-10-22  1:04       ` 回复: " gaoliming
  0 siblings, 1 reply; 6+ messages in thread
From: Bob Feng @ 2020-10-19  1:56 UTC (permalink / raw)
  To: gaoliming, 'Sean Brogan', devel@edk2.groups.io
  Cc: Chen, Christine, Kinney, Michael D, 'Sean Brogan'

Liming,

To reproduce the issue and verify the change locally you can do,

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=VS2019
9. stuart_update -c .pytool\CISettings.py -p MdeModulePkg -a X64 TOOL_CHAIN_TAG=VS2019
10. stuart_ci_build -c .pytool\CISettings.py -p MdeModulePkg -a X64 TOOL_CHAIN_TAG=VS2019

Thanks,
Bob

-----Original Message-----
From: gaoliming <gaoliming@byosoft.com.cn> 
Sent: Monday, October 19, 2020 9:03 AM
To: 'Sean Brogan' <spbrogan@outlook.com>; devel@edk2.groups.io; Feng, Bob C <bob.c.feng@intel.com>
Cc: Chen, Christine <yuwei.chen@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; 'Sean Brogan' <sean.brogan@microsoft.com>
Subject: 回复: [edk2-devel] [Patch] BaseTools: Fix PcdValueInit tool build issue with VS compiler x64

Sean and Bob:
  How verify this change?

Thanks
Liming
> -----邮件原件-----
> 发件人: Sean Brogan <spbrogan@outlook.com>
> 发送时间: 2020年10月17日 6:17
> 收件人: devel@edk2.groups.io; bob.c.feng@intel.com
> 抄送: Liming Gao <gaoliming@byosoft.com.cn>; Yuwei Chen 
> <yuwei.chen@intel.com>; Michael D Kinney <michael.d.kinney@intel.com>; 
> Sean Brogan <sean.brogan@microsoft.com>
> 主题: Re: [edk2-devel] [Patch] BaseTools: Fix PcdValueInit tool build 
> issue with VS compiler x64
> 
> Reviewed-by: Sean Brogan <sean.brogan@microsoft.com>
> 
> On 10/15/2020 4:20 AM, Bob Feng wrote:
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3001
> >
> > 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 <bob.c.feng@intel.com>
> > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > Cc: Yuwei Chen <yuwei.chen@intel.com>
> > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > Cc: Sean Brogan <sean.brogan@microsoft.com>
> >
> > ---
> >   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 <Common/UefiBaseTypes.h>
> >   #include <Common/UefiInternalFormRepresentation.h>
> >
> >   #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) == 0) Size = 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
> >



^ permalink raw reply	[flat|nested] 6+ messages in thread

* 回复: [edk2-devel] [Patch] BaseTools: Fix PcdValueInit tool build issue with VS compiler x64
  2020-10-19  1:56     ` Bob Feng
@ 2020-10-22  1:04       ` gaoliming
  2020-10-26  3:21         ` Bob Feng
  0 siblings, 1 reply; 6+ messages in thread
From: gaoliming @ 2020-10-22  1:04 UTC (permalink / raw)
  To: 'Feng, Bob C', 'Sean Brogan', devel
  Cc: 'Chen, Christine', 'Kinney, Michael D',
	'Sean Brogan'

Got it. Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> 

> -----邮件原件-----
> 发件人: Feng, Bob C <bob.c.feng@intel.com>
> 发送时间: 2020年10月19日 9:57
> 收件人: gaoliming <gaoliming@byosoft.com.cn>; 'Sean Brogan'
> <spbrogan@outlook.com>; devel@edk2.groups.io
> 抄送: Chen, Christine <yuwei.chen@intel.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>; 'Sean Brogan' <sean.brogan@microsoft.com>
> 主题: RE: [edk2-devel] [Patch] BaseTools: Fix PcdValueInit tool build issue
> with VS compiler x64
> 
> Liming,
> 
> To reproduce the issue and verify the change locally you can do,
> 
> 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=VS2019
> 9. stuart_update -c .pytool\CISettings.py -p MdeModulePkg -a X64
> TOOL_CHAIN_TAG=VS2019
> 10. stuart_ci_build -c .pytool\CISettings.py -p MdeModulePkg -a X64
> TOOL_CHAIN_TAG=VS2019
> 
> Thanks,
> Bob
> 
> -----Original Message-----
> From: gaoliming <gaoliming@byosoft.com.cn>
> Sent: Monday, October 19, 2020 9:03 AM
> To: 'Sean Brogan' <spbrogan@outlook.com>; devel@edk2.groups.io; Feng,
> Bob C <bob.c.feng@intel.com>
> Cc: Chen, Christine <yuwei.chen@intel.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>; 'Sean Brogan' <sean.brogan@microsoft.com>
> Subject: 回复: [edk2-devel] [Patch] BaseTools: Fix PcdValueInit tool build
> issue with VS compiler x64
> 
> Sean and Bob:
>   How verify this change?
> 
> Thanks
> Liming
> > -----邮件原件-----
> > 发件人: Sean Brogan <spbrogan@outlook.com>
> > 发送时间: 2020年10月17日 6:17
> > 收件人: devel@edk2.groups.io; bob.c.feng@intel.com
> > 抄送: Liming Gao <gaoliming@byosoft.com.cn>; Yuwei Chen
> > <yuwei.chen@intel.com>; Michael D Kinney
> <michael.d.kinney@intel.com>;
> > Sean Brogan <sean.brogan@microsoft.com>
> > 主题: Re: [edk2-devel] [Patch] BaseTools: Fix PcdValueInit tool build
> > issue with VS compiler x64
> >
> > Reviewed-by: Sean Brogan <sean.brogan@microsoft.com>
> >
> > On 10/15/2020 4:20 AM, Bob Feng wrote:
> > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3001
> > >
> > > 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 <bob.c.feng@intel.com>
> > > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > > Cc: Yuwei Chen <yuwei.chen@intel.com>
> > > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > > Cc: Sean Brogan <sean.brogan@microsoft.com>
> > >
> > > ---
> > >   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 <Common/UefiBaseTypes.h>
> > >   #include <Common/UefiInternalFormRepresentation.h>
> > >
> > >   #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) == 0) Size = 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
> > >
> 




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [edk2-devel] [Patch] BaseTools: Fix PcdValueInit tool build issue with VS compiler x64
  2020-10-22  1:04       ` 回复: " gaoliming
@ 2020-10-26  3:21         ` Bob Feng
  0 siblings, 0 replies; 6+ messages in thread
From: Bob Feng @ 2020-10-26  3:21 UTC (permalink / raw)
  To: devel@edk2.groups.io, gaoliming@byosoft.com.cn,
	'Sean Brogan'
  Cc: Chen, Christine, Kinney, Michael D, 'Sean Brogan'

Merged commit b70c4fd into tianocore:master.

-Bob

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of gaoliming
Sent: Thursday, October 22, 2020 9:04 AM
To: Feng, Bob C <bob.c.feng@intel.com>; 'Sean Brogan' <spbrogan@outlook.com>; devel@edk2.groups.io
Cc: Chen, Christine <yuwei.chen@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; 'Sean Brogan' <sean.brogan@microsoft.com>
Subject: 回复: [edk2-devel] [Patch] BaseTools: Fix PcdValueInit tool build issue with VS compiler x64

Got it. Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> 

> -----邮件原件-----
> 发件人: Feng, Bob C <bob.c.feng@intel.com>
> 发送时间: 2020年10月19日 9:57
> 收件人: gaoliming <gaoliming@byosoft.com.cn>; 'Sean Brogan'
> <spbrogan@outlook.com>; devel@edk2.groups.io
> 抄送: Chen, Christine <yuwei.chen@intel.com>; Kinney, Michael D 
> <michael.d.kinney@intel.com>; 'Sean Brogan' 
> <sean.brogan@microsoft.com>
> 主题: RE: [edk2-devel] [Patch] BaseTools: Fix PcdValueInit tool build 
> issue with VS compiler x64
> 
> Liming,
> 
> To reproduce the issue and verify the change locally you can do,
> 
> 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=VS2019
> 9. stuart_update -c .pytool\CISettings.py -p MdeModulePkg -a X64
> TOOL_CHAIN_TAG=VS2019
> 10. stuart_ci_build -c .pytool\CISettings.py -p MdeModulePkg -a X64
> TOOL_CHAIN_TAG=VS2019
> 
> Thanks,
> Bob
> 
> -----Original Message-----
> From: gaoliming <gaoliming@byosoft.com.cn>
> Sent: Monday, October 19, 2020 9:03 AM
> To: 'Sean Brogan' <spbrogan@outlook.com>; devel@edk2.groups.io; Feng, 
> Bob C <bob.c.feng@intel.com>
> Cc: Chen, Christine <yuwei.chen@intel.com>; Kinney, Michael D 
> <michael.d.kinney@intel.com>; 'Sean Brogan' 
> <sean.brogan@microsoft.com>
> Subject: 回复: [edk2-devel] [Patch] BaseTools: Fix PcdValueInit tool 
> build issue with VS compiler x64
> 
> Sean and Bob:
>   How verify this change?
> 
> Thanks
> Liming
> > -----邮件原件-----
> > 发件人: Sean Brogan <spbrogan@outlook.com>
> > 发送时间: 2020年10月17日 6:17
> > 收件人: devel@edk2.groups.io; bob.c.feng@intel.com
> > 抄送: Liming Gao <gaoliming@byosoft.com.cn>; Yuwei Chen 
> > <yuwei.chen@intel.com>; Michael D Kinney
> <michael.d.kinney@intel.com>;
> > Sean Brogan <sean.brogan@microsoft.com>
> > 主题: Re: [edk2-devel] [Patch] BaseTools: Fix PcdValueInit tool build 
> > issue with VS compiler x64
> >
> > Reviewed-by: Sean Brogan <sean.brogan@microsoft.com>
> >
> > On 10/15/2020 4:20 AM, Bob Feng wrote:
> > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3001
> > >
> > > 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 <bob.c.feng@intel.com>
> > > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > > Cc: Yuwei Chen <yuwei.chen@intel.com>
> > > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > > Cc: Sean Brogan <sean.brogan@microsoft.com>
> > >
> > > ---
> > >   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 <Common/UefiBaseTypes.h>
> > >   #include <Common/UefiInternalFormRepresentation.h>
> > >
> > >   #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) == 0) Size = 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
> > >
> 









^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-10-26  3:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-15 11:20 [Patch] BaseTools: Fix PcdValueInit tool build issue with VS compiler x64 Bob Feng
2020-10-16 22:17 ` [edk2-devel] " Sean
2020-10-19  1:03   ` 回复: " gaoliming
2020-10-19  1:56     ` Bob Feng
2020-10-22  1:04       ` 回复: " gaoliming
2020-10-26  3:21         ` Bob Feng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox