From: "Rebecca Cran" <rebecca@bsdio.com>
To: devel@edk2.groups.io, Bret Barkelew <Bret.Barkelew@microsoft.com>,
Sean Brogan <sean.brogan@microsoft.com>,
Chris Fernald <chris.fernald@outlook.com>,
Bob Feng <bob.c.feng@intel.com>,
Michael Kubacki <michael.kubacki@microsoft.com>,
Oliver Steffen <osteffen@redhat.com>,
Liming Gao <gaoliming@byosoft.com.cn>,
Michael D Kinney <michael.d.kinney@intel.com>
Subject: Re: [PATCH edk2-basetools v2 1/1] Change BUILD_CFLAGS to CFLAGS to match edk2 BaseTools change
Date: Mon, 3 Apr 2023 10:10:59 -0600 [thread overview]
Message-ID: <6360facc-a361-9da4-fa08-67e0cb39ae2d@bsdio.com> (raw)
In-Reply-To: <20230331134845.1422257-2-rebecca@bsdio.com>
Mike, Liming:
Could you review/approve this v2 patch please?
Thanks.
Rebecca Cran
On 3/31/23 7:48 AM, Rebecca Cran wrote:
> In order to support building BaseTools using non-default compilers, a
> change is being made in the edk2 BaseTools directory to remove the
> 'BUILD_' prefix to CC, CXX, CFLAGS etc. so developers can for example
> run 'make CC=clang CXX=clang++' to build using clang.
>
> Update DscBuildData.py to generate Makefiles with both BUILD_CFLAGS and
> CFLAGS for compatibility until everyone is using a version of
> edk2 that expects CFLAGS.
>
> Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
> ---
> edk2basetools/Workspace/DscBuildData.py | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/edk2basetools/Workspace/DscBuildData.py b/edk2basetools/Workspace/DscBuildData.py
> index ff5662f35702..f6bf326018c6 100644
> --- a/edk2basetools/Workspace/DscBuildData.py
> +++ b/edk2basetools/Workspace/DscBuildData.py
> @@ -89,7 +89,8 @@ def _IsFieldValueAnArray (Value):
> '''
>
> WindowsCFLAGS = 'CFLAGS = $(CFLAGS) /wd4200 /wd4034 /wd4101 '
> -LinuxCFLAGS = 'BUILD_CFLAGS += -Wno-pointer-to-int-cast -Wno-unused-variable '
> +LinuxCFLAGS = 'CFLAGS += -Wno-pointer-to-int-cast -Wno-unused-variable '
> +LinuxCFLAGS2 = 'BUILD_CFLAGS += -Wno-pointer-to-int-cast -Wno-unused-variable '
> PcdMakefileEnd = '''
> !INCLUDE $(BASE_TOOLS_PATH)\Source\C\Makefiles\ms.common
> !INCLUDE $(BASE_TOOLS_PATH)\Source\C\Makefiles\ms.app
> @@ -2891,6 +2892,7 @@ def GenerateByteArrayValue (self, StructuredPcds):
> MakeApp = MakeApp + '\n'
>
> CC_FLAGS = LinuxCFLAGS
> + CC_FLAGS2 = LinuxCFLAGS2
> if sys.platform == "win32":
> CC_FLAGS = WindowsCFLAGS
> BuildOptions = OrderedDict()
> @@ -2926,7 +2928,9 @@ def GenerateByteArrayValue (self, StructuredPcds):
> 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)
> + CC_FLAGS2 += " ".join(ValueList)
> MakeApp += CC_FLAGS
> + MakeApp += "\n" + CC_FLAGS2
>
> if sys.platform == "win32":
> MakeApp = MakeApp + PcdMakefileEnd
next prev parent reply other threads:[~2023-04-03 16:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-31 13:48 [PATCH edk2-basetools v2 0/1] Change BUILD_CFLAGS to CFLAGS to match edk2 BaseTools change Rebecca Cran
2023-03-31 13:48 ` [PATCH edk2-basetools v2 1/1] " Rebecca Cran
2023-04-03 16:10 ` Rebecca Cran [this message]
2023-04-03 16:20 ` Michael D Kinney
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=6360facc-a361-9da4-fa08-67e0cb39ae2d@bsdio.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