Commit graph

13609 commits

Author SHA1 Message Date
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
Treehugger Robot
3b236ad3e3 Merge "Replace DX_ALT_JAR with USE_D8" 2017-09-20 19:56:38 +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
Nicolas Geoffray
121fe5a80a Merge "Revert "Revert "Make privileged apps always keep uncompressed dex files.""" 2017-09-20 08:19:23 +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
Nicolas Geoffray
b06c30b480 Revert "Revert "Make privileged apps always keep uncompressed dex files.""
bug: 30972906
bug: 63920015

Test: doing zipinfo on the produced apks after build.
Test: fugu build

This reverts commit f69441b76b.

Change-Id: I6b029f2044385f3e3fa332091a9244cec79d2474
2017-09-19 13:09:27 +01:00
Colin Cross
4971146b2b Merge "Upgrade to ManifestMerger2" 2017-09-19 06:39:23 +00:00
Jeff Gaston
8228d37ac4 Fix sdk-addon build on build servers
they don't source envsetup.sh

Bug: 65286453
Test: m -j OUT_DIR=/tmp/abs PRODUCT-sdk_gphone_x86-sdk_addon /tmp/abs/host/linux-x86/sdk_addon/google_phone_x86-eng.$(whoami)-linux-x86.zip

Change-Id: Id396203b500e70cfa2b1e1eb5241d88fae88fc36
Merged-In: Id396203b500e70cfa2b1e1eb5241d88fae88fc36
(cherry picked from commit 25210ce70b)
2017-09-18 19:13:49 -07: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
Treehugger Robot
68dad73d34 Merge "Move jacocoagent into the bootclasspath" 2017-09-18 19:57:53 +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
Nicolas Geoffray
bb779a0c04 Merge "Revert "Make privileged apps always keep uncompressed dex files."" 2017-09-18 15:11:09 +00:00
Nicolas Geoffray
f69441b76b Revert "Make privileged apps always keep uncompressed dex files."
Broke Fugu build. Will work on a workaround for it.

bug: 30972906
bug: 63920015

This reverts commit 09dfe6739a.

Change-Id: I5a8b8de4ec98ae44808762ca1ba974ce89bebb05
2017-09-18 15:07:26 +00:00
Nicolas Geoffray
3a5c65ef2f Merge "Make privileged apps always keep uncompressed dex files." 2017-09-18 09:21:53 +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
Nicolas Geoffray
09dfe6739a Make privileged apps always keep uncompressed dex files.
To ensure the verified boot work does not make ART run
dex code uncompressed in memory, make the build system
generate uncompressed dex files in APKs.

The alignment of STORE files in an APK is already handled.

bug: 30972906
bug: 63920015

Test: doing zipinfo on the produced apks after build.
Change-Id: I0ccdeae5d674b2a409a1343c4a14699c7bf0defb
2017-09-15 21:49:05 +01: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
Jeff Gaston
43f3457329 Fix sdk-addon for absolute OUT_DIR
Bug: 65286453
Test: m -j OUT_DIR=/tmp/abs PRODUCT-sdk_gphone_x86-sdk_addon /tmp/abs/host/linux-x86/sdk_addon/google_phone_x86-eng.jeffrygaston-linux-x86.zip
Change-Id: Id2d18fe41de5d533baf1f082292d70d946386249
2017-09-13 15:23:38 -07:00
Treehugger Robot
952f1e5161 Merge "Make -ldl -lrt -lpthread implicit for host builds" 2017-09-09 01:32:23 +00:00
Colin Cross
0bd335f9b0 Make -ldl -lrt -lpthread implicit for host builds
Instead of requiring every host module to specify -ldl -lrt -lpthread
and then break the mac build because -lrt doesn't exist, make them
implicit to match the behavior of modules built for the device.

Test: m -j checkbuild
Change-Id: I7b5b5289a41cd8f6e7dc2da59400955d867ee783
2017-09-08 16:43:55 -07:00
Treehugger Robot
c9916ddbd7 Merge "Remove (TARGET|HOST)_BUILD_TYPE path modifications" 2017-09-08 23:40:36 +00:00
Dan Willemsen
d6ed368fde Remove (TARGET|HOST)_BUILD_TYPE path modifications
They don't really affect anything general in android except for the
output path. Debug builds have been broken due to Soong not respecting
*_BUILD_TYPE, and with ninja, we'll properly rebuild if you switch
between release and debug flags. So just remove the path difference.

Bug: 65453318
Test: TARGET_BUILD_TYPE=debug m
Test: code search to find all the users
Change-Id: I5c6a322e0187d96cdaeef891778508c698f841e0
2017-09-08 14:33:34 -07:00
Treehugger Robot
28e1862411 Merge "Support excluding overlays when enforcing RRO" 2017-09-08 03:21:26 +00:00
Jaekyun Seok
ccee95e6ec Support excluding overlays when enforcing RRO
PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS will be used to specify overlays
to be excluded from enforcing RRO.

The excluded overlays will be applied into the original package.

Bug: 63600240
Bug: 65001751
Test: succeeded building with
PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS := \
    vendor/google/google_overlay/static_only \
    vendor/google/nexus_overlay/common/static_only
and confirmed that config_webview_packages existed in framework-res.apk
with the overlayed value, but not in framework-res__auto_generated_rro.apk.

Change-Id: I0bfb44fc7726710bb78d9100404bc6dd29d06a73
2017-09-08 10:00:46 +09:00
Colin Cross
be1f792a83 Use soong_java_prebuilt.mk to export soong jars to java
Instead of trying to squeeze soong jars through prebuilt_internal.mk,
make a separate soong_java_prebuilt.mk.

Test: m -j checkbuild
Change-Id: I078e67ce58b2b2e0acf4b1ec28823e96b16a0cec
2017-09-07 13:46:02 -07:00
Mathieu Chartier
71f622e247 Merge "Fix boot image profile in make files" 2017-09-05 17:14:08 +00:00
Mathieu Chartier
a2cc65b099 Fix boot image profile in make files
Update location to framework/base/config instead of frameworks/base

Fixed dex2oat dependency to my_out_boot_image_profile_location
instead of my_out_profile_location.

Bug: 37966211
Test: make and flash

Merged-In: I446f11216cf6342861bbbf56ac5c4da2f36fb755

(cherry picked from commit 75edf540e2)

Change-Id: I4a34be8a344880d3e2ccaea3ed0e6390616e0d6c
2017-09-02 23:47:32 +00:00
Nan Zhang
9e37028db0 Fix the build breakage on git-wear-master/mirror-aosp-master-with-vendor
git-wear-master/mirror-aosp-master-with-vendor were still broken due to
my Make synatx mistakes.

Bug: b/64308460

Test: download <git-wear-master> branch locally, and then do:
m -j out/target/product/anglefish/package-stats.txt

Change-Id: Ic1a03b452db7583811a3a3b74067f1fc54f873b4
2017-09-02 10:25:17 -07:00
Nan Zhang
d05e19df41 Fix the build breakage on git-wear-master/mirror-aosp-master-with-vendor
The problem is that when I added .KATI_RESTAT for javalib.jar, I didn't
change the function: create-empty-package to generate javalib.jar.tmp.

The problem causes the build breakage on MacOS/Jack.

Bug: b/64308460

Test: download <git-wear-master> branch locally, and then do:
m -j out/target/product/angelfish/package-stats.txt

Change-Id: I9a5d74caaf164b44676e456050b4f8a5b3bdded0
2017-09-01 18:52:41 -07:00
Tao Bao
27bfc86d8b Merge "Pack system/update_engine/scripts into otatools.zip." 2017-09-01 16:45:08 +00:00
Bo Hu
cfde9a84bc Merge "sdk: add vendor-qem.img into the deps list" 2017-09-01 00:07:48 +00:00
Treehugger Robot
872246de0f Merge changes from topic "turbine"
* changes:
  Revert "Revert "Add Turbine as part of java build toolchain in Make.""
  Remove GLOBAL_JAVAC_DEBUG_FLAGS
2017-09-01 00:01:31 +00:00
bohu
18d1868580 sdk: add vendor-qem.img into the deps list
if it exists. Fix master-without-vendor sdk_x86-sdk build

Change-Id: I5656e7124d30e71120044cce668c54793f77208a
Merged-In: I5656e7124d30e71120044cce668c54793f77208a
(cherry picked from commit a508578811)
2017-08-31 16:57:44 -07:00
Tao Bao
3f4ea7cb88 Pack system/update_engine/scripts into otatools.zip.
The scripts will be needed by OTA releasetools, for parsing A/B OTA
payload.

Bug: 65261072
Test: `m otatools-package` and check for system/update_engine/scripts.
Change-Id: I5cb54561a5fb0454a37879ca20afa95b82ffdefe
2017-08-31 16:42:38 -07:00
Treehugger Robot
14f225b762 Merge "Only generate breakpad symbols for ELF binaries" 2017-08-31 23:37:41 +00:00
Steve Fung
445beae409 Only generate breakpad symbols for ELF binaries
When BREAKPAD_GENERATE_SYMBOLS is set to true, the build will attempt
to run dump_syms for all dynamic binaries.  However some build targets
are now using cc_prebuilt_binary for installing python host scripts.
This causes dump_syms to return an error, causing the build to fail.
So check instead if the file is an ELF binary before running dump_syms.

Bug: 65065674
Test: Built AT target successfully.
Merged-In: Ibe7d3ebd312376600cf21efa111489451a4e7578
Change-Id: Ibe7d3ebd312376600cf21efa111489451a4e7578
(cherry picked from commit ee848655db)
2017-08-31 15:57:44 -07:00
Bo Hu
35149ca0b7 Merge changes from topic "aosp-emulator-oc"
* changes:
  emulator: fix widevine drm vndbinder denial
  emulator: fix selinux issues
  emulator: squash misc modifications from oc-emu-dev
  emualtor: keep libopenjdkjvmti*.so on sdk images
  emulator: move rild.libpath to vendor
  sdk:enable emulator to launch in build environment
  build-emulator: fully treblize emulator image
  Build vendor image for emulator
2017-08-31 22:56:31 +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
91ffbf2fbe Merge "Revert "Add Turbine as part of java build toolchain in Make."" 2017-08-31 20:32:46 +00:00
Jeff Gaston
2c0442238b Merge "Implement LOCAL_TARGET_REQUIRED_MODULES" 2017-08-31 20:14:01 +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
0b23748128 Merge "Add Turbine as part of java build toolchain in Make." 2017-08-31 18:01:43 +00:00
Andreas Gampe
4ed21d10e8 Build: Change SANITIZE_LITE install settings
Under SANITIZE_LITE, the default app_process is not instrumented.
Embedding sanitized libraries into APKs will lead to crashing apps.
So move second-stage APKs to /data/asan.

The tradeoff is that for now we won't run these sanitized binaries.
Adding support for that is future work.

Also do not do a rebuild of the boot image. This would invalidate
the first-stage results. Note that this is technically dangerous,
as stack overflow guard sizes will not be adapted for ASAN runs.
However, this is a general incompatibility.

Also do not rebuild system_other. Apps are not rebuilt, so it will
create an empty image.

(cherry picked from commit 481660ef34)

Bug: 36458146
Test: m && m SANITIZE_TARGET=address SANITIZE_LITE=true
Merged-In: I3898bc53cad264529f126e6bf0af9c6ca1736877
Change-Id: I3898bc53cad264529f126e6bf0af9c6ca1736877
2017-08-31 08:56:18 -07:00
Treehugger Robot
6803a3444a Merge "Copy adbd from system/bin to recovery/root/sbin" 2017-08-31 06:22:16 +00:00
Treehugger Robot
b9710fb602 Merge "master is now P" 2017-08-31 01:14:38 +00:00
bohu
7b5e1abacb emulator: squash misc modifications from oc-emu-dev
Change-Id: I7380292cd4dc851a987683bdf61d511dbf74aff6
Merged-In: I7380292cd4dc851a987683bdf61d511dbf74aff6
2017-08-30 17:13:47 -07:00
bohu
b7e2fabe38 emualtor: keep libopenjdkjvmti*.so on sdk images
BUG: 38353037

Those libopenjdkjvmti*.so files are needed by profilers.
Those files are shipped on real devices as well.

Change-Id: Iac7dd2844b0f3ea5194dec8732fbaacf53c4bf4a
Merged-In: Iac7dd2844b0f3ea5194dec8732fbaacf53c4bf4a
2017-08-30 17:13:42 -07:00
Yahan Zhou
3cf7441dbe Build vendor image for emulator
BUG: 37511975

Test: lunch sdk_gphone_x86-user, make with dist option, unzip
sdk_gphone_x86-emulator-eng.xxxx.zip to system image folder, emulator
can boot

Change-Id: I75b9f0de17fece3dec5ae1662400808af321bd4d
Merged-In: I75b9f0de17fece3dec5ae1662400808af321bd4d
2017-08-30 17:13:20 -07: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