BaseTools: Align Pre-Processor Macros for CLANGPDB and CLANGDWARF

Update the CLANGPDB toolchain to define the __GNUC__, __GNUC_MINOR__,
__GNUC_PATCHLEVEL__, and __MINGW32__ macros with values that match the
pre-defined values seen when using the x86_64-unknown-windows-gnu target
triple. This minimizes the differences in pre-processor macros between the
CLANGPDB and CLANGDWARF targets.

Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
This commit is contained in:
Nate DeSimone
2025-08-04 17:24:10 -07:00
committed by mergify[bot]
parent 21eff866e7
commit 12797dd337

View File

@ -1933,7 +1933,7 @@ DEFINE CLANGPDB_IA32_TARGET = -target i686-pc-windows-msvc
DEFINE CLANGPDB_X64_TARGET = -target x86_64-pc-windows-msvc
DEFINE CLANGPDB_WARNING_OVERRIDES = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-empty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-unaligned-access -Wno-microsoft-enum-forward-reference
DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARNING_OVERRIDES) -fno-stack-protector -funsigned-char -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -Wno-null-dereference -mno-implicit-float -mms-bitfields -mno-stack-arg-probe -fno-omit-frame-pointer -U _MSC_VER -D __GNUC__
DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARNING_OVERRIDES) -fno-stack-protector -funsigned-char -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -Wno-null-dereference -mno-implicit-float -mms-bitfields -mno-stack-arg-probe -fno-omit-frame-pointer -U _MSC_VER -D __GNUC__=4 -D __GNUC_MINOR__=2 -D __GNUC_PATCHLEVEL__=1 -D __MINGW32__=1
###########################
# CLANGPDB IA32 definitions