diff --git a/Makefile.in b/Makefile.in index dfeb735f5f1..de7ff1d6933 100644 --- a/Makefile.in +++ b/Makefile.in @@ -540,10 +540,19 @@ ALL_TARGET_RULES = $(foreach target,$(CFG_TARGET_TRIPLES), \ $(foreach host,$(CFG_HOST_TRIPLES), \ all-target-$(target)-host-$(host))) -all: $(ALL_TARGET_RULES) $(GENERATED) docs +all: rustllvm/llvm-auto-clean-stamp \ + $(ALL_TARGET_RULES) $(GENERATED) docs endif +# This is used to independently force an LLVM clean rebuild +# when we changed something not otherwise captured by builtin +# dependencies. In these cases, commit a change that touches +# the stamp in the source dir. +rustllvm/llvm-auto-clean-stamp: $(S)src/rustllvm/llvm-auto-clean-trigger + $(Q)$(MAKE) clean-llvm + touch $@ + ###################################################################### # Re-configuration diff --git a/mk/clean.mk b/mk/clean.mk index 23efbb3ee15..32dd3902b1f 100644 --- a/mk/clean.mk +++ b/mk/clean.mk @@ -23,7 +23,7 @@ CLEAN_LLVM_RULES = \ $(foreach target, $(CFG_TARGET_TRIPLES), \ clean-llvm$(target)) -.PHONY: clean clean-all clean-misc +.PHONY: clean clean-all clean-misc clean-llvm clean-all: clean clean-llvm diff --git a/src/rustllvm/llvm-auto-clean-trigger b/src/rustllvm/llvm-auto-clean-trigger new file mode 100644 index 00000000000..e69de29bb2d