Build: HOST_CXX -> USE_HOST_CXX

Allow HOST_CXX to be passed to make which will be the actual host
C++ compiler used, such as 'make HOST_CXX=clang++'.
This commit is contained in:
joshua stein 2020-01-01 20:03:06 -06:00 committed by Andreas Kling
parent c6170070ed
commit d61131945d
6 changed files with 11 additions and 7 deletions

View file

@ -17,7 +17,7 @@ APPS = ${SRCS:.cpp=}
EXTRA_CLEAN = $(APPS) *.o
HOST_CXX = 1
USE_HOST_CXX = 1
include ../../Makefile.common

View file

@ -1,4 +1,4 @@
HOST_CXX = 1
USE_HOST_CXX = 1
PROGRAM = FormCompiler

View file

@ -1,4 +1,4 @@
HOST_CXX = 1
USE_HOST_CXX = 1
PROGRAM = IPCCompiler

View file

@ -1,4 +1,4 @@
HOST_CXX = 1
USE_HOST_CXX = 1
PROGRAM = Generate_CSS_PropertyID_cpp

View file

@ -1,4 +1,4 @@
HOST_CXX = 1
USE_HOST_CXX = 1
PROGRAM = Generate_CSS_PropertyID_h

View file

@ -22,12 +22,16 @@ INCLUDE_FLAGS += \
VERBOSE = 0
ifneq ($(HOST_CXX),)
ifneq ($(USE_HOST_CXX),)
ifeq '' '$(findstring clang++,$(CXX))'
C_WARNING_FLAGS += -Wno-unknown-warning-option
CXX_WARNING_FLAGS += -Wno-unknown-warning-option
endif
CXX = $(PRE_CXX) g++
ifeq ($(HOST_CXX),)
CXX = $(PRE_CXX) g++
else
CXX = $(HOST_CXX)
endif
AS = as
LINK = ld
OBJ_SUFFIX ?= .host