From 8b09785ad21c00a0542e622cec0b44af3e13f3ae Mon Sep 17 00:00:00 2001 From: Shinichiro Hamaji Date: Tue, 15 Dec 2015 16:00:45 +0900 Subject: [PATCH] Enable .toc optimization for SDK stub As we don't build .dex file for SDK stub, use .jar.toc even for the .jack file. This should be safe we are building the .jack file from .jar file. This was actually necessary to achieve performance improvement mentioned in https://android-review.googlesource.com/#/c/186470/ Bug: 24597504 Change-Id: I7d4518421b64510ce83229d9f19a654888753a84 --- build/build_android_stubs.mk | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/build/build_android_stubs.mk b/build/build_android_stubs.mk index 837ed354c..6c561688c 100644 --- a/build/build_android_stubs.mk +++ b/build/build_android_stubs.mk @@ -57,8 +57,9 @@ $(jack_lib) : $(full_target) $(JILL_JAR) $(JACK) $(call define-jar-to-toc-rule, $(full_target)) -# As we don't have .dex file for the SDK stub, we cannot use .toc -# optimization for it. We update the timestamp of .toc file whenever -# .jack is updated so dependents will be always rebuilt. -$(dex_toc): $(jack_lib) - touch $@ +# As we don't have .dex file for the SDK stub, we cannot generate .toc +# file from .dex file. Use .toc file generated from .jar instead. +$(dex_toc): $(full_target).toc $(jack_lib) + $(hide) cp $< $@.tmp + $(call commit-change-for-toc, $@) +.KATI_RESTAT: $(dex_toc)