Commit Graph

5633 Commits

Author SHA1 Message Date
Treehugger Robot
e558319465 Merge changes I9e38ac73,I9412147f am: 45da465ef6 am: 0a93afc2b9 am: 331599f461 am: 76df6461c5 am: 0d3522cece
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1887532

Change-Id: Ia74c51187284aad60b8e700c488a60a0083f4cfc
2021-11-11 07:35:58 +00:00
Treehugger Robot
45da465ef6 Merge changes I9e38ac73,I9412147f
* changes:
  Honor PreventInstall for APKs and dexpreopt files
  Add dependency from hostdex installed module to Make intermediates
2021-11-11 06:10:26 +00:00
Treehugger Robot
8ebb5e9b3a Merge "Dump deps for native and java to json files." am: 008d17612a am: 17550eb4a0 am: 1dde18a42c am: 4c9cb33365 am: 43d724ab16
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1878094

Change-Id: Ice7462a409b063f4b8e991c00f2233ed27b72796
2021-11-11 05:57:56 +00:00
Treehugger Robot
008d17612a Merge "Dump deps for native and java to json files." 2021-11-11 04:48:16 +00:00
Colin Cross
fa9bfcd0d2 Honor PreventInstall for APKs and dexpreopt files
Native coverage builds create a second variant of APKs and set
PreventInstall on the non-coverage variant.  Skip calling
ctx.InstallFile for APKs and in dexpreopt when PreventInstall
is set.

Fixes: 205865567
Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS="*" NATIVE_COVERAGE_EXCLUDE_PATHS="art bionic/libc device external/compiler-rt external/clang external/llvm external/swiftshader/third_party/llvm-10.0"
Change-Id: I9e38ac737315db12475e8f9bfb3e0e7c0327fc06
2021-11-10 16:42:38 -08:00
Colin Cross
3108ce17b0 Add dependency from hostdex installed module to Make intermediates
The art tests rely on a dependency existing from
out/host/linux-x86/framework/core-oj-hostdex.jar to
out/host/common/obj/JAVA_LIBRARIES/core-oj-hostdex_intermediates/classes.jar,
override LOCAL_SOONG_INSTALLED_MODULE for the hostdex modules so that
soong_java_prebuilt.mk adds the dependency.

Test: art/tools/buildbot-build.sh --host && art/tools/run-libcore-tests.sh '--mode=host' '--variant=X64' --debug
Change-Id: I9412147fc66d5e5f0dae52d522868a37251f781e
2021-11-10 14:38:50 -08:00
Treehugger Robot
00d0079ecf Merge changes from topic "soong-java-install" am: 8a709b149b am: 03a3ea3885 am: 932eda33a7 am: 3a075ff1a4 am: f9fa105279
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1881031

Change-Id: I7b1a81fc24b48ef5daeec7fcd6b9d42814655013
2021-11-10 18:10:42 +00:00
Colin Cross
89ade48766 Move java module installation into Soong am: 24cc4be60b am: e2d3d87fcd am: 865a62d8ca am: 29c7bdd685 am: 74282ccf4b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1880650

Change-Id: I2dc9d7245f6659953509e2e032a0d5b38ccec938
2021-11-10 18:10:40 +00:00
Colin Cross
da9b639573 Fix ctx.InstallFile calls for java modules am: 1d0eb7a9d0 am: c871fe905e am: 406461d954 am: 0978bcd3c1 am: 57c4a25fe3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1880649

Change-Id: Icd21a62944d48b02d573f109deb0333ffb63da77
2021-11-10 18:10:39 +00:00
Colin Cross
9ed82bce40 Make HostJavaToolPath use pathForInstall am: ae5330a2d9 am: a8bd977845 am: e8aadabe21 am: d1d1dea4da am: abe20bc2eb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1880648

Change-Id: I8cebde4dfb6bb6a0714eec2ec1e3ddc492771893
2021-11-10 18:10:37 +00:00
Colin Cross
e2d3d87fcd Move java module installation into Soong am: 24cc4be60b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1880650

Change-Id: I9dfb4e0d5fd387258e5cf4cd9a7b73b4181fba69
2021-11-10 17:28:53 +00:00
Colin Cross
c871fe905e Fix ctx.InstallFile calls for java modules am: 1d0eb7a9d0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1880649

Change-Id: I4c74ca35e116674a46cd382a9d856092a76a0e6c
2021-11-10 17:28:52 +00:00
Colin Cross
a8bd977845 Make HostJavaToolPath use pathForInstall am: ae5330a2d9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1880648

Change-Id: I0e35100226020451befb3993cf3b3c44b34af010
2021-11-10 17:28:49 +00:00
Treehugger Robot
8a709b149b Merge changes from topic "soong-java-install"
* changes:
  Revert "Temporarily add method to get java binary tool"
  Move java module installation into Soong
  Fix ctx.InstallFile calls for java modules
  Make HostJavaToolPath use pathForInstall
2021-11-10 17:05:51 +00:00
Jooyung Han
e266b958eb Merge "Pass --min_sdk_version to aidl compiler" am: a5b538394c am: 29b2f3e48a am: 75a0719cbf am: 120e23ef81 am: 6ce4a8ef78
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1883408

Change-Id: I4714c2feffe69f40b886bedf5a92866ff5e1ef4f
2021-11-10 02:09:07 +00:00
Jooyung Han
a5b538394c Merge "Pass --min_sdk_version to aidl compiler" 2021-11-10 00:31:54 +00:00
Jooyung Han
07f70c0e92 Pass --min_sdk_version to aidl compiler
cc/java modules can have .aidl files as srcs. Pass min_sdk_version to
the aidl compiler so that it can check some features against it.

For example, ParcelableHolder AIDL type is available since 31.

Bug: 205338951
Test: soong test && m
Change-Id: I7ecab913e00c9b6a3ce870dacbe9773d2ddb7e93
2021-11-06 07:31:50 +09:00
Colin Cross
c899d7808e Revert "Temporarily add method to get java binary tool"
Java binaries and cc binaries are in the same directory again, the
separate method can be removed.

Bug: 204136549
Test: m checkbuild
Change-Id: I2e7ca82448aba5c7e54d3c3c376fe14a953ef4af
2021-11-05 14:26:53 -07:00
Colin Cross
24cc4be60b Move java module installation into Soong
Move java module installation rules into Soong by overriding
InstallBypassMake.  Update the locations that find host java tools
to look in the Make installation directory instead of the Soong
installation directory, which will no longer be used.

Bug: 204136549
Test: m checkbuild
Change-Id: I5af6d764c97e7ddb5ee121fc9830166c25d831b1
2021-11-05 14:24:51 -07:00
Colin Cross
1d0eb7a9d0 Fix ctx.InstallFile calls for java modules
Call ctx.InstallFile on the primary install file last so that the
primary install file can depend on the extra install files, and so that
the primary install file can be inferred from the last installed file.

Add missing ctx.InstallFile calls for the dexpreopt and hostdex outputs.

Fix the install subdirectory for modules installing to the testcases
directory.

Bug: 204136549
Test: m checkbuild
Change-Id: I7edd7647be27439d3ca0ecc589ca5e89d4ba8474
2021-11-05 14:20:28 -07:00
Colin Cross
ae5330a2d9 Make HostJavaToolPath use pathForInstall
Use pathForInstall instead of PathForOutput for HostJavaToolPath
so that it internally produces an InstallPath that can later support
being converted to Make installpath.

Bug: 204136549
Test: m checkbuild
Change-Id: If4f5d3552b27ffe6b9bc709c4a08d9513c49ef7d
2021-11-05 14:20:28 -07:00
Colin Cross
c9eb1d2624 Temporarily add method to get java binary tool am: 3e3eda6eb6 am: de02e95b6b am: 3f21b44020 am: 2f07606ce3 am: 3d559dfa76
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1881030

Change-Id: I9e5f2eb4fba8cdb748db993825726c8f72e54ad9
2021-11-05 18:35:52 +00:00
Colin Cross
de02e95b6b Temporarily add method to get java binary tool am: 3e3eda6eb6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1881030

Change-Id: I37f7d2d8033001951e05ab3f13b86b5cad901892
2021-11-05 17:34:43 +00:00
Colin Cross
fc06a59904 Merge changes from topic "soong-cc-install"
* changes:
  Move cc module installation into Soong
  Temporarily add method to get java binary tool
2021-11-05 17:14:59 +00:00
Rupert Shuttleworth
05e10924a8 Merge "Add ability to set --rotation-min-sdk-version for signapk via Android.bp files." 2021-11-05 15:09:17 +00:00
Jim Tang
c44ba2a6f9 Dump deps for native and java to json files.
Abandon the use of SOONG_COLLECT_CC_DEPS and SOONG_COLLECT_JAVA_DEPS,
soong can generate module_bp_cc_deps.json and module_bp_java_deps.json
without passing any variables.

BUG: 204397180

Test: rm out/soong/module_bp*json
"m nothing" should see both json files were generated.

Change-Id: If30ad5dbabb6709f834134cbc9a513a9bdc9d9de
2021-11-05 12:06:15 +08:00
Trevor Radcliffe
f1199a627b Merge "Reformat SDK Library docs" am: 6e9a38ee2a am: 42ec26f2cb am: ec250ba728 am: c9d1de6b28 am: 4c31ebf4fa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1881268

Change-Id: I1116e23267b5753d6e38c88ddbbc14ee6bf73fe9
2021-11-04 19:58:38 +00:00
Trevor Radcliffe
6e9a38ee2a Merge "Reformat SDK Library docs" 2021-11-04 18:41:19 +00:00
Anton Hansson
07d668cfd2 Merge "Make PrebuiltStubsSources support srcjar properly" am: c24f0855d9 am: d88eb89740 am: ddcc6bfcc9 am: 649e4e7cac am: 3a69d19881
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1879682

Change-Id: I7125d5394993ebe4fe0a57666c6e5f2ec1f75c9b
2021-11-04 18:11:51 +00:00
Colin Cross
3e3eda6eb6 Temporarily add method to get java binary tool
cc binaries are moving from out/soong/host/linux-x86/bin to
out/host/linux-86/bin first, to be followed by java binaries.
Temporarily add a method that gets the java binary path while
it is different from the cc binary path.

Bug: 204136549
Test: m checkbuild
Change-Id: I04a7e741436da6be68078f23d074870413a5bb5e
2021-11-04 10:28:58 -07:00
Anton Hansson
c24f0855d9 Merge "Make PrebuiltStubsSources support srcjar properly" 2021-11-04 16:27:26 +00:00
Trevor Radcliffe
df8aa1fbcf Reformat SDK Library docs
We're not sure what formatting is applied to this but it sure
isn't markdown.

Fixes: 204572072
Test: Build and compare docs
Change-Id: Ib023f0cb490a7c7c5605d426ce5e70a7130d5162
2021-11-04 14:39:06 +00:00
Treehugger Robot
6f15d34c58 Merge "Dedup logic for selecting system modules" am: 9f76be59f1 am: 13b567905a am: 43b4dda231 am: 3474100b45 am: 58aa38196b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1880030

Change-Id: I06992575bcde80f5fdcdd418fd811a7c20305fd8
2021-11-04 12:59:55 +00:00
Paul Duffin
5de9a78365 Merge "Rename core-current-stubs-system-modules to be more consistent" am: 9de51af72c am: 9cf5708c2c am: e7087fd0b4 am: f975b088aa am: e050f310c7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1880029

Change-Id: I6eb0529d4f3f05cb502e64545357d0b497fa8246
2021-11-03 20:16:53 +00:00
Paul Duffin
e5ad90c37b Dedup logic for selecting system modules
Previously, the selection of system modules was duplicated, once for
source and once for prebuilts. This change dedups that by switching the
source code to use the same mechanism as the prebuilts which will ensure
consistent behavior in future.

Bug: 204189791
Test: m	nothing
Change-Id: Ia1729017ae332181c95f7b205dab87fb47d43fb8
2021-11-03 18:44:45 +00:00
Paul Duffin
3538bde75b Merge "Use module-lib system modules when building from prebuilts" am: 8380ee66a5 am: f7b8ad3546 am: 9bde48822f am: d3a64c082c am: 101809dbec
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1877320

Change-Id: I09dba9507e98a9207a2cc8b57687d293eecf0cca
2021-11-03 17:05:59 +00:00
Paul Duffin
10fb76f467 Rename core-current-stubs-system-modules to be more consistent
Renames to core-public-stubs-system-modules so that it is of the format
core-<sdk-kind>-stubs-system-modules.

Bug: 204189791
Test: m nothing
Change-Id: Iac565c940c2ef92be9cc64c0c6b8102a26afe0dd
2021-11-03 16:58:29 +00:00
Anton Hansson
86758ac94c Make PrebuiltStubsSources support srcjar properly
Initially prebuilt stub sources only supported directories as input, but
support has been added for packaging them up in srcjar as well. However
the build action was not updated accordingly.

Add support to determine if our input is a srcjar, and if so just use
it directly.

Bug: 204978699
Test: m sdk (with prebuilts)
Change-Id: I302cd34ebd55414d35c4f936cd563a4af89b22c6
2021-11-03 15:59:30 +00:00
Paul Duffin
8380ee66a5 Merge "Use module-lib system modules when building from prebuilts" 2021-11-03 15:32:42 +00:00
Rupert Shuttleworth
8eab869bfe Add ability to set --rotation-min-sdk-version for signapk via Android.bp files.
(vs via Android.mk files, done earlier in http://ag/16094391)

Bug: 197787352

Test: Added unit tests.

Change-Id: I3ccd2f2134b069fb4c4a90fe384c23c1814c2ba2
2021-11-03 10:46:15 -04:00
TreeHugger Robot
46679cdbf3 Merge "Allow skipping android.car-module library in PRODUCT_APEX_BOOT_JARS" 2021-11-02 17:33:20 +00:00
Mohammad Islam
71db0633af Merge "Add exemption for test_framework-apexd and test_service-apexd jars" am: 569f032a9e am: 509ceec200 am: 3890a127dd am: bd4d70075a am: 52977449a0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1853102

Change-Id: Ia115e020ef5cabfcc5ca52ebb6d9ca5f935bd67f
2021-11-02 10:50:35 +00:00
Mohammad Islam
569f032a9e Merge "Add exemption for test_framework-apexd and test_service-apexd jars" 2021-11-02 08:51:01 +00:00
Colin Cross
9afbd8af53 Merge "Export Soong install rules to Make" am: 1caea35278 am: 7f5f69f9ba am: 5e5d6332b4 am: 71aa08677d am: 90c6322388
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1869552

Change-Id: Ice7d471e98038ab1268933dfd8fbf19ee96b2c3d
2021-11-01 23:04:01 +00:00
Colin Cross
1caea35278 Merge "Export Soong install rules to Make" 2021-11-01 21:31:56 +00:00
Treehugger Robot
7161156726 Merge "Create prebuilt system modules for all API scopes" am: 2bbd2c55c5 am: ef70b722db am: 2c812cb270 am: 9daf45125d am: ac37da7bae
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1875855

Change-Id: I44c97fccd8b530ec3e1531ab58360f9b6f30074e
2021-11-01 20:41:00 +00:00
Treehugger Robot
f2259d112e Merge changes I346ac9c0,I57352aa0 am: 57be76d9ac am: 061abc7259 am: 49753eca77 am: 086a0913aa am: 9b378e1739
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1875854

Change-Id: I6e1cfe6f293ccc20f8b612e9996ca2b802289b57
2021-11-01 19:50:17 +00:00
Paul Duffin
460cbb7180 Dist API specific core-for-system-modules am: bce9f08d02 am: 381f698843 am: 9474d1a187 am: 245849abe6 am: 37ee2b187c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1873693

Change-Id: I3dce5ae019b72961b4a63fccac631d3461d20ed1
2021-11-01 17:34:19 +00:00
Paul Duffin
004547facd Use module-lib system modules when building from prebuilts
When building from source the build uses the java system modules for
the public or module APIs as needed. However, previously when building
from prebuilts it would always use the public API. That difference lead
to build failures when building from prebuilts.

This change makes the selection of java system modules when building
from prebuilts consistent with the selection when building from
sources.

As API levels 30 and 31 (which are the only previous releases to
provide system modules) did not provide separate java system modules
for the module-lib API those levels always use the public APIs.

Bug: 204189791
Test: - before applying these change
      m TARGET_BUILD_APPS=framework-connectivity
      - build fails with compilation error due to missing module APIs
      m sdk dist
      cp out/dist/system-modules/module-lib/core-for-system-modules.jar prebuilts/sdk/current/module-lib/core-for-system-modules.jar
      - apply these changes
      m TARGET_BUILD_APPS=framework-connectivity
      - build passes as expected
Change-Id: Id113ff014e7892b1009fbcaad89b1ae23a7c3b79
2021-11-01 16:40:28 +00:00
Paul Duffin
b077bcc6bc Create prebuilt system modules for all API scopes
Previously, system modules were only created for the public API scope.
This change creates them for any API scope as long as its directory has
a core-for-system-modules.jar.

It does that by hooking into the existing logic for creating a
java_import for all jars in the API directories and creating a
java_system_modules for every core-for-system-modules.jar file. That
avoids the need for extra path globs.

Test: m droid
      m sdk_public_current_system_modules
      - works as expected.
      m sdk_module-lib_current_system_modules
      - fails with missing target as expected.
      touch prebuilts/sdk/current/module-lib/core-for-system-modules.jar
      m sdk_module-lib_current_system_modules
      - fails with invalid jar file as expected.
Bug: 204189791
Change-Id: I27a264941009e03439d5d847dab14a7b4f6f119f
2021-11-01 16:37:49 +00:00