summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/C/VfrCompile
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Source/C/VfrCompile')
-rw-r--r--BaseTools/Source/C/VfrCompile/GNUmakefile3
-rw-r--r--BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile6
-rw-r--r--BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile9
3 files changed, 10 insertions, 8 deletions
diff --git a/BaseTools/Source/C/VfrCompile/GNUmakefile b/BaseTools/Source/C/VfrCompile/GNUmakefile
index e227b10791..7d5976649d 100644
--- a/BaseTools/Source/C/VfrCompile/GNUmakefile
+++ b/BaseTools/Source/C/VfrCompile/GNUmakefile
@@ -16,7 +16,8 @@ TOOL_INCLUDE = -I Pccts/h
#OBJECTS = VfrSyntax.o VfrServices.o DLGLexer.o EfiVfrParser.o ATokenBuffer.o DLexerBase.o AParser.o
OBJECTS = AParser.o DLexerBase.o ATokenBuffer.o EfiVfrParser.o VfrLexer.o VfrSyntax.o \
VfrFormPkg.o VfrError.o VfrUtilityLib.o VfrCompiler.o
-ifeq ($(CXX), llvm)
+CLANG:=$(shell $(CC) --version | grep clang)
+ifneq ($(CLANG),)
VFR_CPPFLAGS = -Wno-deprecated-register -std=c++14 -DPCCTS_USE_NAMESPACE_STD $(CPPFLAGS)
else
VFR_CPPFLAGS = -DPCCTS_USE_NAMESPACE_STD $(CPPFLAGS)
diff --git a/BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile b/BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile
index 3bd9b6b1df..42b603571f 100644
--- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile
+++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile
@@ -164,10 +164,10 @@ PCCTS_H=../h
#
# UNIX (default)
#
-ifeq ($(CXX), llvm)
+ifneq ($(CLANG),)
CC?=$(CLANG_BIN)clang
-else
-CC?=gcc
+else ifeq ($(origin CC),default)
+CC=gcc
endif
COPT=-O
ANTLR=${BIN_DIR}/antlr
diff --git a/BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile b/BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile
index 61366185c1..e45ac98e04 100644
--- a/BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile
+++ b/BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile
@@ -114,10 +114,11 @@ PCCTS_H=../h
#
# UNIX
#
-ifeq ($(CXX), llvm)
-BUILD_CC?=$(CLANG_BIN)clang
-else
-BUILD_CC?=cc
+CLANG:=$(shell $(CC) --version | grep clang)
+ifneq ($(CLANG),)
+CC?=$(CLANG_BIN)clang
+else ifeq ($(origin CC),default)
+CC=gcc
endif
COPT=-O
ANTLR=${BIN_DIR}/antlr