Commit graph

825 commits

Author SHA1 Message Date
Søren Gjesse
6836c47b8b Merge "Added support for using R8 instead of Proguard + dx"
am: 9047dce212

Change-Id: Ibf7489aa1af1b2ae5fc5540b3eceec0c4a67a32b
2017-10-24 06:45:36 +00:00
Søren Gjesse
0c1fe64ce8 Added support for using R8 instead of Proguard + dx
With this change building with USE_R8=true will run R8 instead of Proguard + dx
for all targets that have LOCAL_PROGUARD_ENABLED set. R8 (through the
compatproguard wrapper) will use the same options as Proguard for now.

Additional Proguard configurations for R8 can be added using LOCAL_R8_FLAG_FILES
on individual targets. This makes it possible to make configuration updates
without touching the Proguard + dx configuration

Test: m -j
Test: m -j USE_D8=true USE_R8=true
Test: m -j USE_D8=true USE_R8=false
Test: m -j USE_D8=true
Change-Id: I78e8a0fd17cc5cefedccffe95b93c94a60a727f1
2017-10-23 08:58:30 +02:00
Nan Zhang
117151358c Merge "Remove Turbine definition from config.mk"
am: a6d7420c58

Change-Id: If37be35711fbb8e2c728915c23c54d86f41fa83a
2017-10-21 01:28:46 +00:00
Treehugger Robot
a6d7420c58 Merge "Remove Turbine definition from config.mk" 2017-10-21 01:20:45 +00:00
Alan Leung
70e5a23d9e Merge "Remove D8 make variables."
am: 3c8949e342

Change-Id: I9ad7a96b4b317c85a68f62f9812337bb109ddbfa
2017-10-20 19:05:04 +00:00
Nan Zhang
9438dbea25 Remove Turbine definition from config.mk
Test: m clean && m -j

Change-Id: I5444301864c2e4f08eb525c286994898f5ec2494
2017-10-19 23:05:45 -07:00
Alan Leung
3c736b9315 Remove D8 make variables.
Bug: 67754178
Test: m -j32 checkbuild && USE_D8=true m -j32 checkbuild

Change-Id: I474e57365a8b2c5ff82b5774cb38e6846454f854
2017-10-19 16:24:05 -07:00
Colin Cross
7c381d8015 Merge "Use system modules generated by soong when using javac -target 1.9"
am: 58cd98dc47

Change-Id: I1525b7088afee77baee014fd346cf19cf6a9641e
2017-10-17 18:43:21 +00:00
Colin Cross
f960257c14 Use system modules generated by soong when using javac -target 1.9
Soong has support for building system modules.  Use the directories
produced by Soong with --system to replace -bootclasspath arguments
when using javac -target 1.9.

Since soong can't generate current SDK stubs yet, and no existing
SDK stubs need -target, only use -target 1.9 for modules that are
not compiling against the SDK.  That means in practice the only
system modules that will be used for now is the default one,
core-system-modules.

Bug: 63986449
Test: m -j EXPERIMENTAL_USE_OPENJDK9=true makes some progress
Change-Id: I350ef50aedf36fdd72458c23d4fe8a2edf1a9a02
2017-10-16 17:55:24 -07:00
Dan Willemsen
8e7153bf98 Merge "Use CALLED_FROM_SETUP instead of KATI"
am: bd4239a1e1

Change-Id: I2495d57b7038bca63aa148b3a3f02c3ae9d88a87
2017-10-13 07:32:03 +00:00
Dan Willemsen
20f99a60ea Use CALLED_FROM_SETUP instead of KATI
So that we can use kati instead of make for the initial config loading.

Test: m clean; m nothing
Test: USE_GOMA=true m nothing
Test: m PRODUCT-aosp_x86-sdk
Test: m APP-Calculator
Test: multiproduct_kati -only-config  (on AOSP and internal master)
Change-Id: I5d3af847607fa48868c2045401977eca37dc6ae1
2017-10-12 15:35:42 -07:00
Alan Leung
81e4d14cc7 Merge "Revert "Enable D8 by default.""
am: bc29d906bc

Change-Id: Ic839c5b69dca0866049ae4b4f48f41a64fa06697
2017-10-09 21:35:16 +00:00
Alan Leung
ba985e6efe Revert "Enable D8 by default."
Breaks EmulatorSmokeTests

Bug: 67569208

This reverts commit 4c1a09823c.

Change-Id: I85b28b9b59226f4ce6fda0ea2445933eade07d89
2017-10-09 21:24:52 +00:00
Alan Leung
d46624b4d8 Merge "Enable D8 by default."
am: a867dfa71c

Change-Id: I0e68a345fb18cb52033480678eca6979bcb94f5e
2017-10-09 20:18:15 +00:00
Alan Leung
4c1a09823c Enable D8 by default.
Bug: 67569208
Test: m -j32

Change-Id: Ie80ce7ca0e6955ef6c1fbae1fa5b169374068cf4
2017-10-09 07:41:35 +00:00
Alan Leung
5f1417897c Merge "Add USE_D8_BY_DEFAULT in makefile."
am: 03e8fb10d1

Change-Id: I68ba9afe7406fe84ddb9b5d18e583b89d0b8ccd8
2017-10-05 09:20:21 +00:00
Alan Leung
013a37b760 Add USE_D8_BY_DEFAULT in makefile.
Bug: 65854021
Test: m USE_D8=true  showcommands out/target/common/obj/JAVA_LIBRARIES/okhttp_intermediates/with-local/classes.dex
Change-Id: Iec1a05bf6f03cf856faf2e013fa169e1a0beaf7a
2017-10-03 17:15:01 -07:00
Colin Cross
e673deb280 Delete jack support
Remove all support for running jack.

Bug: 65302138
Test: m -j checkbuild
Change-Id: I1ef87c88af3f2689f8b0dcf1a01c958b16159631
Merged-In: I1ef87c88af3f2689f8b0dcf1a01c958b16159631
(cherry picked from commit 5db5d31d73)
2017-10-02 11:15:19 -07:00
Colin Cross
a6bc3a8a4c Delete jack support
Remove all support for running jack.

Bug: 65302138
Test: m -j checkbuild
Change-Id: I1ef87c88af3f2689f8b0dcf1a01c958b16159631
Merged-In: I1ef87c88af3f2689f8b0dcf1a01c958b16159631
(cherry picked from commit 5db5d31d73)
2017-10-02 18:06:56 +00:00
Colin Cross
e69ccc7fb6 Merge changes I0a1aa003,I000c3c22
am: a4a1f2089b

Change-Id: I84d3a5fb255a3b6720f1076429e351fe43510ffe
2017-09-26 18:48:46 +00:00
Colin Cross
78542b9e13 Use dx or d8 from prebuilts/build-tools
Test: m -j checkbuild
Test: m -j TARGET_BUILD_APPS=Gallery2 ANDROID_COMPILE_WITH_JACK=false
Change-Id: I0a1aa00388ac1aab9c8ba967e815f923fe466ced
2017-09-25 16:15:11 -07:00
Colin Cross
5d969a3df4 Desugar lambdas in javac unbundled builds
Use prebuilt core-lambda-stubs from prebuilts/sdk and desugar from
prebuilts/build-tools to desugar lambdas in javac unbundled builds.

Test: apps build with ANDROID_COMPILE_WITH_JACK=false
Bug: 62038127
Change-Id: I000c3c2234443aa17f091784726ab9f63c0cc361
2017-09-25 16:15:11 -07:00
Miao Wang
6062710fed Merge "Correctly set the linker search path for libm and libc."
am: b463cdc874

Change-Id: I07df49db9881ee4e37b56f771d7a523680e06c04
2017-09-23 00:44:04 +00:00
Treehugger Robot
b463cdc874 Merge "Correctly set the linker search path for libm and libc." 2017-09-23 00:34:21 +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
Dan Willemsen
dee143988e Merge "Remove ijar"
am: 1dcffadbc7

Change-Id: I55b0892905cf67655661f5a15ef3574e9e27db97
2017-09-22 21:30:17 +00:00
Dan Willemsen
6f2284e4fe Remove ijar
It's no longer used.

Test: cs/
Change-Id: Ib24094e494d4caa390f83df28c179b6012691ebc
2017-09-21 16:08:51 -07:00
Alan Leung
524ede46bb Merge "Replace DX_ALT_JAR with USE_D8"
am: 3b236ad3e3

Change-Id: I193a3d98cbbdc3f7bb88fb588c9ef9fba8b837c4
2017-09-20 20:01:42 +00:00
Treehugger Robot
3b236ad3e3 Merge "Replace DX_ALT_JAR with USE_D8" 2017-09-20 19:56:38 +00:00
Nan Zhang
d9001d2733 Merge "Use merge_zips to merge jars during Java build in Make."
am: 39bbfe217a

Change-Id: Iad7343ad4d2889fc39161e8ab14449f42d23008b
2017-09-20 19:53:47 +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
a541eaa665 Merge "Revert "Upgrade to ManifestMerger2""
am: c165d9c9ba

Change-Id: I048de67c02b32f9179d245fd98636333c366bddf
2017-09-19 15:48:24 +00:00
Colin Cross
34054eb615 Revert "Upgrade to ManifestMerger2"
This reverts commit a636f16b34.

Bug: 36005379
Change-Id: If5516b34c103016529de4d591038e9e34260a8e8
2017-09-19 15:40:25 +00:00
Colin Cross
8304b5732a Merge "Upgrade to ManifestMerger2"
am: 4971146b2b

Change-Id: I1be76ff452d131f1a4dbe0b12e3b1389fc46f935
2017-09-19 06:44:19 +00:00
Colin Cross
a636f16b34 Upgrade to ManifestMerger2
Switch to using ManifestMerger2 from
prebuilts/gradle-plugin/com/android/tools/build/manifest-merger/25.3.1/manifest-merger-25.3.1.jar

Bug: 36005379
Test: m -j checkbuild
Change-Id: Ia03a1eb096ebab9578e5b08183faa86f6818ff3c
Merged-In: I83bd3f95778e93796d06f063aa7c61d2a63b117b
(cherry picked from commit e76e8021eb)
2017-09-18 21:08:58 +00:00
Alan Leung
be7b6ed397 Replace DX_ALT_JAR with USE_D8
Which would invoke the d8 script instead of calling javac on the jar.

BUG: 65212022
Test: m USE_D8=true
Change-Id: I8ee0b14210cb40895b0b208a01606e10a41f0acf
2017-09-18 12:39:52 -07:00
Nan Zhang
fa8b66f5cc Merge changes from topic "turbine"
am: 872246de0f

Change-Id: I13cba047e145d0ab8c486a4ee60d53f2f5470737
2017-09-01 00:21:34 +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
Nan Zhang
2c82a22d96 Merge "Revert "Add Turbine as part of java build toolchain in Make.""
am: 91ffbf2fbe

Change-Id: I1a1131df064f2243220407dddd3f913ace7d26aa
2017-08-31 20:41:25 +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
2764a16085 Merge "Add Turbine as part of java build toolchain in Make."
am: 0b23748128

Change-Id: Ieed94b471fea95b91b7bc54da8d3860cb794f921
2017-08-31 18:16:13 +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
Dan Willemsen
eba39713c8 Merge changes I863200b2,Ifdd9663b am: 770a498e99 am: 10e9d25035
am: 1761a50f5f

Change-Id: Ia50645f20aaa01796536f784baf06605604008cd
2017-07-26 21:53:59 +00:00
Dan Willemsen
10e9d25035 Merge changes I863200b2,Ifdd9663b
am: 770a498e99

Change-Id: Id9e3dd9d5e8ac3d85d5203dd6430243d9daf01bf
2017-07-26 21:45:04 +00:00
Dan Willemsen
ce7f8dd15a Run uname -sm once, don't use python for HOST_OS_EXTRA
This saves 20-50ms for `lunch` (~7-10%), and double that for every build
execution.

Test: Check HOST_OS_EXTRA on Linux & Mac
Change-Id: I863200b2287c8867f40606237895b1d3ad91e1b3
2017-07-26 10:49:22 -07:00
Dan Willemsen
dc068b0762 Stop calling java -version, remove HOST_JDK_IS_64BIT_VERSION
All users of this variable have been removed. This command was adding
50-175ms to `lunch` (~15-30%), and was running at least twice (serially)
in every build too.

Test: cs/HOST_JDK_IS_64BIT_VERSION
Test: prebuilts/jdk/jdk8/linux-x86/bin/java -version, is 64-bit.
Change-Id: Ifdd9663b010ec45918b29ac037849f49c8cd8f69
2017-07-26 10:49:04 -07:00
Colin Cross
19bd3427d0 Merge "Use java prebuilts" am: 45d2ef40f2 am: d35fe2c55e
am: 1589539f10

Change-Id: Ie701576175eef2469de22e68623a6914ca20239d
2017-07-25 00:52:37 +00:00
Colin Cross
d35fe2c55e Merge "Use java prebuilts"
am: 45d2ef40f2

Change-Id: Icb9e7cd6ad37a5ff37fb72d12a058be79dbabf68
2017-07-25 00:47:17 +00:00
Colin Cross
e97e69359a Use java prebuilts
Point the make java variables at JDK prebuilts in
prebuilts/jdk/jdk8, add them to the path, and clean up
some old overrides.

Reapplies Ibbeb30fab96e45aedd5bb6d710d1170f85789982 after updating
some more manifests to include the prebuilts.

Bug: 62956999
Test: m -j checkbuild
Change-Id: I9e27aa5cb04d1ed09e43b798e5d654843afc000f
(cherry picked from commit 1931750940)
2017-07-20 15:14:26 +00:00
Colin Cross
f2da657628 Merge "Revert "Use java prebuilts"" am: 4d69df5191 am: f4e78ccf25
am: 96018b3d10

Change-Id: Ib54b8c0fbb95179bff97abe028d133da3528380f
2017-07-19 22:58:23 +00:00