aboutsummaryrefslogtreecommitdiffstats
path: root/llvm-host-build.mk
diff options
context:
space:
mode:
authorLogan Chien <tzuhsiang.chien@gmail.com>2011-03-15 09:13:32 +0800
committerLogan Chien <tzuhsiang.chien@gmail.com>2011-03-15 09:22:20 +0800
commitc0a87ab7907e88efa4a5d7cba27e876f0dab1f5b (patch)
tree0cc3e3002d1691088dcf392c719955ae4cc59c1e /llvm-host-build.mk
parent95b62c22d4e04993d6c3004fe06c372565392253 (diff)
downloadexternal_llvm-c0a87ab7907e88efa4a5d7cba27e876f0dab1f5b.zip
external_llvm-c0a87ab7907e88efa4a5d7cba27e876f0dab1f5b.tar.gz
external_llvm-c0a87ab7907e88efa4a5d7cba27e876f0dab1f5b.tar.bz2
Implement copy-when-different build rules for tblgen.
Before this commit, tblgen rules will always generate new file, change the timestamp, and then a lot of c++ files have to be recompiled. This commit modifies transform-td-to-out macro. Now, tblgen will generate its output to an intermediate file. The timestamp of the inc files will only be changed when the newly generated intermediate file is different from the old one.
Diffstat (limited to 'llvm-host-build.mk')
-rw-r--r--llvm-host-build.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm-host-build.mk b/llvm-host-build.mk
index d7ef682..fe68934 100644
--- a/llvm-host-build.mk
+++ b/llvm-host-build.mk
@@ -63,5 +63,7 @@ $(hide) $(TBLGEN) \
-I $(LLVM_ROOT_PATH)/lib/Target \
$(if $(strip $(CLANG_ROOT_PATH)),-I $(CLANG_ROOT_PATH)/include,) \
-gen-$(strip $(1)) \
- -o $@ $<
+ -o $@.tmp $<
+$(hide) $(LLVM_ROOT_PATH)/copy-diff.py $@.tmp $@
+$(hide) $(RM) $@.tmp
endef