[edk2-devel] [Patch 1/1] BaseTools: Fixed the issue of the CFlag for compile PcdValueInit.c
Liming Gao
liming.gao at intel.com
Mon Jul 8 02:06:47 UTC 2019
Reviewed-by: Liming Gao <liming.gao at intel.com>
> -----Original Message-----
> From: Feng, Bob C
> Sent: Monday, July 1, 2019 5:49 PM
> To: devel at edk2.groups.io
> Cc: Gao, Liming <liming.gao at intel.com>; Feng, Bob C <bob.c.feng at intel.com>
> Subject: [Patch 1/1] BaseTools: Fixed the issue of the CFlag for compile PcdValueInit.c
>
> This issue happens when using Structured PCD.
> Build tool use set to store the cflags for compile PcdValueInit.c,
> that is the order of cflags is disorder.
>
> This patch make -U, /U flags appear before -D, /D
>
> Cc: Liming Gao <liming.gao at intel.com>
> Signed-off-by: Bob Feng <bob.c.feng at intel.com>
> ---
> BaseTools/Source/Python/Workspace/DscBuildData.py | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py
> index 9f65ad54257d..985f8775259d 100644
> --- a/BaseTools/Source/Python/Workspace/DscBuildData.py
> +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
> @@ -2666,11 +2666,12 @@ class DscBuildData(PlatformBuildClassObject):
> if len(ArchBuildOptions.keys()) == 1:
> BuildOptions['COMMON'] |= (list(ArchBuildOptions.values())[0])
> elif len(ArchBuildOptions.keys()) > 1:
> CommonBuildOptions = reduce(lambda x,y: x&y, ArchBuildOptions.values())
> BuildOptions['COMMON'] |= CommonBuildOptions
> - ValueList = list(BuildOptions['COMMON'])
> + ValueList = [item for item in BuildOptions['COMMON'] if item.startswith((r"/U","-U"))]
> + ValueList.extend([item for item in BuildOptions['COMMON'] if item.startswith((r"/D", "-D"))])
> CC_FLAGS += " ".join(ValueList)
> MakeApp += CC_FLAGS
>
> if sys.platform == "win32":
> MakeApp = MakeApp + PcdMakefileEnd
> --
> 2.20.1.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#43391): https://edk2.groups.io/g/devel/message/43391
Mute This Topic: https://groups.io/mt/32269915/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list