summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRebecca Cran <rebecca@quicinc.com>2023-02-16 09:38:29 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-04-05 15:44:48 +0000
commita56ee36c494cb1dfe795259b2cba706ef55b5212 (patch)
treee4da01cae016941e2a60b51b96adf9bbd25eb742
parent728ff1da339695ac73e7731d1b5f1d912ab01142 (diff)
downloadedk2-a56ee36c494cb1dfe795259b2cba706ef55b5212.tar.gz
edk2-a56ee36c494cb1dfe795259b2cba706ef55b5212.tar.bz2
edk2-a56ee36c494cb1dfe795259b2cba706ef55b5212.zip
BaseTools: Build against C++14 when building with clang
clang 17 defaults to C++17, where the 'register' keyword is deprecated and the warning changed to an error. To avoid build errors, compile against C++14 by specifying '-std=c++14' in CXXFLAGS. Signed-off-by: Rebecca Cran <rebecca@quicinc.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
-rw-r--r--BaseTools/Source/C/Makefiles/header.makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile
index bcc2791998..1bf003523b 100644
--- a/BaseTools/Source/C/Makefiles/header.makefile
+++ b/BaseTools/Source/C/Makefiles/header.makefile
@@ -106,7 +106,7 @@ endif
endif
ifneq ($(CLANG),)
LDFLAGS =
-CXXFLAGS = -Wno-deprecated-register -Wno-unused-result
+CXXFLAGS = -Wno-deprecated-register -Wno-unused-result -std=c++14
else
LDFLAGS =
CXXFLAGS = -Wno-unused-result