public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 0/3] BaseTools: allow users to override CC and CXX on the make command line
@ 2023-02-17  3:50 Rebecca Cran
  2023-02-17  3:50 ` [PATCH 1/3] BaseTools: Allow users to specify compiler to use with make CC= CXX= Rebecca Cran
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Rebecca Cran @ 2023-02-17  3:50 UTC (permalink / raw)
  To: devel, Andrew Fish, Leif Lindholm, Michael D Kinney, Bob Feng,
	Liming Gao, Yuwei Chen
  Cc: Rebecca Cran

Currently, the BaseTools Makefiles use BUILD_CC and BUILD_CXX, which
doesn't allow users to override the compiler to use in the expected way
by running e.g. "make CC=clang-17 CXX=clang++-17". clang/llvm support
was added in https://bugzilla.tianocore.org/show_bug.cgi?id=2842 in a
way that required users to run "make CXX=llvm" and have clang and clang++
executables under $(CLANG_BIN). As far as I know this isn't a standard
way of telling a build system to use clang, and so is likely difficult
to discover by users.

This patch series fixes that, and as a side effect allows the clang
analyzer to run via "scan-build make".

Since clang 17 defaults to C++17 or newer where the 'register' keyword
is deprecated and the warning turned into an error, override the
version used when building C++ code via "-std=c++14".

Rebecca Cran (3):
  BaseTools: Allow users to specify compiler to use with make CC= CXX=
  BaseTools: Improve detection of users wanting to build using clang
  BaseTools: Build against C++14 when building with clang

 BaseTools/Source/C/DevicePath/GNUmakefile          |  7 ++-
 BaseTools/Source/C/LzmaCompress/GNUmakefile        |  2 +-
 BaseTools/Source/C/Makefiles/app.makefile          |  2 +-
 BaseTools/Source/C/Makefiles/footer.makefile       |  6 +-
 BaseTools/Source/C/Makefiles/header.makefile       | 59 ++++++++++----------
 BaseTools/Source/C/VfrCompile/GNUmakefile          | 19 ++++---
 BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile | 20 +++----
 BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile   | 31 +++++-----
 BaseTools/Source/Python/Workspace/DscBuildData.py  |  2 +-
 9 files changed, 76 insertions(+), 72 deletions(-)

-- 
2.30.2


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

end of thread, other threads:[~2023-03-24 21:39 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-17  3:50 [PATCH 0/3] BaseTools: allow users to override CC and CXX on the make command line Rebecca Cran
2023-02-17  3:50 ` [PATCH 1/3] BaseTools: Allow users to specify compiler to use with make CC= CXX= Rebecca Cran
2023-03-15 10:07   ` [edk2-devel] " Gerd Hoffmann
2023-03-17 10:43     ` Rebecca Cran
2023-03-20  9:35       ` Gerd Hoffmann
2023-03-20 13:13         ` Rebecca Cran
2023-02-17  3:51 ` [PATCH 2/3] BaseTools: Improve detection of users wanting to build using clang Rebecca Cran
2023-03-15 10:11   ` [edk2-devel] " Gerd Hoffmann
2023-02-17  3:51 ` [PATCH 3/3] BaseTools: Build against C++14 when building with clang Rebecca Cran
2023-03-15 10:11   ` [edk2-devel] " Gerd Hoffmann
2023-03-09 15:47 ` [edk2-devel] [PATCH 0/3] BaseTools: allow users to override CC and CXX on the make command line Rebecca Cran
     [not found] ` <174ACADCDC6439C2.24021@groups.io>
2023-03-14 16:16   ` Rebecca Cran
2023-03-23  1:09     ` 回复: " gaoliming
     [not found]     ` <174EE719E87C3CB3.19937@groups.io>
2023-03-24  4:57       ` gaoliming
2023-03-24 21:39         ` Rebecca Cran

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