From: "Liming Gao" <liming.gao@intel.com>
To: "Feng, Bob C" <bob.c.feng@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Subject: Re: [Patch 1/1] BaseTools: Fixed the issue of the CFlag for compile PcdValueInit.c
Date: Mon, 8 Jul 2019 02:06:47 +0000 [thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E4A3768@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <20190701094851.19940-1-bob.c.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
> -----Original Message-----
> From: Feng, Bob C
> Sent: Monday, July 1, 2019 5:49 PM
> To: devel@edk2.groups.io
> Cc: Gao, Liming <liming.gao@intel.com>; Feng, Bob C <bob.c.feng@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@intel.com>
> Signed-off-by: Bob Feng <bob.c.feng@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
prev parent reply other threads:[~2019-07-08 2:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-01 9:48 [Patch 1/1] BaseTools: Fixed the issue of the CFlag for compile PcdValueInit.c Bob Feng
2019-07-08 2:06 ` Liming Gao [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A89E2EF3DFEDB4C8BFDE51014F606A14E4A3768@SHSMSX104.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox