Commit graph

572 commits

Author SHA1 Message Date
Dan Willemsen
bdd6a756d1 Only define proguard dictionary as output if obfuscating
If we're not obfuscating, proguard doesn't generate the mapping file,
and ninja will consider the edge dirty, since one of the output files
does not exist.

Also disable it for jack, since jack writes to a different file.

Bug: 66929996
Test: m cts; m cts
Test: m ahat-test with a clean build
Change-Id: Iff6707c44cbd86cd9328bbad8322398bc9d960fd
2017-09-26 13:01:49 -07:00
Colin Cross
b0d243f336 Merge changes from topic "bootclasspath_default_libs" am: e58881ac38 am: df0c2fd298
am: 665dce738a

Change-Id: Ieb69b355cc0ad74af7ea58ccbbdb36254633f05d
2017-09-26 01:27:26 +00:00
Colin Cross
8547be2e38 Add dependencies on bootclasspath libraries am: 1d1e5ef61b am: fa4d9fbfdd
am: c70fcc848c

Change-Id: I0572197334015acc14bc2f43031ba3467228171a
2017-09-26 01:27:18 +00:00
Colin Cross
b541aae17c Remove duplication of bootclasspath in LOCAL_JAVA_LIBRARIES
The bootclasspath libraries have direct dependencies now, so
remove them from LOCAL_JAVA_LIBRARIES so they don't also end
up in the classpath.

Test: m -j checkbuild
Test: m -j ANDROID_COMPILE_WITH_JACK=true java
Test: manually inspection of build-${TARGET_PRODUCT}.ninja
      only has expected changes
Test: no changes to system.img
Change-Id: Icbc8987468f237aa351708b33c3abe5ea3d1816e
2017-09-25 16:15:10 -07:00
Colin Cross
1d1e5ef61b Add dependencies on bootclasspath libraries
The libraries in the bootclasspath were getting their dependencies
because they were also in the default libraries list.  Make the
dependencies explicit in preparation for rearranging the default
libraries.

Test: m -j checkbuild
Change-Id: I3ea004714a31cd648ec2ef57ed3099bce70bc6b9
2017-09-25 16:14:42 -07:00
Miao Wang
1d6d78ef38 Merge "Correctly set the linker search path for libm and libc." am: b463cdc874 am: 6062710fed
am: e277ce63f8

Change-Id: Ib34fe4f4f47f68cbdf0271c61f5102b35a4db9f0
2017-09-23 00:48:05 +00:00
Miao Wang
28e78f4600 Correctly set the linker search path for libm and libc.
- ndk/r10 is removed, we need to use SOONG ndk stubs instead.
  - Use MIN_SUPPORTED_SDK_VERSION instead of hard coded version 9 for
    32 bit compilation.

Bug: 38342163
Test: mm
Test: make -j40 FORCE_BUILD_RS_COMPAT=true RSTest_Compat
Change-Id: I9549446cb7f8faee8842b06f096d035535dc7f3d
2017-09-22 14:57:02 -07:00
Richard Uhler
d7551bd0fa Merge "Proguard implicitly generates a proguard_dictionary" am: 58e0b8c0a3 am: b1fe04371b
am: f71eea848b

Change-Id: Ie9c91ed5f4dc94757bafb1c2ae97d63afe06fb35
2017-09-22 08:33:28 +00:00
Richard Uhler
58e0b8c0a3 Merge "Proguard implicitly generates a proguard_dictionary" 2017-09-22 08:23:52 +00:00
Richard Uhler
b32775a9b5 Proguard implicitly generates a proguard_dictionary
Use .KATI_IMPLICIT_OUTPUTS to convey as such.

This is to support a use case for building platform/art/tools/ahat,
which depends on the generated proguard_dictionary for running tests.

Test: m
Test: m ahat-test with relevant changes from clean build.
Change-Id: Ic8f3b6819cfd4cd18620a2eaafd80d672fde8f5c
2017-09-21 10:53:09 +01:00
Nan Zhang
c128894560 Merge "Move private_manifest file insertion to jars merging phase." am: 3d6aaa2f56 am: d43952b8f8
am: abbb6a1fa1

Change-Id: I3fa4dd88b143119aa5692a437a9da6e9aa535542
2017-09-21 03:26:18 +00:00
Nan Zhang
b88011768d Move private_manifest file insertion to jars merging phase.
By doing this, the change of private_manifest file won't trigger
Javac to re-run during re-build.

Bug: b/65455145
Test: m clean && m -j32
Change-Id: Ib90d56daf0be5f31b51e07b7714a933bc5cf4496
2017-09-20 14:56:48 -07:00
Nan Zhang
6cdb1f8bc7 Merge "Use merge_zips to merge jars during Java build in Make." am: 39bbfe217a am: d9001d2733
am: 177e7ffb20

Change-Id: I2178aa1eb4a0e74a3057758f4651ad569bdd6257
2017-09-20 20:00:46 +00:00
Nan Zhang
39bbfe217a Merge "Use merge_zips to merge jars during Java build in Make." 2017-09-20 19:48:27 +00:00
Nan Zhang
9bd540594d Use merge_zips to merge jars during Java build in Make.
1. Use merge_zips to merge jars without unzipping/rezipping static Java
libraries. And seperate merging process as a independent Make target so
that Javac can only depend on Turbine.

2. Remove duplicate vars: "full_java_lib_deps" in droiddoc.mk

3. Also use classes-header.jar for link_apk & link_instr

Bug: b/65455145
Test: m clean && m -j32

Change-Id: I7b0307664a6b86075c983284fce099bd3946318c
2017-09-19 18:49:33 -07:00
Colin Cross
1fe8e3c66d Merge "Move jacocoagent into the bootclasspath" am: 68dad73d34 am: a6af8ef91f
am: e9a7688567

Change-Id: I8941916da85a2c221c5ac7d6bb5217bd9b79baef
2017-09-18 20:32:10 +00:00
Treehugger Robot
68dad73d34 Merge "Move jacocoagent into the bootclasspath" 2017-09-18 19:57:53 +00:00
Nan Zhang
0d3dcc62c7 Merge "Move classes.jar generation right below JarJar phase." am: 729a221a16 am: 32fc9a5c46
am: 46010dda39

Change-Id: Iea2acd5e5fc736ef933b1d50e1ca39c7c7890e19
2017-09-15 22:47:03 +00:00
Colin Cross
69b7f3f0b1 Move jacocoagent into the bootclasspath
Move jacocoagent out of core-libart and into its own jar on the
bootclasspath.

Test: m -j EMMA_INSTRUMENT=true
Test: https://android-build.googleplex.com/builds/view-workplan?viewType=Table&workplanId=L19400000103297394&nodeType=Trybot
Change-Id: I9e6e3dc59dba8b93685d59b258d4ebc7835eab8b
2017-09-15 22:27:35 +00:00
Nan Zhang
870025f89b Move classes.jar generation right below JarJar phase.
By doing this, we don't need run desugar/Jacoco/proguard twice for
static java libraries(one for their self build, another for downstream
dependents).

Test: m clean && m java
Bug: b/65455145
Change-Id: I87aee34940937dbde33a977f55d1faf2c8054561
2017-09-14 14:44:40 -07:00
Nan Zhang
d1bbc2b26c Merge changes from topic "turbine" am: 872246de0f am: fa8b66f5cc
am: 5d52f85261

Change-Id: I6e71c2e2874bba64f2105c8cf26647ae5c9af25b
2017-09-01 00:37:45 +00:00
Nan Zhang
b3ec534bd1 Revert "Revert "Add Turbine as part of java build toolchain in Make.""
This reverts commit 33dcd0c5eb.

Reason for revert: <stub.jar.toc needs classes.jar.toc which is no longer existed after Turbine was introduced. So use classes.jar to represent stub.jar.toc>

Bug: b/64308460
Test: m clean && time m -j32 ANDROID_COMPILE_WITH_JACK=true
Change-Id: If618993f1e0c789d93cc15664212603f994fd460
2017-08-31 14:56:54 -07:00
Colin Cross
9a594e05af Remove GLOBAL_JAVAC_DEBUG_FLAGS
GLOBAL_JAVAC_DEBUG_FLAGS is no longer set, -g is already included
in the javac command line.  Jack is on its way out, just use -g
directly there for now.

Test: m -j checkbuild
Change-Id: Ib99c248bbb8b65fa2cd2b55449a502fc20deffa8
2017-08-31 14:48:31 -07:00
Nan Zhang
3b202bde3f Merge "Revert "Add Turbine as part of java build toolchain in Make."" am: 91ffbf2fbe am: 2c82a22d96
am: 40403cdded

Change-Id: Ib9a5a8506bb85b6582421ed20fa1c11d9aba4375
2017-08-31 20:47:54 +00:00
Nan Zhang
33dcd0c5eb Revert "Add Turbine as part of java build toolchain in Make."
This reverts commit 0739155c86.

Reason for revert: <sdk_google_aw_x86-sdk (linux) build 4310016 in git_master is broken>

Change-Id: I525d48557bd0425917e61a85f596663ccc63c887
2017-08-31 19:56:59 +00:00
Nan Zhang
672898977f Merge "Add Turbine as part of java build toolchain in Make." am: 0b23748128 am: 2764a16085
am: 3c30f84e2d

Change-Id: I3e42a07747ffb09b10ab07785d761ddc84574ae0
2017-08-31 18:25:44 +00:00
Nan Zhang
0739155c86 Add Turbine as part of java build toolchain in Make.
1. Bundle static_java_header_libs during turbine-classes.jar if
necessary. This can be improved if we have the ability to merge jars on
the fly.

2. Copy sdk/stubs-classes.jar to sdk/stubs-classes-header.jar, and Use
.KATI_RESTAT to cut un-necessary targets rebuilt.

3. Copy prebuilt-classes.jar to prebuilt-classes-header.jar since
Turbine doesn't apply to prebuilt.

4. Run jarjar after Turbine compilation, otherwise downstream targets
won't find corresponding symbols.

5. Change classes.jar in -classpath used in Desugar to
classes-header.jar.

6. Change legacy-libs in Proguard from classes.jar to
classes-header.jar.

7. Add .KATI_RESTAT for turbine-classes.jar, and remove IJAR.

8.boot.art is re-generated during the incremental rebuild since
javalib.jar got re-generated. Then boot.art re-triggered lots of
downstream targets to be rebuilt. So we add .KATI_RESTAT for javalib.jar
to prevent downstream to be rebuilt. The ziptime & commit-change-to-toc
operation for javalib.jar(small) didn't bring too much overhead when we build
from clean state.

Next step: specify static_java_header_libs in -classpath, and merge jars
at the end.

touch frameworks/base/core/java/com/google/android/util/Procedure.java &&
time m
time: 1m58s (794 -> 49 targets)

m clean && time m java
time: 9m34s

Bug: b/64308460

Test: m clean && m checkbuild

Change-Id: Iefcc234405b9f461b6882c06bba15e21fa783d28
2017-08-30 16:01:39 -07:00
Colin Cross
c1ca2cfbf4 Merge "Separate java source list generation into its own rule" am: f61712fbf1 am: bf386cafec
am: 1770c0cc2b

Change-Id: I4644762f6094922044c46be94ca5e368736db81a
2017-08-30 20:15:43 +00:00
Colin Cross
dfc45ec337 Separate java source list generation into its own rule
Move the java source list generation step into its own rule.  This
has a couple of advantages.  It consolidates the source list
generation so that it only has to run once for javac, jack, and
jack-check.  It also massively reduces the length of the javac
command line, so that error messages are significantly shorter,
and allows easily rerunning the failing build command because
the file list is still on disk.

The primary disadvantage is that javac error messages no longer
include the list of files passed to javac, but the list is
available earlier in the build long when the file list was written,
and is still available on disk.

Test: m -j javac-check
Change-Id: I9730b352b33a060e08221b61c11c617d23320d67
2017-08-29 16:50:11 -07:00
Narayan Kamath
bfd42129d3 Merge "dex_preopt: Use the unstripped jar file for generating profiles." into oc-mr1-dev
am: afb81de1f2

Change-Id: I1795eb230b2c3388b5c2daa8a710d6e1c678b418
2017-08-29 08:52:59 +00:00
Narayan Kamath
bbcdc07d12 dex_preopt: Use the unstripped jar file for generating profiles.
We were previously using LOCAL_BUILT_MODULE, which wouldn't work in the
case that "nostripping" wasn't specified (i.e when we stripped).

The issue is that the built module has its classes.dex entry stripped,
which means that profman can't do anything meaningful with it.

In this change, we use the right set of files for JAVA_LIBRARIES as well
as prebuilt PACKAGES. Fixing apps built from source is a larger task and
has been left for a future change. Depending on ART changes, we might
need to disable stripping for all apps and/or align userdebug and user
builds with each other. This will be tackled separately.

Test: make
Bug: 64896089
Change-Id: I4fd256d187b66763f354cc6001953469c2cd8fbb
2017-08-24 11:31:03 +01:00
Colin Cross
604a2423b6 Merge "Sort files in directories passed to jar"
am: 966ed15a1d

Change-Id: If01ba7d294e4308a28580b157b9efdb6c860bb35
2017-08-17 01:00:13 +00:00
Colin Cross
128800f2c8 Sort files in directories passed to jar
jar -C <dir> . produces a jar containing files in filesystem order,
which can vary between builds.  Manually find and sort the list of
files, and convert them into a list of -C <dir> <file> pairs.

Fixes: 64634025
Test: m -j checkbuild
Test: m -j out/target/product/sailfish/system/framework/ext.jar, check
      that entries are sorted
Test: m -j out/target/product/generic_arm64/system/framework/ext.jar on mac
Change-Id: I7dced6acbe621a60cd49daf17872941485602732
2017-08-16 13:37:00 -07:00
Colin Cross
4cea760106 Merge "Revert "Use dx.jar directly""
am: c7e3e962f8

Change-Id: Icd5402f7cc789224753537c070a91cbf6267ee66
2017-07-18 07:14:26 +00:00
Treehugger Robot
c7e3e962f8 Merge "Revert "Use dx.jar directly"" 2017-07-18 07:08:19 +00:00
Colin Cross
e44e75aa89 Revert "Use dx.jar directly"
This reverts commit e37a3c959a.

Reason for revert: breaks art test runner

Change-Id: Ice0cd3020ddec7f31eb789867a45f047a75a05d0
2017-07-18 05:22:59 +00:00
Colin Cross
4828fcad41 Merge "Use dx.jar directly"
am: c68434c971

Change-Id: Ief2c88d3ba0e93c7eb7bb9db0ac2b0a0b886bcea
2017-07-17 20:45:31 +00:00
Jeff Gaston
6264b662f3 Merge "Update to latest jacoco usage"
am: 483fae7430

Change-Id: Ibc94d5ba6db7690441825dd655b6cb26d989b78d
2017-07-17 20:44:10 +00:00
Colin Cross
c68434c971 Merge "Use dx.jar directly" 2017-07-17 20:40:13 +00:00
Jeff Gaston
483fae7430 Merge "Update to latest jacoco usage" 2017-07-17 20:36:39 +00:00
Colin Cross
06f8dec6e0 Merge "Fix LOCAL_JAR_PROCESSOR dependency"
am: 126e625fed

Change-Id: Ibe2786aa8853ea34513903728ae06fb5c5c39101
2017-07-14 23:10:57 +00:00
Jeff Gaston
aaae43cd24 Update to latest jacoco usage
Bug: 36792868
Test: EMMA_INSTRUMENT_STATIC=true m -j

Change-Id: I419b543283b52be9a72f5c6b10e4cbea68782174
2017-07-14 13:04:05 -07:00
Colin Cross
89b802b994 Fix LOCAL_JAR_PROCESSOR dependency
The LOCAL_JAR_PROCESSOR rule should depend on the path to the
processor jar and not the module name.

Test: m -j && m -j
Change-Id: I5ebd4cd3ad4429918edfd0a8cb5cb9a4e7e86ca7
2017-07-13 19:25:47 -07:00
Colin Cross
e37a3c959a Use dx.jar directly
Use $(JAVA) to invoke dx.jar instead of the dx wrapper script.
Also allow the dx command line or the dx jar to be specified on
the command line.  Allows better dependencies on dx.jar, and
doesn't rely on having java on the path.

Bug: 62956999
Test: m -j checkbuild
Change-Id: I5f265132690ad28b3139954fea44eb0c4a43393a
2017-07-07 13:34:33 -07:00
Przemyslaw Szczepaniak
8c485b6b0c Merge "Enable stripping of java debug information when required."
am: d659f806e5

Change-Id: I25facf64b176ae26db07d43cef92c522bf92e79a
2017-07-07 15:29:40 +00:00
Treehugger Robot
d659f806e5 Merge "Enable stripping of java debug information when required." 2017-07-07 15:24:32 +00:00
Przemyslaw Szczepaniak
2e81b3c49f Enable stripping of java debug information when required.
We're removing LocalVariableType / LocalVariableType in order to
save space. Enabling stripping reduces AOSP  image size save
by ~12MB.

Bug: 38224820
Test: CtsLibcoreTestCases
Change-Id: I3168d73ec6825aa5879db7e1135d7ed61d488d72
2017-07-06 08:31:14 +00:00
Colin Cross
e885ccf0df Merge "Provide make variables for java binaries"
am: 5e19557eb9

Change-Id: Ib1be7da98214e3b6c27867b80005e18cc68a0d33
2017-07-01 01:36:14 +00:00
Colin Cross
0851df8c82 Provide make variables for java binaries
Replace java -> $(JAVA), etc. to prepare for moving java binaries
out of the path and using full paths to them.

Test: builds
Bug: 62956999
Change-Id: I5dfcd0d4e855ecde69cd127169e9545e59723d12
2017-07-01 01:03:14 +00:00
Paul Duffin
b61544dd73 Merge "Add junit/textui/** to the proguard filter" am: 3b3bffc0d0
am: 5022a346c7

Change-Id: I5ba99c3e20a0aeee1c8a6c5bd6119a1615112cb5
2017-06-15 09:12:50 +00:00
Paul Duffin
54747a7f09 Add junit/textui/** to the proguard filter
Fixes build breakage caused by having duplicate versions of
a class in the application and in the API. This workaround will
be removed once junit classes have been removed from the API.

Bug: 30188076
Test: make Browser2 ANDROID_FORCE_JACK_ENABLED=disabled
Change-Id: I9a9031d3ef6d82f35413b229d588a605f9ed39dc
2017-06-15 08:42:23 +01:00
Colin Cross
a1b843c2b6 Merge "Add LOCAL_JAR_PROCESSOR" am: 9f52f0d17d am: abcbe9ab86
am: dcc9240a71

Change-Id: I21ecc09b9f5678746b8bb02056583f10e90e71ee
2017-05-23 02:12:43 +00:00
Colin Cross
f8a49c5a37 Add LOCAL_JAR_PROCESSOR
Allow using a host java library as an intermediate processor step
after javac but before desugar, proguard, or dx.

Test: manual
Change-Id: I7fb843e10d96c0167f6e4371582fabcc1454521f
2017-05-22 17:30:13 -07:00
Paul Duffin
29cdd2d433 Merge "Add c/a/i/u/* to the list of injar filters" am: 9198da8c21 am: 23eb5019bc
am: c4977665f1

Change-Id: I5673a8604c4fbfe4efaedd750863d5a757e33977
2017-05-15 15:54:51 +00:00
Paul Duffin
e949585a62 Add c/a/i/u/* to the list of injar filters
Previous change that moved com.android.internal.util.Predicate
to the legacy-android-test JAR caused a proguard build breakage
due to duplicate classes in the application and library. This
fixes it in the same way as previous issues with junit and
android.test classes were resolved by excluding those classes
from the application JAR.

Bug: 30188076
Test: make checkbuild and make -j ANDROID_FORCE_JACK_ENABLED=disabled checkbuild
Change-Id: Ica0089607187f970251ddba339a1f71d4cad80cc
2017-05-15 15:17:55 +01:00
Colin Cross
5730186686 Merge "Make javac checkbuilds match jack" am: cb8077df16 am: 9f1e58aab9
am: 2e2758b69d

Change-Id: I7d62da41492c2a4aae39d5f29b9b6086be9f58e6
2017-05-02 23:10:30 +00:00
Colin Cross
761d673df4 Merge "Support LOCAL_JACK_ENABLED := javac_frontend" am: 64ed2f2478 am: d6a3273faa
am: eb2457b89e

Change-Id: I98104d161dcc709a764cb86750d3217538863fdb
2017-05-02 18:15:12 +00:00
Colin Cross
9eff830fa2 Make javac checkbuilds match jack
Building all java to dex is very slow.  Make javac checkbuilds act
like jack checkbuilds and only build to class files for unused
modules, and add a java-dex target that can be used to build
everything to dex.

Test: m -j checkbuild
Change-Id: Idcf9c9e0223b9dd88aaa53beb0cb50a230034b0f
2017-04-28 13:39:16 -07:00
Colin Cross
b17f285169 Support LOCAL_JACK_ENABLED := javac_frontend
Allow working around Jack bugs by using javac to compile *.java
to class files, and then pass through Jack for desugaring,
proguarding, and dexing.

Also make ANDROID_COMPILE_WITH_JACK=false override LOCAL_JACK_ENABLED.

Bug: 37483961
Test: m -j checkbuild
Test: Add LOCAL_JACK_ENABLED := javac_frontend to a target
Change-Id: I2189055aac9deccc36b8eab8e949796dddadf7a1
2017-04-28 13:39:12 -07:00
Colin Cross
bb7ba04031 Merge "Filter and colorize javac output V3" am: c8387929d1 am: f4ef1db272
am: 2f1488ae86

Change-Id: I73b5ca7a919c299aa062e5814f9f6b165f8c6527
2017-04-18 23:13:27 +00:00
Colin Cross
5f89212e24 Filter and colorize javac output V3
Add soong_javac_wrapper to all javac commands. soong_javac_wrapper
colorizes javac output, and hides noisy messages.

Previously attempted in I7e8fcd2e4e1ed3ff530a8ccfe931ceb7e411e0ad
and I449a61ed2c95b3e1afd51a31a11baab15d97e2f2.

Test: m -j ANDROID_COMPILE_WITH_JACK=false
Change-Id: I9d7a20d766fadab323a4cf95e5734741b3f578bb
2017-04-18 21:04:58 +00:00
Colin Cross
e8ee68bb9b Support java annotation proccessors
The codebase is growing more uses of annotation processors,
through a mixture of LOCAL_ADDITIONAL_DEPENDENCIES and
LOCAL_JACK_FLAGS.  Add LOCAL_ANNOTATION_PROCESSORS and handle
the rest in the build system.

For now we also need LOCAL_ANNOTATION_PROCESSOR_CLASSES to
work around bad behavior in grok (b/25860419).

Test: m -j java
Change-Id: I465b021e65d25ed3ea517333a82ec4ebd63fc038
(cherry picked from commit cde14987ba)
2017-04-11 12:22:53 -07:00
Colin Cross
cde14987ba Support java annotation proccessors
The codebase is growing more uses of annotation processors,
through a mixture of LOCAL_ADDITIONAL_DEPENDENCIES and
LOCAL_JACK_FLAGS.  Add LOCAL_ANNOTATION_PROCESSORS and handle
the rest in the build system.

For now we also need LOCAL_ANNOTATION_PROCESSOR_CLASSES to
work around bad behavior in grok (b/25860419).

Test: m -j java
Change-Id: I465b021e65d25ed3ea517333a82ec4ebd63fc038
2017-04-11 09:56:09 -07:00
Colin Cross
5e58793731 Add support for LOCAL_ERROR_PRONE_FLAGS
This will allow individual modules to enable error prone checks
as needed so that the change to treat an error prone check as a
compiler error can be done atomically with the changes to fix
the issues that check reveals.

Tested with the following steps, cleaning up the targets in
between to ensure that it was rebuilt everytime.

Set LOCAL_ERROR_PRONE_FLAGS := -Xep:ClassCanBeStatic:WARN
compiler error in junit-params-test target. Built
javac-check-junit-params-test with RUN_ERROR_PRONE=true to make
sure that compilation failed.

Built the javac-check-junit-params-test without RUN_ERROR_PRONE
set to make sure that the flag is not included unless explicitly
requested.

Built the junit-params-test as normal to make sure it still
worked properly.

Bug: 31507496
Test: See above
Change-Id: I88b5800dacd0e30dd9dcfa5f42e89d1428957365
Merged-In: I88b5800dacd0e30dd9dcfa5f42e89d1428957365
(cherry picked from commit 3ca9298d99)
2017-04-07 17:46:40 -07:00
Colin Cross
5cc452de64 Merge "Fix duplicate and dangling rules" am: f9f8b21af3 am: 50d2ffdfe3
am: 348d20bcce

Change-Id: I495a6d0a8c733c942248e1d378c9f660e1cc7322
2017-04-06 20:07:31 +00:00
Colin Cross
96476c1d50 Fix duplicate and dangling rules
I6730e2d3ec38004874265b2a690442dec57b33f4 introduced duplicate rules
to build classes.jar for static java library prebuilts, and left rules
to copy $(built_dex_intermediates) to $(built_dex) for modules that
don't build dex files.

Move prebuilts LOCAL_BUILT_MODULE back to javalib.jar to match
non-prebuilt modules, and remove the manual building of javalib.jar.

Add a check around $(built_dex_intermediates) for static java libraries.

Bug: 36901093
Test: m -j ANDROID_COMPILE_WITH_JACK=false
Change-Id: I291510b56162f0d35553e3c7ccd59b1382224d62
2017-04-06 10:23:04 -07:00
Colin Cross
99c83f2bda Merge "Rearrange java library outputs" am: 7b7363fffb am: a4435a5025
am: 09018269a8

Change-Id: I35b5527c4142f9486c6d57498789ba2249d0a4a3
2017-04-06 15:52:26 +00:00
Colin Cross
1ed4235172 Merge "Move proguard before classes.jar" am: 41d5cd7420 am: c40073c77f
am: 6ade789f59

Change-Id: I9ac539f18a998c3a85960526a77cfdebef9ca641
2017-04-06 02:50:55 +00:00
Colin Cross
941b682099 Rearrange java library outputs
Jack can silently handle using a java library as a static java
library by merging in the java library dex file.  This causes
problems when switching to javac, because dex doesn't support
dex merging with multidex enabled?

Make the output files consistent between java libraries and static
java libraries.  Java libraries will now produce:
classes-pre-proguard.jar: the classes before proguard processing
classes.jar: the final jar file containing classes before dexing
javalib.jar: a jar containing classes.dex

Static java libraries will eventually only produce
classes-pre-proguard.jar and classes.jar.  All inter-library
linking is done with classes.jar, so a java library can be
used as a static java library.

There are too many dependencies outside the build system that
expect javalib.jar to exist for static and host java libraries,
so for now continue to build a javalib.jar that is a copy of
classes.jar.

Test: m -j ANDROID_COMPILE_WITH_JACK=false java
Test: m -j java
Bug: 36901093
Change-Id: I6730e2d3ec38004874265b2a690442dec57b33f4
2017-04-05 18:04:37 -07:00
Colin Cross
950f1efbbc Move proguard before classes.jar
Downstream users of a library always link against javalib.jar, which
is either the dex jar for java libraries or a copy of
proguard.classes.jar for static java libraries.  In preparation for
making java libraries a superset of static java libraries, make
classes.jar always be the final class-containing jar for use
downstream, and always create a classes-pre-proguard.jar for
users that need a jar without shrinking or obfuscation.

Also rename the intermediates to be consitent: classes-<tool>.jar

Test: m -j ANDROID_COMPILE_WITH_JACK=false java
Change-Id: I3df8b9a4edcd5db996f1fedc54c8a782d4f36a92
Merged-In: I3df8b9a4edcd5db996f1fedc54c8a782d4f36a92
(cherry picked from commit 6fabefa88e)
2017-04-06 00:46:23 +00:00
Colin Cross
d75f928450 Merge "Optimize out extra jar copies" am: 678c77d9af am: cad1043266
am: bc46ba1b98

Change-Id: I8f396b1b14cd0e5b4b5a436473c42b046ecfa527
2017-03-31 04:58:06 +00:00
Colin Cross
0e53734035 Optimize out extra jar copies
Don't copy jar files for disabled stages.  Instead, set the name of
the output to the name of the input so the next stage will directly
pick up the output of the previous stage.

Test: m -j ANDROID_COMPILE_WITH_JACK=false java
Change-Id: Ib7268cbff7ea7ff2ad2caf994aa145e1b7a12b83
2017-03-30 19:35:15 -07:00
Colin Cross
52573ac615 Merge "Revert "Revert "Revert "Add soong_javac_filter to all javac commands"""" am: df69a927d8 am: e088c648c7
am: af35fe9424

Change-Id: I067770d5129653c8502a5db020d963f1a0d8b43b
2017-03-30 01:06:21 +00:00
Treehugger Robot
df69a927d8 Merge "Revert "Revert "Revert "Add soong_javac_filter to all javac commands"""" 2017-03-30 00:53:06 +00:00
Colin Cross
fc8ead6609 Revert "Revert "Revert "Add soong_javac_filter to all javac commands"""
This reverts commit 440079b84b.

Adding the pipe interferes with error codes, which results
in an empty classes-full-debug.jar output file being left
after the failure.  The next build sees the output file with
an up-to-date timestamp and doesn't rerun the failing rule.

Bug: 36666657
Change-Id: I6658edb766d8ba3120f88e3d8d6eda6ea6c691da
2017-03-29 21:01:24 +00:00
Colin Cross
7a43b1edc3 Merge "Desugar when javac version is 1.7" am: ed44a54991 am: ce9dfdeee6
am: 937d276bed

Change-Id: I19430809cf5cf77fc4876d0ddee00bd4ddc4ff12
2017-03-23 03:02:54 +00:00
Colin Cross
200951bdb7 Desugar when javac version is 1.7
Modules compiled with javac 1.7 may have LOCAL_STATIC_JAVA_LIBRARIES
pointing to jars that contain code compiled with javac 1.8, and may
need desugaring.

Test: m -j ANDROID_COMPILE_WITH_JACK=false checkbuild
Change-Id: I470fc0a2fba51179a3ef95986cb3030194cd8f1c
2017-03-22 18:37:53 +00:00
Colin Cross
09e82eb89a Merge changes I0508b2cc,I3d6bbc36 am: 767cb900a1 am: 235e342639
am: 916de9606b

Change-Id: I824c89dc8f10912c60313023e5e1eecd610f36e3
2017-03-21 19:44:13 +00:00
Colin Cross
31060fdde1 Don't desugar static java libraries
Static java libraires are designed to be included in another
java library.  If desugar runs on the static java library,
the resulting jar will contain the desugared lambda classes.
When the static jar is included into another java library
and desugar runs again, it desugars the static java library
classes again, producing the same desugared lambda classes
and colliding in the final jar.

Test: m -j ANDROID_COMPILE_WITH_JACK=false
Change-Id: I0508b2cc9c56dbbd4ac0aba44fb99ea2a27715e0
2017-03-21 10:23:45 -07:00
Colin Cross
8b0034c435 Merge "Pass min sdk version to dx and desugar" am: bbad7c3e1f am: 4a4325d313
am: 14fce4b072

Change-Id: If9ac3b69957689bd451fc97fe968d79f42a751e9
2017-02-23 18:24:46 +00:00
Colin Cross
bbad7c3e1f Merge "Pass min sdk version to dx and desugar" 2017-02-23 18:18:38 +00:00
Colin Cross
91c4804673 Merge "Don't duplicate default platform libraries into proguard flags" am: f7b6bf8cb1 am: c432176a09
am: 58dfc7dc0f

Change-Id: I5873f9b327f41c78d6694f06e4cedaed0e64ba3d
2017-02-23 02:28:56 +00:00
Colin Cross
f7b6bf8cb1 Merge "Don't duplicate default platform libraries into proguard flags" 2017-02-23 02:12:27 +00:00
Colin Cross
5118a25bd9 Don't duplicate default platform libraries into proguard flags
Test: builds
Change-Id: Ib972d954972614f3e6ce522c58fce06beeda3cea
2017-02-22 14:37:03 -08:00
Colin Cross
536ef4e35a Pass min sdk version to dx and desugar
Test: make checkbuild
Change-Id: Idde9712508571ea623126c7d25d2fa67eccf4833
2017-02-22 11:10:37 -08:00
Paul Duffin
472055eebc Merge "Filter JUnit and android.test classes from applications using proguard" am: 38a231d6c3 am: 3e93d553ec
am: 6c99b4bc49

Change-Id: If3985352b27f1de5ea1e9d8c6834c08f5dbcb34f
2017-02-22 12:24:55 +00:00
Paul Duffin
f22aca1e47 Filter JUnit and android.test classes from applications using proguard
The new javac/desugar/proguard/dx based toolchain can fail if
there are duplicate classes in the -injars and -libraryjars
passed to proguard. That causes problems for b/30188076 which
is attempting to remove various junit and android.test classes
from the API because it requires the changes to add those
classes statically to applications are submitted simultaneously
with the change to remove the classes from the API which is not
feasible.

This change simply causes Proguard to ignore the classes from
the application JAR so it will always use them from the library.
That allows the changes to be done separately and only requires
that this change is reverted simultaneously with the change to
update the API.

Bug: 30188076
Test: make checkbuild and make -j ANDROID_FORCE_JACK_ENABLED=disabled checkbuild
Change-Id: I6ed6c45a159d6261d90245551aa2913cc82d2e8b
2017-02-21 13:11:13 +00:00
Colin Cross
348522fabf Merge "Revert "Revert "Add soong_javac_filter to all javac commands""" am: 29f3642dd1 am: 58ffd38f97
am: 77b7e12e25

Change-Id: I7a62df5e9eca3304ec753ea887b8d7b01ce938f4
2017-02-20 07:08:53 +00:00
Colin Cross
440079b84b Revert "Revert "Add soong_javac_filter to all javac commands""
This reverts commit 52d2253ff9.

Test: pipe the grok build output through soong_javac_filter
Change-Id: I449a61ed2c95b3e1afd51a31a11baab15d97e2f2
2017-02-19 19:56:51 -08:00
Colin Cross
12389914c4 Merge "Disable building coverage with javac" am: 271b1f6521 am: 2f23c5caf7
am: ca54c6c24e

Change-Id: I7ac8dbab285f189262a57c5173c71370eb8ef100
2017-02-19 06:35:53 +00:00
Treehugger Robot
271b1f6521 Merge "Disable building coverage with javac" 2017-02-19 06:22:26 +00:00
Colin Cross
25a79dacd9 Disable building coverage with javac
Emma is unable to process framework.jar, and making framework
classes.jar depend on the emma output causes builds to fail when
emma is enabled.  Make classes.jar depend on the jarjar output
instead, bypassing emma for now.

Test: m -j EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true check-public-api
Change-Id: I861282292816e29ca27b67a3eef978d951c1a4dc
2017-02-17 23:47:26 -08:00
Colin Cross
c709c03e4f Merge "Build all the way to classes.dex for checkbuild" am: 41c7d8423b am: 9003bc7d4b
am: d186e1db6f

Change-Id: Ia040c655daf9c7649cd5e3732a67e346787786e5
2017-02-18 06:24:20 +00:00
Colin Cross
c957f4202c Merge "Add a desugar step between javac and proguard" am: 9e92c2fd18 am: e4381dcac2
am: d48f9252d5

Change-Id: If02fc7dcd4bdc06aee3ca35b70da5568e41f0f62
2017-02-18 06:23:56 +00:00
Treehugger Robot
41c7d8423b Merge "Build all the way to classes.dex for checkbuild" 2017-02-18 01:35:40 +00:00
Colin Cross
9e92c2fd18 Merge "Add a desugar step between javac and proguard" 2017-02-18 01:10:08 +00:00
Colin Cross
b176192db4 Merge "Revert "Add soong_javac_filter to all javac commands"" am: 6dd4debe74 am: cb78c50239
am: 4db7d2d72b

Change-Id: I131feafdee7549a1668f8a5ec220284d808cc608
2017-02-17 23:06:41 +00:00
Colin Cross
e1159f5b39 Build all the way to classes.dex for checkbuild
Test: m -j checkbuild
Change-Id: Ie1b7be01c9bbcf1a32399f19d050a93410bdb42b
2017-02-17 15:03:07 -08:00
Colin Cross
eac5ce4e97 Add a desugar step between javac and proguard
This enables support for lambdas by passing class files through the
desugar tool.

Test: m -j checkbuild tests cts
Change-Id: I14ec152355243fd67fe2f107ccbe67a1b4e7e262
2017-02-17 15:03:06 -08:00
Colin Cross
52d2253ff9 Revert "Add soong_javac_filter to all javac commands"
This reverts commit a341bf0f86.

Breaks grok builds that replace javac with another tool:
reading standard input: bufio.Scanner: token too long

Change-Id: I825587c465b05c1fbddb7794dc1c84f5f2c883d1
2017-02-17 22:53:42 +00:00
Colin Cross
9256be1822 Merge changes I7e8fcd2e,Ie12d743c am: 547f7393d7 am: 8283b186be
am: 7d8a028cd3

Change-Id: Ife691c9e00e766293e3648348e3c86b92f96fd56
2017-02-17 22:45:38 +00:00
Colin Cross
a341bf0f86 Add soong_javac_filter to all javac commands
soong_javac_filter colorizes javac output, and hides noisy messages.

Test: builds
Change-Id: I7e8fcd2e4e1ed3ff530a8ccfe931ceb7e411e0ad
2017-02-16 14:08:45 -08:00
Colin Cross
79e2f73b6c Re-enable dx support
This is a partial revert of commits:
858657366f Remove support of disabling Jack.
3ae7861252 Remove javac support in host dex rules.
22313f2b2a Remove rules for building dex with dx

Test: builds
Change-Id: Ie12d743cbe978bdeb030910848b67f5945a4fec8
2017-02-16 14:08:45 -08:00
Jean-Luc Brouillet
8471aa9d46 Merge "Move rs/scriptc to rs/script_api/include." am: a3ab4cc9c9 am: d9bfeff242 am: 235123a821
am: 128cebe6fe

Change-Id: I701bc6cb7cadb16d770b77e4a161994de278e142
2017-01-11 02:27:31 +00:00
Jean-Luc Brouillet
eba449391e Move rs/scriptc to rs/script_api/include.
Test: Compiled ImageProcessing_jb

Change-Id: Icf05a603671499665d2f31a8989fa69585a6f834
2017-01-08 17:57:48 -08:00
Dan Willemsen
a006925a03 Merge "Remove generated java source post clean logic" am: f57aa792c3 am: 5208e4f473 am: 5ae5671a3b
am: b585264834

Change-Id: Ic9d89893213616a13df5530f382fa2ec4d4e964e
2016-12-22 20:36:07 +00:00
Dan Willemsen
cf324af6b8 Remove generated java source post clean logic
Just move the proto and renderscript sources into their own directories
-- the entire directory is wiped if the file list changes since the
command line will change. So we can just enable/disable pulling sources
from those directories based on whether there were files in the list or
not.

Bug: 30947985
Test: m -j java
Test: Remove a proto file from a java lib, ensure the generated source
      is not included.
Change-Id: If7529979de6fa62a651933a3a974f47b033851d6
2016-12-22 10:37:31 -08:00
Joe Onorato
c05a8eec4b Add streaming proto option to the build system.
Test: make w/ other prereq changes
Change-Id: Ie8711878e244074a9a3c128467eeb4908c2ef008
2016-10-13 16:34:07 -07:00
Yohann Roussel
05485ef265 Fix bad JACK_PLUGIN variable am: 16243bdbec am: fa887390aa am: cbe1913c78
am: d52aacb821

Change-Id: I79d8299d4a4b81567a3f4d3b564bbb8813571bbd
2016-09-23 00:09:17 +00:00
Yohann Roussel
646f2121be Add support for Jack plugin am: 53b7fbbe78 am: be50693fc1 am: 62e67d1bff
am: cf65679d9e

Change-Id: I341b3b1708589999bba3bb3d5c49a37f5747dcd0
2016-09-23 00:09:08 +00:00
Paul Duffin
3ca9298d99 Add support for LOCAL_ERROR_PRONE_FLAGS
This will allow individual modules to enable error prone checks
as needed so that the change to treat an error prone check as a
compiler error can be done atomically with the changes to fix
the issues that check reveals.

Tested with the following steps, cleaning up the targets in
between to ensure that it was rebuilt everytime.

Set LOCAL_ERROR_PRONE_FLAGS := -Xep:ClassCanBeStatic:WARN
compiler error in junit-params-test target. Built
javac-check-junit-params-test with RUN_ERROR_PRONE=true to make
sure that compilation failed.

Built the javac-check-junit-params-test without RUN_ERROR_PRONE
set to make sure that the flag is not included unless explicitly
requested.

Built the junit-params-test as normal to make sure it still
worked properly.

Bug: 31507496
Test: See above
Change-Id: I88b5800dacd0e30dd9dcfa5f42e89d1428957365
2016-09-21 13:39:44 +01:00
Yohann Roussel
16243bdbec Fix bad JACK_PLUGIN variable
Changed to LOCAL_JACK_PLUGIN.

(cherry picked from commit 17924b136cb5bfc60d138e8c7e5c18a90b5965c3)

Test: Manually tested by some manual activations of the coverage plugin.
Change-Id: I1be4aaa502103fc308d35a5672dc4fe5900c4ebe
2016-09-21 10:54:42 +02:00
Yohann Roussel
53b7fbbe78 Add support for Jack plugin
And ensure compatibility with coverage plugin.

(cherry picked from commit 862bb84d37e3e6ca61080de58f206e512e09d4e0)

Bug: 28876950
Test: Manually tested by some manual activations of the coverage plugin.
Change-Id: I804558a501825357bf0812de626d2957eedbdc13
2016-09-21 10:53:45 +02:00
Paul Duffin
32bd0adf9c Add targets for building individual modules using javac
This is needed in order to be able to run error prone (which is
a plugin replacement for javac) on a subset of the java code.

Bug: 31507496
Test: Build javac-check-core-tests and check the resulting JAR
Change-Id: I5a556920572fcdad7b39d67e3f00fe0e0f1f8f46
2016-09-19 13:38:51 +01:00
Christopher Wiley
2ee4f68d38 Merge \"Fix typo in setting PRIVATE_MODULE for AIDL source\"
am: 05038d84dc

Change-Id: I3fb16f448c48e9e14fb4e7080c2955c3d38c6d11
2016-06-24 21:29:55 +00:00
Christopher Wiley
dc9e2675e6 Fix typo in setting PRIVATE_MODULE for AIDL source
Bug: 29619260
Change-Id: I59f883c1a92075800844cc2a77b307782a9ab800
2016-06-24 13:13:52 -07:00
Christopher Wiley
752860dcfc Merge \"Fix path escaping for aidl generated java\"
am: 7e918b6a46

Change-Id: I8e50a344d17c4585a725db95386ef6e0eb50fa58
2016-06-24 16:19:25 +00:00
Christopher Wiley
d9205ba17e Fix path escaping for aidl generated java
Bug: 29619260
Change-Id: I806044573661c61e691adf36a47092188db87ab6
Test: Generated java with ../ in paths appears in the right place.
2016-06-23 16:49:32 -07:00
Shinichiro Hamaji
b279eee2de Merge "Add normalize_path.py to prerequisites" am: 71211d8a0a
am: 99129ec4e3

* commit '99129ec4e3f44865cfa9957c3e9533dc77d8f494':
  Add normalize_path.py to prerequisites

Change-Id: I9c7e0d84e0b6ee36017180261af9a31c782058bf
2016-04-21 05:56:08 +00:00
Shinichiro Hamaji
71211d8a0a Merge "Add normalize_path.py to prerequisites" 2016-04-21 05:34:06 +00:00
Colin Cross
5cde746042 Make jack_check_timestamp depend on setup-jack-server
Some builds were failing with:
[  3% 2226/61362] /bin/bash out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/jack.check.timestamp.rsp
FAILED: /bin/bash out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/jack.check.timestamp.rsp
No Jack server running. Try 'jack-admin start-server'

While jack-admin was running concurrently:
[  3% 2226/61362] /bin/bash -c "(prebuilts/sdk/tools/jack-admin stop-server 2>&1 || (exit 0) ) && (prebuilts/sdk/tools/jack-admin kill-server 2>&1 || (exit 0) ) && (prebuilts/sdk/tools/jack-admin uninstall-server 2>&1 || (exit 0) ) && (prebuilts/sdk/tools/jack-admin install-server prebuilts/sdk/tools/jack-launcher.jar prebuilts/sdk/tools/jack-server-4.8.ALPHA.jar  2>&1 || (exit 0) ) && (mkdir -p \"/buildbot/dist_dirs/git_nyc-dev-mac-sdk_phone_armv7-sdk/2779793/logs/jack/\" ) && (JACK_SERVER_VM_ARGUMENTS=\"-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Dcom.android.jack.server.log.file=/buildbot/dist_dirs/git_nyc-dev-mac-sdk_phone_armv7-sdk/2779793/logs/jack/jack-server-%u-%g.log\" prebuilts/sdk/tools/jack-admin start-server 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update server prebuilts/sdk/tools/jack-server-4.8.ALPHA.jar 4.8.ALPHA 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-2.28.RELEASE.jar 2.28.RELEASE || exit 47; prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-3.26.ALPHA.jar 3.26.ALPHA || exit 47; prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-3.27.BETA.jar 3.27.BETA || exit 47; prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-3.30.BETA.jar 3.30.BETA || exit 47 )"
Stopping background server
Killing background server
No Jack server to kill
Removing jack server from "/Users/android-build/.jack-server"
Installing jack server in "/Users/android-build/.jack-server"
Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/buildbot/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -Dcom.android.jack.server.log.file=/buildbot/dist_dirs/git_nyc-dev-mac-sdk_phone_armv7-sdk/2779793/logs/jack/jack-server-%u-%g.log -cp /Users/android-build/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher

(cherry picked from commit febe2bcc21)

Change-Id: I406afc87b4f7dda49406c4e1674430d223914e8d
2016-04-20 09:36:45 +02:00
Colin Cross
4cfeeb95ad Merge "Make jack_check_timestamp depend on setup-jack-server" into nyc-dev
am: 816dd48

* commit '816dd481268cf08c521314798facc4a02578dd55':
  Make jack_check_timestamp depend on setup-jack-server

Change-Id: Ib0f452287a86d96b92ff52411baa58d1f11ebe0b
2016-04-20 02:55:00 +00:00
Colin Cross
febe2bcc21 Make jack_check_timestamp depend on setup-jack-server
Some builds were failing with:
[  3% 2226/61362] /bin/bash out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/jack.check.timestamp.rsp
FAILED: /bin/bash out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/jack.check.timestamp.rsp
No Jack server running. Try 'jack-admin start-server'

While jack-admin was running concurrently:
[  3% 2226/61362] /bin/bash -c "(prebuilts/sdk/tools/jack-admin stop-server 2>&1 || (exit 0) ) && (prebuilts/sdk/tools/jack-admin kill-server 2>&1 || (exit 0) ) && (prebuilts/sdk/tools/jack-admin uninstall-server 2>&1 || (exit 0) ) && (prebuilts/sdk/tools/jack-admin install-server prebuilts/sdk/tools/jack-launcher.jar prebuilts/sdk/tools/jack-server-4.8.ALPHA.jar  2>&1 || (exit 0) ) && (mkdir -p \"/buildbot/dist_dirs/git_nyc-dev-mac-sdk_phone_armv7-sdk/2779793/logs/jack/\" ) && (JACK_SERVER_VM_ARGUMENTS=\"-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Dcom.android.jack.server.log.file=/buildbot/dist_dirs/git_nyc-dev-mac-sdk_phone_armv7-sdk/2779793/logs/jack/jack-server-%u-%g.log\" prebuilts/sdk/tools/jack-admin start-server 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update server prebuilts/sdk/tools/jack-server-4.8.ALPHA.jar 4.8.ALPHA 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-2.28.RELEASE.jar 2.28.RELEASE || exit 47; prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-3.26.ALPHA.jar 3.26.ALPHA || exit 47; prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-3.27.BETA.jar 3.27.BETA || exit 47; prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-3.30.BETA.jar 3.30.BETA || exit 47 )"
Stopping background server
Killing background server
No Jack server to kill
Removing jack server from "/Users/android-build/.jack-server"
Installing jack server in "/Users/android-build/.jack-server"
Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/buildbot/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -Dcom.android.jack.server.log.file=/buildbot/dist_dirs/git_nyc-dev-mac-sdk_phone_armv7-sdk/2779793/logs/jack/jack-server-%u-%g.log -cp /Users/android-build/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher

Change-Id: Ib35f313daee93dc6a3548e652cbcd4cb4d304f93
2016-04-19 17:22:29 -07:00
Shinichiro Hamaji
d50001e74a Add normalize_path.py to prerequisites
Bug: 27954979
Change-Id: I1e22eb4f42a8cb348ce1101e207e239bc5aa7976
2016-04-19 16:22:27 +09:00
Yohann Roussel
a1d82ef12e Merge "Allow to force min sdk given to Jack" am: 6f4f2a7
am: bd65cc3

* commit 'bd65cc387b1becad1b9c5179f7932bd339b8cf9f':
  Allow to force min sdk given to Jack

Change-Id: I55b673b0bb52e4f6f3d4265279528e353a157550
2016-04-14 21:37:25 +00:00
Yohann Roussel
d98c42071a Allow to force min sdk given to Jack
Allows setting the min sdk version for target Jack commands,
overriding the default value obtained from LOCAL_SDK_CURRENT.

Bug: 28188420

(cherry picked from commit 109141ccc9)

Change-Id: Id9c5275bc71b8d9042173bf1e40aa3199e9508e6
2016-04-14 23:25:14 +02:00
Yohann Roussel
6f4f2a7793 Merge "Allow to force min sdk given to Jack" 2016-04-14 21:14:38 +00:00
Yohann Roussel
109141ccc9 Allow to force min sdk given to Jack
Allows setting the min sdk version for target Jack commands,
overriding the default value obtained from LOCAL_SDK_CURRENT.

Bug: 28188420
Change-Id: I1b84ad8a7b6ae30639f8ade455c1e542af5692e4
2016-04-14 20:59:47 +00:00
Sebastien Hertz
e90a711014 Merge "Update code coverage filtering" am: cb49804
am: e0f8435

* commit 'e0f84353065a1d35c349e9e2939b3862a3aef7bd':
  Update code coverage filtering

Change-Id: I4787c538e3a47c792e68d639ae5d3fbfcd95f494
2016-04-11 14:46:20 +00:00
Sebastien Hertz
18da8dd97a Update code coverage filtering
Replaces old LOCAL_EMMA_COVERAGE_FILTER by new variables:
- LOCAL_JACK_COVERAGE_INCLUDE_FILTER for included classes
- LOCAL_JACK_COVERAGE_EXCLUDE_FILTER for excluded classes
Both variables can contain a comma-separated list of class names,
where * and ? are accepted wildcard (like foo.?ar.*).

When code coverage is enabled, we will use these variables to
pass code coverage filters on the Jack command-line.

Bug: 28014424

(cherry picked from commit 74ec3f49d1)

Change-Id: Ie4253981c0e6a62422ab84dfd67ef5eebc0b0284
2016-04-11 16:43:12 +02:00
Sebastien Hertz
cb49804e06 Merge "Update code coverage filtering" 2016-04-11 14:31:35 +00:00
Sebastien Hertz
74ec3f49d1 Update code coverage filtering
Replaces old LOCAL_EMMA_COVERAGE_FILTER by new variables:
- LOCAL_JACK_COVERAGE_INCLUDE_FILTER for included classes
- LOCAL_JACK_COVERAGE_EXCLUDE_FILTER for excluded classes
Both variables can contain a comma-separated list of class names,
where * and ? are accepted wildcard (like foo.?ar.*).

When code coverage is enabled, we will use these variables to
pass code coverage filters on the Jack command-line.

Bug: 28014424
Change-Id: Ic29c99b6feb7ea2251c29d659e7ea1f1c46d1ed1
2016-04-08 10:26:49 +02:00
Shinichiro Hamaji
f84255570d Merge "Add jack\'s argument files to prerequisites" am: 06dbe19
am: ac61fed

* commit 'ac61fedf9e9a68206d2f2507557cce14ee8524e6':
  Add jack's argument files to prerequisites

Change-Id: Id6959d79000252ab91823d2252297500a4dd6dd4
2016-04-08 08:13:04 +00:00
Shinichiro Hamaji
4eaeef8df7 Add jack's argument files to prerequisites
Dex files should be updated when jack-default.args or
proguard*.flags are modified.

Bug: 27954979
Change-Id: I72a7084302f4ef92a89a8068f03f790dd7acd582
2016-04-07 18:56:42 +09:00
Ying Wang
81ef4714f4 Merge commit '1f07720f8518236e8438ae0f25ea7211da8c8c45' into manual_merge_1f07720
Change-Id: I5ad50aacbe99b4ebf8ae7e630f169100128b5b3c
2016-03-31 10:10:42 -07:00
Ying Wang
858657366f Remove support of disabling Jack.
We removed code and variables related to running dx on classes.jar in
this change. Also removed target emma rules (but kept the emma rules for
host java libraries), for it's now done by Jack.
We still support to build classes.jar (and javalib.jar for static Java
libraries) using javac, because tools like javadoc need class files as
input.
Removed the obsolete install-dex-debug.

Bug: 27400061
Change-Id: If0bcdfe62cb181a98754fb0dbe1c12c92e38d3e8
2016-03-30 14:03:12 -07:00
Sebastien Hertz
6ec1f057dc Rename emma coverage files
We no longer use emma with Jack. However, during the process of a
full build, we may run the emma task and overwrite the coverage file
generated by Jack with the one from emma because they use the same
filename.

This CL renames coverage files generated by emma so they no longer
break those created by Jack.

Keep coverage.em file name for host rules where Jack is not called.

Bug: 27822188

(cherry picked from commit 491c9ce48a
&& commit 8f0e52c3a6)

Change-Id: I26beee5a8d42a2ef1d476661e4b591fb09f1276f
2016-03-30 19:03:34 +02:00
Shinichiro Hamaji
fbd5d8de0f Merge "Fix dependencies around tools/*-event-log-tags.py" am: 4487319
am: a2be61e

* commit 'a2be61ed16bcb406030ff01a30e4dec90a8ff5de':
  Fix dependencies around tools/*-event-log-tags.py

Change-Id: I8fee3f7846e723d46eb26356798eedb9566f3a28
2016-03-29 20:51:05 +00:00
Shinichiro Hamaji
4487319141 Merge "Fix dependencies around tools/*-event-log-tags.py" 2016-03-29 20:40:31 +00:00
Shinichiro Hamaji
d3ce14c325 Fix dependencies around tools/*-event-log-tags.py
We should regenerate merged tag files and java sources when
these scripts are updated.

Change-Id: Id5f11d6f480f3f74dab08f01e929ee2d7fafd2d0
2016-03-30 03:04:40 +09:00
Sebastien Hertz
eff5d9d0e1 Merge "Rename emma coverage files" am: f7e06ef
am: dbad7c2

* commit 'dbad7c237cf04f799d680e7e9920848a17ff4f5c':
  Rename emma coverage files

Change-Id: Id35b2972bd208391c5f6cfd4490437ca7e119052
2016-03-29 07:26:19 +00:00
Sebastien Hertz
f7e06ef3b4 Merge "Rename emma coverage files" 2016-03-29 07:17:12 +00:00
Ying Wang
dcb1da9093 Merge "Remove rmtypedefs from the build system."
am: 6557ba5

* commit '6557ba5335798627572669512489fdc8c59915a6':
  Remove rmtypedefs from the build system.
2016-03-25 18:08:55 +00:00
Sebastien Hertz
491c9ce48a Rename emma coverage files
We no longer use emma with Jack. However, during the process of a
full build, we may run the emma task and overwrite the coverage file
generated by Jack with the one from emma because they use the same
filename.

This CL renames coverage files generated by emma so they no longer
break those created by Jack.

Bug: 27822188
Change-Id: Ie3fdc2b8f53deafbefbd6973e39f29d8c46f371e
2016-03-25 17:11:38 +01:00
Ying Wang
72bc59ce8b Remove rmtypedefs from the build system.
We don't need to run rmtypedefs in javac compilation now, because the
runtime libraries are compiled by only jack, which takes care of
rmtypedefs by itself.

Bug: 27828139
Change-Id: Ie480ae5aead8f3f58f956978fc4a05c28a35dec6
2016-03-24 12:25:56 -07:00
Ying Wang
f3920d0aac Merge "Add phony target javac-check."
am: 49b524c

* commit '49b524cb4a6d74b3fee49a728714d74202ce76f0':
  Add phony target javac-check.
2016-03-24 18:39:12 +00:00
Ying Wang
cddeb6c4f0 Add phony target javac-check.
javac-check covers all classes.jars that are compiled with javac
instead of jack. This target is required by tools that still need java
class files as input.

Bug: 26705771
Change-Id: I6896b9a6026a2a0dae6145d1ef5a839756aa3458
2016-03-24 11:12:16 -07:00
Yohann Roussel
2ae244c578 Remove rules for building dex with dx
This is just to ensure no dex file is built with dx any more, cleaning
of the build rules from Jack optionality is still to be done.

Bug: 27218410

(cherry picked from commit 22313f2b2a)

Change-Id: I1e7f2f5dcc7f95a44f5ebf2e4ba99931ff3ba014
2016-03-18 16:03:00 +01:00
Yohann Roussel
cb43e9d0da Merge "Remove rules for building dex with dx"
am: a978779

* commit 'a978779668cb6dd8791348dc701bf154f80164af':
  Remove rules for building dex with dx
2016-03-18 13:59:10 +00:00
Yohann Roussel
a978779668 Merge "Remove rules for building dex with dx" 2016-03-18 13:50:55 +00:00
Yohann Roussel
22a9e788a7 Fix jack min sdk version for ub branches
Bug: 27371864

(cherry picked from commit d6101b6786)

Change-Id: Idd926f5667fbe4275f8f1d80733b8c4471570874
2016-03-16 17:59:18 +01:00
Yohann Roussel
fd8bdb4f3b Fix jack min sdk version for ub branches
am: d6101b6

* commit 'd6101b678688bce96d67f8d945537f405f648194':
  Fix jack min sdk version for ub branches
2016-03-16 16:45:11 +00:00
Yohann Roussel
26912851ab resolve merge conflicts of 63de777 to nyc-dev-plus-aosp
Change-Id: I5dadd6f7bbf494665f9deb0cfafcce65530825d0
2016-03-16 17:33:38 +01:00
Yohann Roussel
d6101b6786 Fix jack min sdk version for ub branches
Bug: 27371864
Change-Id: Idd926f5667fbe4275f8f1d80733b8c4471570874
2016-03-16 17:20:20 +01:00
Yohann Roussel
740ec8fe8a Inform Jack of the min sdk
Set Jack min sdk according to LOCAL_SDK_VERSION. Gives Jack current
version when LOCAL_SDK_VERSION is not available.

Bug: 27371864

(cherry picked from commit c6383d6ec6)

Change-Id: Ieba0219494f29d2737d2ca234317c3af7e5e72c8
2016-03-16 15:41:00 +01:00
Yohann Roussel
c6383d6ec6 Inform Jack of the min sdk
Set Jack min sdk according to LOCAL_SDK_VERSION. Gives Jack current
version when LOCAL_SDK_VERSION is not available.

Bug: 27371864

Change-Id: I5db233fe09aed0fae37fe9a92658bc8f24b86cdf
2016-03-16 11:55:46 +01:00
Yohann Roussel
22313f2b2a Remove rules for building dex with dx
This is just to ensure no dex file is built with dx any more, cleaning
of the build rules from Jack optionality is still to be done.

Bug: 27218410
Change-Id: Iea2c66802b6c64c52690ad9d6d487bdce5f50b79
2016-03-16 10:33:02 +01:00
Yohann Roussel
962282bde2 Revert "Inform Jack of the min sdk"
This reverts commit 94451580af.

Bug: 27371864
Change-Id: I60a8c89b2ab8a6cbde4dd3b0aed24b71700815ab
2016-03-15 15:02:11 +00:00
Yohann Roussel
94451580af Inform Jack of the min sdk
Set Jack min sdk according to LOCAL_SDK_VERSION. Gives Jack current
version when LOCAL_SDK_VERSION is not available.

Bug: 27371864
Change-Id: Ieba0219494f29d2737d2ca234317c3af7e5e72c8
2016-03-11 11:55:57 +01:00
Yohann Roussel
57a54b4199 Merge "Use Jack to check build" am: 6a9d0f9718
am: 4fd0463191

* commit '4fd0463191b316fd80b2ec8c0ba33bb5fcf5aa16':
  Use Jack to check build
2016-03-02 09:14:20 +00:00
Yohann Roussel
6a9d0f9718 Merge "Use Jack to check build" 2016-03-02 08:46:24 +00:00
Dan Willemsen
23afb78cf9 Merge commit 'cdaf748e3abefd93a4e45393e96717fad8564c51'
Change-Id: I3c44564b08ed46f46719dbca54d4225718bb8c59
2016-03-01 15:36:08 -08:00
Dan Willemsen
7f016150a0 Remove unused dependencies on $(ACP)
Most of these are calling to copy-file-to-target or similar, which no
longer use $(ACP).

Change-Id: I62287a80c577c34df587b74e70055c2f56050ce7
2016-03-01 13:15:35 -08:00
Yohann Roussel
e792abc2d9 Use Jack to check build
Run jack with no outputs as a quick check for compilation errors and use
a timestamp to store that check was made.

Bug: 19069325

(cherry picked from commit 43084d9f49)

Change-Id: I9b84b503b28cfdfa245f91da0061ee3a79386b28
2016-03-01 16:57:20 +01:00
Yohann Roussel
ee57268cd7 Use Jack to check build
Run jack with no outputs as a quick check for compilation errors and use
a timestamp to store that check was made.

Bug: 19069325

(cherry picked from commit 43084d9f49)

Change-Id: I9b84b503b28cfdfa245f91da0061ee3a79386b28
2016-03-01 16:34:08 +01:00
Dan Willemsen
9ffa38b193 Merge "Remove USE_NINJA=false" am: 3bfc095f53
am: d73633c082

* commit 'd73633c0824a63f7104bddf9a798bccc952b545c':
  Remove USE_NINJA=false
2016-02-29 22:19:29 +00:00
Dan Willemsen
1c6dc5b942 Remove USE_NINJA=false
And everything special-cased on that. Add a warning if USE_NINJA is
set to let users know that it no longer changes anything.

Change-Id: Ib8739151fe26ea6bf8f76b7ac2b8f4097dab0b47
2016-02-26 21:48:31 -08:00
Ying Wang
e295c3df68 AAPT2: library resource compilation
- Switch to static library's package-res.apk as the link artifact.
- For prebuilt AAR file, build package-res.apk using aapt2's "--dir"
  option.
- New LOCAL variables:
  LOCAL_USE_AAPT2: a module can opt-in with "LOCAL_USE_AAPT2 := true".
  LOCAL_STATIC_ANDROID_LIBRARIES: static Java libraries with compiled
                   resources.
  LOCAL_SHARED_ANDROID_LIBRARIES: shared Java libraries with compiled
                   resources.

Bug: 25958912
Change-Id: I4be2d1e8137555986338c2583cb39b0c97391751
2016-02-26 10:44:56 -08:00
Yohann Roussel
b7de0fb1ed Add support for testing obfuscated app with Jack
Bug: 17481317
Bug: 27215871
Bug: 27215868

(cherry picked from commit 505dafb03b)

Change-Id: Ia12fb92585cfcc595eef6cd096d27e779e596f7d
2016-02-22 11:51:54 +01:00
Yohann Roussel
505dafb03b Add support for testing obfuscated app with Jack
Bug: 17481317

Change-Id: I80cb4e3991e858a39e7415fb7f1896d6992c950f
2016-02-17 16:01:58 +00:00
Sebastien Hertz
8192d3b821 Merge "Support code coverage with Jack" am: 4dad88980f
am: 7b02e64148

* commit '7b02e64148e6a1c0355d715b2a8034061f0d2837':
  Support code coverage with Jack
2016-02-02 09:13:57 +00:00
Sebastien Hertz
4dad88980f Merge "Support code coverage with Jack" 2016-02-02 07:31:37 +00:00
Shinichiro Hamaji
87bc53a281 Merge "Use dependency files generated by llvm-rs-cc for Java" am: e786d21854
am: 2f4b8a042c

* commit '2f4b8a042cacf2667d9704ef2e59373b6a2591cc':
  Use dependency files generated by llvm-rs-cc for Java
2016-02-01 23:10:33 +00:00
Shinichiro Hamaji
52a1d6c666 Use dependency files generated by llvm-rs-cc for Java
This is a reland of 4c474617d4
This time, we use awk instead of sed, and the script works
on Mac.

For C++ code llvm-rs-cc defines two targets but it defines
three targets for Java. The sed script was updated to handle
both cases appropriately.

Bug: 26839129
Change-Id: I1bca7d253764554d552950e03deedabaa9b7f17e
2016-02-01 17:59:01 +09:00
Shinichiro Hamaji
bee8fb862b Merge "Revert "Use dependency files generated by llvm-rs-cc for Java"" am: d6184e1da9
am: b1e250b44a

* commit 'b1e250b44aef5cf32493024584188d5055e0f54f':
  Revert "Use dependency files generated by llvm-rs-cc for Java"
2016-02-01 08:22:05 +00:00
Shinichiro Hamaji
d6184e1da9 Merge "Revert "Use dependency files generated by llvm-rs-cc for Java"" 2016-02-01 08:16:42 +00:00
Shinichiro Hamaji
5f50ea3bc9 Revert "Use dependency files generated by llvm-rs-cc for Java"
This reverts commit 4c474617d4.

Change-Id: I66c46360d0ccf927c807ddd5cfbc56cbd97ed4a2
2016-02-01 08:08:26 +00:00
Shinichiro Hamaji
283e648a24 Merge "Use dependency files generated by llvm-rs-cc for Java" am: 3fdb9ad716
am: a73d744e36

* commit 'a73d744e36bd5e5c237607fb57253b757e9facf5':
  Use dependency files generated by llvm-rs-cc for Java
2016-02-01 07:57:01 +00:00
Shinichiro Hamaji
94185e10bb Merge "Use .KATI_DEPFILE for files generated by aidl-java" am: 465fd483f5
am: 45e6d88785

* commit '45e6d88785787b3af24695b71f7ffb55d9ae1787':
  Use .KATI_DEPFILE for files generated by aidl-java
2016-02-01 07:56:47 +00:00
Shinichiro Hamaji
3fdb9ad716 Merge "Use dependency files generated by llvm-rs-cc for Java" 2016-02-01 07:50:32 +00:00
Shinichiro Hamaji
4c474617d4 Use dependency files generated by llvm-rs-cc for Java
This is similar to 2e45fd036a
but this CL is for generated java code.

For C++ code llvm-rs-cc defines two targets but it defines
three targets for Java. The sed script was updated to handle
both cases appropriately.

Bug: 26839129
Change-Id: I5c7705c67f3c65c4c14f74558e603f8ec9f35879
2016-01-28 17:03:02 +09:00
Shinichiro Hamaji
2a0d1fee20 Use .KATI_DEPFILE for files generated by aidl-java
Bug: 26839129
Change-Id: Ief611969b28aea3bb12097ba91d40f3e5010d647
2016-01-28 16:13:05 +09:00
Sebastien Hertz
dfce8ad4f4 Support code coverage with Jack
Building an app with Jack and with the environment variable
EMMA_INSTRUMENT_STATIC set to true will apply code coverage
onto the app targeting Jacoco.

Bug: 20115492
Change-Id: Ief3640fa3faa466f7f6aaa9739e06d3db24110a0
2016-01-27 19:14:14 +01:00
Ying Wang
dd71c85a45 Support to build with AAPT2
To build with AAPT2, set "USE_AAPT2=true".
TODO: Support split apks and generated resources from other than renderscript.

Bug: 25958912
Change-Id: I19b1a038824ce5b2a3d3ffadbce3173c845193fc
2016-01-25 22:41:43 -08:00
Yohann Roussel
4ef01c412a resolve merge conflicts of 42c42b6971 to master.
Change-Id: I40e2d2f7cd3e047bc3bc661f20c7415ce751b321
2015-12-22 15:36:32 +01:00
Yohann Roussel
4a01711267 Merge "Always start jack server before first call to jack" 2015-12-22 13:59:49 +00:00
Shinichiro Hamaji
7034d9beae Merge "Reduce unnecessary rebuilds of .dex files with restat=1" am: 542aa57f1d
am: 0d4a0a9dd5

* commit '0d4a0a9dd5c1f3528b611862cb9fa81313028d1b':
  Reduce unnecessary rebuilds of .dex files with restat=1
2015-12-15 08:17:56 -08:00
Shinichiro Hamaji
f972a4a980 Reduce unnecessary rebuilds of .dex files with restat=1
The .dex.toc files are created by dexdump, which outputs all
information in a .dex file which may affect compilation of
other modules.

For prebuilt java libraries and static java libraries, we'll
output empty .toc files and don't set restat=1. .dex.toc files
are necessary even for static java libraries because they can
be referenced by LOCAL_JAVA_LIBRARIES (instead of
LOCAL_STATIC_JAVA_LIBRARIES).

We don't use this optimization for apps build. We cannot build
dexdump for apps build due to lack of libc++.

Performance:

$ m && touch \
  frameworks/base/core/java/com/google/android/util/Procedure.java \
  && time m
Before: 3m48s
After: 1m46s

Bug: 24597504
Change-Id: Id1665923b414dee705dc60af4c021390a19ea26f
2015-12-14 19:07:34 +09:00
Yohann Roussel
9214a26cfc Always start jack server before first call to jack
Also install and update the server if necessary.

The target start-jack-server produces no file so it's always built.
Since the dependency is "order only", it doesn't cause force rebuilt of
jack targets after start-jack-server execution.

Bug: 25443108

Change-Id: I1608d87d186694d47307e00337b1905f0b8079c4
2015-12-09 22:00:50 +01:00
Colin Cross
f344fe0850 Merge changes I1de10391,I4399ca26,Iec3b2b0b am: bff3c9b4c1 am: bae8872294
am: dbeab8de65

* commit 'dbeab8de6543db1d0393789cb18ee7fd7ed8fedd':
  Use libstdc++ for ijar
  Build ijar for apps build
  Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files
2015-12-01 00:07:45 +00:00
Shinichiro Hamaji
89b255ab71 Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files
The same optimization was done for binaries in

https://android-review.googlesource.com/#/c/175250/

To create a TOC file from .jar files, this change introduces
ijar, which is designed for this purpose. Only #include lines
were modified from the original version.

https://github.com/bazelbuild/bazel/tree/master/third_party/ijar

Performance:

$ m && touch
frameworks/base/core/java/com/google/android/util/Procedure.java && time
m
Before: 4m30s (1580 targets)
After: 3m57s (772 targets)

Unfortunately, the improvement is small yet, but local
experiments showed we can cut ~2 more minutes if the similar
optimization is done for .dex files.

(cherry picked from commit c1f5d9c203)

Bug: 24597504
Change-Id: Iec3b2b0b0e674bee5d80cce3c300dc8fad6e7c13
2015-11-30 11:16:23 -08:00
Shinichiro Hamaji
d973ed9f47 Merge "Revert "Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files"" am: 2ff3ad9045 am: 51ef51c4ad
am: 371b8c7f77

* commit '371b8c7f770f8215e6bda1433e5f236c106b4e64':
  Revert "Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files"
2015-11-27 04:07:51 +00:00
Shinichiro Hamaji
3ae7f66bab Revert "Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files"
This reverts commit c1f5d9c203.

Change-Id: I7e9969a060e3f1380154da65e76134168aee15d8
2015-11-27 03:58:51 +00:00
Shinichiro Hamaji
534bd29363 Merge "Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files" am: c9a1b27845 am: 27770abe27
am: b42da32564

* commit 'b42da32564886ab7d3d5a2518b6868cd8fab9c78':
  Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files
2015-11-26 05:37:01 +00:00
Michael Wright
0fb087fc73 Add new Test API for CTS testing.
Bug: 25608286
Change-Id: I0334061b548970959e46392dc3a1feed8533548c
2015-11-25 11:38:44 +00:00
Shinichiro Hamaji
c1f5d9c203 Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files
The same optimization was done for binaries in

https://android-review.googlesource.com/#/c/175250/

To create a TOC file from .jar files, this change introduces
ijar, which is designed for this purpose. Only #include lines
were modified from the original version.

https://github.com/bazelbuild/bazel/tree/master/third_party/ijar

Performance:

$ m && touch
frameworks/base/core/java/com/google/android/util/Procedure.java && time
m
Before: 4m30s (1580 targets)
After: 3m57s (772 targets)

Unfortunately, the improvement is small yet, but local
experiments showed we can cut ~2 more minutes if the similar
optimization is done for .dex files.

Bug: 24597504
Change-Id: Id54953aea25e497c8ebbe783b03f13b488577c6a
2015-11-19 17:10:35 +09:00
Ying Wang
702e01e258 Add LOCAL_FINDBUGS_FLAGS to support custom findbugs flags.
Use LOCAL_FINDBUGS_FLAGS to specify findbugs command line flags.
To use findbugs filters:
LOCAL_FINDBUGS_FLAGS := -exclude $(LOCAL_PATH)/exclude.xml -include \
                        $(LOCAL_PATH)/include.xml

where exclude.xml and include.xml are filter files.
The build system automatically adds the filter files as dependency of
findbugs' output xml.

Bug: 24948760
Change-Id: I82502c0ade910c5255001fa5f390316137ce0be6
2015-10-21 10:30:51 -07:00
Yohann Roussel
8998d57404 Allow control of jack used for compilation
Version of Jack used to compile a module can now be control from
a dedicated mk located in prebuilts/sdk/tools

Bug: 24564814

(cherry picked from commit b68c9a498d)

Change-Id: I7809dc966026ff94b5cb2daa7e2c63762ca4768d
2015-10-21 17:22:05 +02:00
Yohann Roussel
b2c5558435 Clean call-jack and its callers
This is possible now that we have the new Jack server.
Also fix dependency from dex/jack target to jack script
instead of jack.jar.

(cherry picked from commit 5e50b34221)

Change-Id: I8e7aa5087ba8d73cc93140ddfca8f4ab2f505175
2015-10-21 17:02:25 +02:00
Yohann Roussel
b68c9a498d Allow control of jack used for compilation
Version of Jack used to compile a module can now be control from
a dedicated mk located in prebuilts/sdk/tools

Bug: 24564814

Change-Id: Ie8120c97e0fa10953d4d015afd27aacfac80e5b6
2015-10-14 11:32:45 +02:00