From a56ee36c494cb1dfe795259b2cba706ef55b5212 Mon Sep 17 00:00:00 2001 From: Rebecca Cran Date: Thu, 16 Feb 2023 09:38:29 -0700 Subject: [PATCH] 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 Reviewed-by: Liming Gao --- BaseTools/Source/C/Makefiles/header.makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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