Commit Graph

38157 Commits

Author SHA1 Message Date
Colin Cross 9b2e4c6950 Simplify the *-lib-* functions
Simplify the java-lib-* type functions, three layers of abstraction
is a bit much for a single line function, and isn't reducing enough
duplication to be worth the complexity.

Add app-lib-* functions and use them.

Test: m -j checkbuild
Change-Id: Ia47ebc95e4af2073396233416f14fdee7d856844
2017-09-26 16:23:00 -07:00
Treehugger Robot e58881ac38 Merge changes from topic "bootclasspath_default_libs"
* changes:
  Remove duplication of bootclasspath in LOCAL_JAVA_LIBRARIES
  Add dependencies on bootclasspath libraries
  Reindent bootclasspath code
2017-09-26 01:12:30 +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
Dan Willemsen 557eae2175 Merge "Fix mips emulator boot" 2017-09-25 22:18:52 +00:00
Colin Cross f6bc1a1ac0 Reindent bootclasspath code
Apply indentation to the bootclasspath selection code.

Test: m -j checkbuild
Change-Id: I5ca15636d34d43f9ebe7264d566d06d8c045b0e3
2017-09-23 19:48:27 -07:00
Treehugger Robot b463cdc874 Merge "Correctly set the linker search path for libm and libc." 2017-09-23 00:34:21 +00:00
Colin Cross cb1e04a11f Merge "Revert "Revert "Support <dir>:<file> for LOCAL_JAVA_RESOURCE_FILES""" 2017-09-22 22:36:43 +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 1dcffadbc7 Merge "Remove ijar" 2017-09-22 21:23:13 +00:00
Colin Cross 34a9885f34 Revert "Revert "Support <dir>:<file> for LOCAL_JAVA_RESOURCE_FILES""
This reverts commit 15a2fa21a8.

This reapplies I83f3d45bdd156200308dc7ed0e0fea5d895d37a6 without
the error on absolute paths if they are in $(OUT_DIR).

Test: OUT_DIR=/tmp/out mmma -j art/tools/ahat
Change-Id: Ia0b156d21ba4b95eb3004d61f6fae2f4341fd39c
2017-09-22 13:45:23 -07:00
Colin Cross 7d607a1917 Merge "Revert "Support <dir>:<file> for LOCAL_JAVA_RESOURCE_FILES"" 2017-09-22 20:37:14 +00:00
Colin Cross 15a2fa21a8 Revert "Support <dir>:<file> for LOCAL_JAVA_RESOURCE_FILES"
This reverts commit 4a93294fc1.

Broke builds with absolute OUT_DIR.

Test: revert
2017-09-22 13:33:52 -07:00
Colin Cross b6fc0a1cae Merge "Support <dir>:<file> for LOCAL_JAVA_RESOURCE_FILES" 2017-09-22 17:55:35 +00:00
Richard Uhler 58e0b8c0a3 Merge "Proguard implicitly generates a proguard_dictionary" 2017-09-22 08:23:52 +00:00
Treehugger Robot c9501f7d60 Merge "Re-org the merge_zips logiic under Turbine rule." 2017-09-22 05:54:58 +00:00
Colin Cross 4a93294fc1 Support <dir>:<file> for LOCAL_JAVA_RESOURCE_FILES
Support the same syntax as LOCAL_TEST_DATA for
LOCAL_JAVA_RESOURCE_FILES to allow placing files at a subdirectory
in the jar file by replacing the / before the first path element
to be included with a :.

Test: m -j checkbuild
Test: out/build-${TARGET_PRODUCT}.ninja is the same
Change-Id: I83f3d45bdd156200308dc7ed0e0fea5d895d37a6
2017-09-21 20:45:55 -07:00
Nan Zhang fda45fdbe1 Re-org the merge_zips logiic under Turbine rule.
Mac java build has flaky error for merge_zips. The error happend is
because both turbine.jar.premerged and static_java_libs are missing.

We allow one of them can be missing, but we don't allow both of them are
missing. So re-org the merge_zips logic to see if the input of Turbine is
empty or it is due to Turbine internal.

Bug: b/66441248
Test: m clean && m -j32
Change-Id: I3c4b15004fd67fef2b83eabc36841bc8c8ff6e4c
2017-09-21 16:51:18 -07:00
Dan Willemsen 6f2284e4fe Remove ijar
It's no longer used.

Test: cs/
Change-Id: Ib24094e494d4caa390f83df28c179b6012691ebc
2017-09-21 16:08:51 -07: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
Treehugger Robot bedc2110b7 Merge "Add missing copy back to soong_java_prebuilt.mk" 2017-09-21 05:10:52 +00:00
Treehugger Robot 3d6aaa2f56 Merge "Move private_manifest file insertion to jars merging phase." 2017-09-21 03:16:34 +00:00
Colin Cross dcd6b243ac Add missing copy back to soong_java_prebuilt.mk
javalib.jar needs to be copied to both $(intermediates.COMMON)
and $(intermediates).

Test: m -j checkbuild
Change-Id: Ic2944691dced35c1e74d12f9948904cf748fe402
2017-09-20 18:07:41 -07:00
Colin Cross d739bef96d Merge "Make soong_java_prebuilt.mk accept dex jars" 2017-09-20 22:54:16 +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
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
Jeff Gaston 70d8dbc125 Merge "Fix sdk-addon build on build servers" 2017-09-19 21:35:41 +00:00
Colin Cross aadc3be5ca Make soong_java_prebuilt.mk accept dex jars
Accept LOCAL_SOONG_DEX_JAR and copy it to javalib.jar.

Test: m -j checkbuild
Change-Id: I28f9e99fe19110cab188a9129b058db532aa273f
2017-09-19 13:02:17 -07:00
Colin Cross c165d9c9ba Merge "Revert "Upgrade to ManifestMerger2"" 2017-09-19 15:41:15 +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
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
Treehugger Robot 729a221a16 Merge "Move classes.jar generation right below JarJar phase." 2017-09-15 17:53:23 +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
Jeff Gaston 8bbbd87ef6 Merge "Fix sdk-addon for absolute OUT_DIR" 2017-09-14 01:51:02 +00: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
Tao Bao 8a7b0dee6b Merge "Consider prebuilt vendor.img as having vendor partition." 2017-09-13 22:10:43 +00:00
Steve Muckle b4a3124822 Merge "get kernel configs from kernel/configs" 2017-09-13 19:33:19 +00:00