aboutsummaryrefslogtreecommitdiffstats
path: root/llvm-device-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-device-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-device-build.mk')
-rw-r--r--llvm-device-build.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm-device-build.mk b/llvm-device-build.mk
index 83fc5ef..00f089d 100644
--- a/llvm-device-build.mk
+++ b/llvm-device-build.mk
@@ -73,5 +73,7 @@ $(hide) $(TBLGEN) \
-I $(LLVM_ROOT_PATH)/device/include \
-I $(LLVM_ROOT_PATH)/lib/Target \
-gen-$(strip $(1)) \
- -o $@ $<
+ -o $@.tmp $<
+$(hide) $(LLVM_ROOT_PATH)/copy-diff.py $@.tmp $@
+$(hide) $(RM) $@.tmp
endef