aboutsummaryrefslogtreecommitdiff
path: root/mk/precompiled-headers.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/precompiled-headers.mk')
-rw-r--r--mk/precompiled-headers.mk29
1 files changed, 4 insertions, 25 deletions
diff --git a/mk/precompiled-headers.mk b/mk/precompiled-headers.mk
index 500c99e4a..cdd3daecd 100644
--- a/mk/precompiled-headers.mk
+++ b/mk/precompiled-headers.mk
@@ -1,4 +1,4 @@
-PRECOMPILE_HEADERS ?= 1
+PRECOMPILE_HEADERS ?= 0
print-var-help += \
echo " PRECOMPILE_HEADERS ($(PRECOMPILE_HEADERS)): Whether to use precompiled headers to speed up the build";
@@ -10,33 +10,12 @@ $(GCH): precompiled-headers.h
@mkdir -p "$(dir $@)"
$(trace-gen) $(CXX) -x c++-header -o $@ $< $(GLOBAL_CXXFLAGS) $(GCH_CXXFLAGS)
-PCH = $(buildprefix)precompiled-headers.h.pch
-
-$(PCH): precompiled-headers.h
- @rm -f $@
- @mkdir -p "$(dir $@)"
- $(trace-gen) $(CXX) -x c++-header -o $@ $< $(GLOBAL_CXXFLAGS) $(GCH_CXXFLAGS)
-
-clean-files += $(GCH) $(PCH)
+clean-files += $(GCH)
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++)
-
- GLOBAL_CXXFLAGS_PCH += -include-pch $(PCH) -Winvalid-pch
-
- GLOBAL_ORDER_AFTER += $(PCH)
-
- else
-
- $(error Don't know how to precompile headers on $(CXX))
+ GLOBAL_CXXFLAGS_PCH += -include $(buildprefix)precompiled-headers.h -Winvalid-pch
- endif
+ GLOBAL_ORDER_AFTER += $(GCH)
endif