From 13ce3cb1eedb337eee3f45ffdf2e32332a22d50d Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Thu, 29 Jul 2021 17:42:34 -0700 Subject: Enable precompiled headers when using clang --- Makefile.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Makefile.in') diff --git a/Makefile.in b/Makefile.in index deebc5b..6ef2319 100644 --- a/Makefile.in +++ b/Makefile.in @@ -38,6 +38,7 @@ scripts_dir := $(src_dir)/scripts HAVE_INT128 := @HAVE_INT128@ HAVE_DLOPEN := @HAVE_DLOPEN@ +HAVE_CLANG_PCH := @HAVE_CLANG_PCH@ # If the version information is not in the configure script, then we # assume that we are in a working directory. We use the vcs-version.sh @@ -219,9 +220,8 @@ $(2)_deps += $$(patsubst %.o, %.d, $$($(2)_c_objs)) $(2)_deps += $$(patsubst %.h, %.h.d, $$($(2)_precompiled_hdrs)) $$($(2)_pch) : %.h.gch : %.h $(COMPILE) -x c++-header $$< -o $$@ -# If using clang, don't depend (and thus don't build) precompiled headers -$$($(2)_objs) : %.o : %.cc $$($(2)_gen_hdrs) $(if $(filter-out clang,$(CC)),$$($(2)_pch)) - $(COMPILE) $$($(2)_CFLAGS) -c $$< +$$($(2)_objs) : %.o : %.cc $$($(2)_gen_hdrs) $$($(2)_pch) + $(COMPILE) $(if $(HAVE_CLANG_PCH), $$(if $$($(2)_pch), -include-pch $$($(2)_pch))) $$($(2)_CFLAGS) -c $$< $$($(2)_c_objs) : %.o : %.c $$($(2)_gen_hdrs) $(COMPILE_C) $$($(2)_CFLAGS) -c $$< -- cgit v1.1