Reviewed-by: Michael D Kinney <michael.d.kin...@intel.com> > -----Original Message----- > From: Rebecca Cran <rebe...@bsdio.com> > Sent: Monday, April 3, 2023 9:11 AM > To: devel@edk2.groups.io; Barkelew, Bret <bret.barke...@microsoft.com>; Sean > Brogan <sean.bro...@microsoft.com>; Chris > Fernald <chris.fern...@outlook.com>; Feng, Bob C <bob.c.f...@intel.com>; > Kubacki, Michael <michael.kuba...@microsoft.com>; > Oliver Steffen <ostef...@redhat.com>; Gao, Liming <gaolim...@byosoft.com.cn>; > Kinney, Michael D > <michael.d.kin...@intel.com> > Subject: Re: [PATCH edk2-basetools v2 1/1] Change BUILD_CFLAGS to CFLAGS to > match edk2 BaseTools change > > 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 <rebe...@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
-=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#102432): https://edk2.groups.io/g/devel/message/102432 Mute This Topic: https://groups.io/mt/97973452/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-