jack: Update to build from source and patch

This commit is contained in:
Fredrik Fornwall 2016-10-03 17:43:53 -04:00
parent 720575ff8e
commit 468cd06b72
7 changed files with 101 additions and 10 deletions

View File

@ -0,0 +1,12 @@
diff -u -r ../raw/sched/src/com/android/sched/util/codec/CaseInsensitiveDirectFSCodec.java ./sched/src/com/android/sched/util/codec/CaseInsensitiveDirectFSCodec.java
--- ../raw/sched/src/com/android/sched/util/codec/CaseInsensitiveDirectFSCodec.java 2016-10-03 10:53:49.000000000 -0400
+++ ./sched/src/com/android/sched/util/codec/CaseInsensitiveDirectFSCodec.java 2016-10-03 17:25:26.969577397 -0400
@@ -64,7 +64,7 @@
public VFS checkString(@Nonnull CodecContext context, @Nonnull String string)
throws ParsingException {
try {
- Service service = messageDigestCodec.checkString(context, "SHA");
+ Service service = messageDigestCodec.checkString(context, "MD5");
return new CaseInsensitiveFS(codec.checkString(context, string),
/* nbGroup = */ 1, /* szGroup = */ 2, new MessageDigestFactory(service),
/* debug = */ false);

View File

@ -1,14 +1,30 @@
# Issue:
# java.lang.NoClassDefFoundError: org.eclipse.jdt.internal.compiler.apt.dispatch.BatchProcessingEnvImpl
# perhaps because BatchProcessingEnvImpl uses javax.tools which does not exist on android?
TERMUX_PKG_HOMEPAGE=http://tools.android.com/tech-docs/jackandjill TERMUX_PKG_HOMEPAGE=http://tools.android.com/tech-docs/jackandjill
TERMUX_PKG_DESCRIPTION="Java Android Compiler Kit" TERMUX_PKG_DESCRIPTION="Java Android Compiler Kit"
TERMUX_PKG_VERSION=$TERMUX_ANDROID_BUILD_TOOLS_VERSION # Use the date of the below git commit as the version number:
TERMUX_PKG_VERSION=20161003
TERMUX_PKG_SRCURL=https://android.googlesource.com/toolchain/jack/+archive/08a4eb10dafa25e2d9be4026010bd41714ed0b31.tar.gz
TERMUX_PKG_PLATFORM_INDEPENDENT=true TERMUX_PKG_PLATFORM_INDEPENDENT=true
termux_step_extract_package() {
mkdir -p $TERMUX_PKG_SRCDIR
cd $TERMUX_PKG_SRCDIR
filename=`basename $TERMUX_PKG_SRCURL`
file=$TERMUX_PKG_CACHEDIR/$filename
test ! -f $file && termux_download $TERMUX_PKG_SRCURL $file $TERMUX_PKG_SHA256
tar xf $file
rm sched/src/com/android/sched/util/log/tracer/probe/GcDurationProbe.java
}
termux_step_make () { termux_step_make () {
cd $TERMUX_PKG_SRCDIR
ant jack jill
TERMUX_JACK=$PWD/jack/dist/jack.jar
TERMUX_JILL=$PWD/jill/dist/jill.jar
# Create $USR/share/dex for dex files, and $USR/share/jack for .jack library files produced by jill: # Create $USR/share/dex for dex files, and $USR/share/jack for .jack library files produced by jill:
mkdir -p $TERMUX_PREFIX/share/{dex,jack} mkdir -p $TERMUX_PREFIX/share/{dex,jack}
$TERMUX_DX \ $TERMUX_DX \
-JXmx4096M --num-threads=4 \ -JXmx4096M --num-threads=4 \
--dex \ --dex \

View File

@ -0,0 +1,12 @@
diff -u -r ../raw/jack/src/com/android/jack/library/JackLibraryFactory.java ./jack/src/com/android/jack/library/JackLibraryFactory.java
--- ../raw/jack/src/com/android/jack/library/JackLibraryFactory.java 2016-10-03 10:53:49.000000000 -0400
+++ ./jack/src/com/android/jack/library/JackLibraryFactory.java 2016-10-03 17:15:04.255000764 -0400
@@ -55,7 +55,7 @@
@Nonnull
public static final MessageDigestPropertyId MESSAGE_DIGEST_ALGO = MessageDigestPropertyId
.create("jack.library.digest.algo", "Message digest algorithm use in Jack library")
- .requiredIf(GENERATE_JACKLIB_DIGEST.getValue().isTrue()).addDefaultValue("SHA")
+ .requiredIf(GENERATE_JACKLIB_DIGEST.getValue().isTrue()).addDefaultValue("MD5")
.addCategory(DumpInLibrary.class);
@Nonnull

View File

@ -5,9 +5,6 @@ exec dalvikvm -Xmx256m \
-cp @TERMUX_PREFIX@/share/dex/jack.jar \ -cp @TERMUX_PREFIX@/share/dex/jack.jar \
com.android.jack.Main \ com.android.jack.Main \
-cp @TERMUX_PREFIX@/share/jack/android.jack \ -cp @TERMUX_PREFIX@/share/jack/android.jack \
-D jack.library.digest.algo=MD5 \
-D jack.source.digest.algo=MD5 \
-D sched.vfs.case-insensitive.algo=MD5 \
-D jack.annotation-processor=off \ -D jack.annotation-processor=off \
--output-dex=`pwd` \ -D jack.classpath.default-libraries=off \
$@ $@

View File

@ -0,0 +1,10 @@
diff -u -r ../raw/jack/src/com/android/jack/digest/OriginDigestFeature.java ./jack/src/com/android/jack/digest/OriginDigestFeature.java
--- ../raw/jack/src/com/android/jack/digest/OriginDigestFeature.java 2016-10-03 10:53:49.000000000 -0400
+++ ./jack/src/com/android/jack/digest/OriginDigestFeature.java 2016-10-03 17:18:14.296094146 -0400
@@ -38,5 +38,5 @@
@Nonnull
public static final MessageDigestPropertyId ORIGIN_DIGEST_ALGO = MessageDigestPropertyId
.create("jack.source.digest.algo", "Digest algorithm use for source identification")
- .requiredIf(OriginDigestFeature.ORIGIN_DIGEST.getValue().isTrue()).addDefaultValue("SHA");
+ .requiredIf(OriginDigestFeature.ORIGIN_DIGEST.getValue().isTrue()).addDefaultValue("MD5");
}

View File

@ -0,0 +1,32 @@
diff -u -r ../raw/sched/src/com/android/sched/util/log/tracer/ProbeManager.java ./sched/src/com/android/sched/util/log/tracer/ProbeManager.java
--- ../raw/sched/src/com/android/sched/util/log/tracer/ProbeManager.java 2016-10-03 10:53:49.000000000 -0400
+++ ./sched/src/com/android/sched/util/log/tracer/ProbeManager.java 2016-10-03 17:05:07.716121072 -0400
@@ -41,7 +41,7 @@
private static final PropertyId<ProbeManager> PROBE_MANAGER = PropertyId.create(
"sched.tracer.probes", "Define which probes use for tracing",
new ProbeManagerCodec()).addDefaultValue(
- "event-count,gc-duration,thread-cpu-time");
+ "");
@Nonnull
public static final ThreadLocal<Boolean> enable = new ThreadLocal<Boolean>() {
diff -u -r ../raw/sched/src/com/android/sched/util/log/tracer/TemplateFtl.java ./sched/src/com/android/sched/util/log/tracer/TemplateFtl.java
--- ../raw/sched/src/com/android/sched/util/log/tracer/TemplateFtl.java 2016-10-03 10:53:49.000000000 -0400
+++ ./sched/src/com/android/sched/util/log/tracer/TemplateFtl.java 2016-10-03 17:03:38.829479240 -0400
@@ -18,7 +18,6 @@
import com.android.sched.util.log.tracer.probe.EventCountProbe;
import com.android.sched.util.log.tracer.probe.GcCountProbe;
-import com.android.sched.util.log.tracer.probe.GcDurationProbe;
import com.android.sched.util.log.tracer.probe.HeapAllocationCountProbe;
import com.android.sched.util.log.tracer.probe.HeapAllocationSizeProbe;
import com.android.sched.util.log.tracer.probe.HeapMemoryProbe;
@@ -55,8 +54,6 @@
new MappingProbe[]{new MappingProbe(HeapAllocationSizeProbe.class, "memory")}, null),
HEAP_ALLOCATION_COUNT("Heap allocation count usage", "count.html.ftl", "heap-alloc-count.html",
new MappingProbe[]{new MappingProbe(HeapAllocationCountProbe.class, "count")}, null),
- GC_TIME("Garbage Collector duration", "time.html.ftl", "time-gc.html",
- new MappingProbe[]{new MappingProbe(GcDurationProbe.class, "time")}, null),
GC_COUNT("Garbage Collector count", "count.html.ftl", "count-gc.html",
new MappingProbe[]{new MappingProbe(GcCountProbe.class, "count")}, null),
CONTENTION_DURATION("Contention duration", "time.html.ftl", "time-contention.html",

View File

@ -0,0 +1,12 @@
diff -u -r ../raw/sched/src/com/android/sched/vfs/CaseInsensitiveFS.java ./sched/src/com/android/sched/vfs/CaseInsensitiveFS.java
--- ../raw/sched/src/com/android/sched/vfs/CaseInsensitiveFS.java 2016-10-03 10:53:49.000000000 -0400
+++ ./sched/src/com/android/sched/vfs/CaseInsensitiveFS.java 2016-10-03 17:21:25.053176313 -0400
@@ -78,7 +78,7 @@
@Nonnull
public static final MessageDigestPropertyId ALGO = MessageDigestPropertyId.create(
"sched.vfs.case-insensitive.algo", "Algorithm used to encode a path name").addDefaultValue(
- "SHA");
+ "MD5");
@Nonnull
public static final BooleanPropertyId DEBUG = BooleanPropertyId.create(