audk/BaseTools/Source/C/Makefiles
Rebecca Cran 728ff1da33 BaseTools: Allow users to build with clang using CC=clang CXX=clang++
In https://bugzilla.tianocore.org/show_bug.cgi?id=2842 clang support was
added by having users specify "make CXX=llvm" when building BaseTools.

The Makefile then sees that and sets CC=$(CLANG_BIN)clang and
CXX=$(CLANG_BIN)clang++. That requires that the executables 'clang' and
'clang++' exist and for example aren't named 'clang-17' and
'clang++-17'. Also, it's an unusual way of specifying the compiler,
since many users will expect to be able to override CC and CXX on the
make command line.

Rework the BaseTools Makefiles removing the 'BUILD_' prefix (BUILD_CC
and BUILD_CXX) and using the standard name 'LDFLAGS' instead of
'LFLAGS'. This allows clang to be used by running
'make -C BaseTools CC=clang CXX=clang++'.

Signed-off-by: Rebecca Cran <rebecca@quicinc.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2023-04-05 15:44:48 +00:00
..
NmakeSubdirs.bat BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
NmakeSubdirs.py BaseTools: Fix BaseTools nmake cleanall hang issue 2020-11-06 02:45:40 +00:00
app.makefile BaseTools: Allow users to specify compiler to use with make CC= CXX= 2023-04-05 15:44:48 +00:00
footer.makefile BaseTools: Allow users to specify compiler to use with make CC= CXX= 2023-04-05 15:44:48 +00:00
header.makefile BaseTools: Allow users to build with clang using CC=clang CXX=clang++ 2023-04-05 15:44:48 +00:00
lib.makefile BaseTools: strip trailing whitespace 2019-10-04 11:18:22 +01:00
ms.app BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
ms.common BaseTools/Source/C: Use /Z7 instead of /Zi for host tools 2022-11-08 18:29:51 +00:00
ms.lib BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00
ms.rule BaseTools: Replace BSD License with BSD+Patent License 2019-04-09 09:10:20 -07:00