From b4db315a56860b10a7d19339f2310bc1149219cf Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 6 Oct 2020 13:26:00 +0200 Subject: [PATCH] mk/precompiled-headers.mk: Fix clang test "clang++" includes the string "g++" so this test didn't work properly. However the separate handling of clang might not be needed anymore... --- mk/precompiled-headers.mk | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mk/precompiled-headers.mk b/mk/precompiled-headers.mk index 1fdb4b3a4..bfee35a2c 100644 --- a/mk/precompiled-headers.mk +++ b/mk/precompiled-headers.mk @@ -21,18 +21,18 @@ clean-files += $(GCH) $(PCH) ifeq ($(PRECOMPILE_HEADERS), 1) - ifeq ($(findstring g++,$(CXX)), g++) - - GLOBAL_CXXFLAGS_PCH += -include $(buildprefix)precompiled-headers.h -Winvalid-pch - - GLOBAL_ORDER_AFTER += $(GCH) - - else ifeq ($(findstring clang++,$(CXX)), clang++) + ifeq ($(findstring clang++,$(CXX)), clang++) GLOBAL_CXXFLAGS_PCH += -include-pch $(PCH) -Winvalid-pch GLOBAL_ORDER_AFTER += $(PCH) + else ifeq ($(findstring g++,$(CXX)), g++) + + GLOBAL_CXXFLAGS_PCH += -include $(buildprefix)precompiled-headers.h -Winvalid-pch + + GLOBAL_ORDER_AFTER += $(GCH) + else $(error Don't know how to precompile headers on $(CXX))