diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2020-07-25 18:02:42 -0500 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2020-07-25 18:02:42 -0500 |
commit | 72f8771094d575e924846f16e5c60742eea9420b (patch) | |
tree | efe8b9ba26778a4260afeb0e8f2c2df1cfe6a36e /mk | |
parent | 090960b7254799a14bd5dc3b61f1a4d7c6a95733 (diff) |
Allow PRECOMPILE_HEADERS in cross-compilation
In cross, CXX will look like aarch64-unknown-linux-gnu-g++. We could
run some command to check what kind of compiler it is, but for now we
can just check if g++ is anywhere in the string. I couldn’t find any
"ends with" for makefile, so it can be anywhere in CXX.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/precompiled-headers.mk | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mk/precompiled-headers.mk b/mk/precompiled-headers.mk index 1c0452dc2..500c99e4a 100644 --- a/mk/precompiled-headers.mk +++ b/mk/precompiled-headers.mk @@ -21,13 +21,13 @@ clean-files += $(GCH) $(PCH) ifeq ($(PRECOMPILE_HEADERS), 1) - ifeq ($(CXX), g++) + ifeq ($(findstring g++,$(CXX)), g++) GLOBAL_CXXFLAGS_PCH += -include $(buildprefix)precompiled-headers.h -Winvalid-pch GLOBAL_ORDER_AFTER += $(GCH) - else ifeq ($(CXX), clang++) + else ifeq ($(findstring clang++,$(CXX)), clang++) GLOBAL_CXXFLAGS_PCH += -include-pch $(PCH) -Winvalid-pch |