Commit graph

25181 commits

Author SHA1 Message Date
Anton Hansson
70bc545407 Merge "Add outputfiles tags for droidstubs api txts" 2020-10-07 09:54:43 +00:00
Ulyana Trafimovich
2b45163773 Merge changes from topic "uses-libs-24" am: 9f701fa348
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1435492

Change-Id: Ie4d034c7dd3bed313dc51671b8cb489f2e3f2d57
2020-10-07 09:34:42 +00:00
Ulyana Trafimovich
9f701fa348 Merge changes from topic "uses-libs-24"
* changes:
  Fail the build if dexpreopt cannot find path to a <uses-library>.
  Add dependency on implementation <uses-library> for modules that depend on component libraries.
2020-10-07 09:18:02 +00:00
Martin Stjernholm
ff4181eba9 Merge "Avoid conflicting shared libraries from SDK snapshots." am: 3c72ce8696
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1450116

Change-Id: Ic7fe39789b97f284799fce0b737b1070d5da3375
2020-10-06 23:32:31 +00:00
Janis Danisevskis
e8f655ca46 Add android.system.keystore2-unstable-ndk_platform to vndk.go
Test: N/A
Bug: 160623310
Change-Id: Ic2e9897a1c103389b93a72df25c38fe96a8c7c09
2020-10-06 16:24:22 -07:00
Martin Stjernholm
3c72ce8696 Merge "Avoid conflicting shared libraries from SDK snapshots." 2020-10-06 22:55:34 +00:00
Colin Cross
323dc60712 Make lots of tests run in parallel
Putting t.Parallel() in each test makes them run in parallel.
Additional t.Parallel() could be added to each subtest, although
that requires making a local copy of the loop variable for
table driven tests.

Test: m checkbuild
Change-Id: I5d9869ead441093f4d7c5757f2447385333a95a4
2020-10-06 15:12:22 -07:00
Treehugger Robot
e0126b9038 Merge "Add allow rust rule for android.system.keystore2 vts tests." am: 614b06c8ce
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1443715

Change-Id: I91b15aea954edcc31b9a3c68c8732fa34307b63f
2020-10-06 21:49:40 +00:00
Treehugger Robot
614b06c8ce Merge "Add allow rust rule for android.system.keystore2 vts tests." 2020-10-06 21:03:42 +00:00
Colin Cross
56a8321c21 Remove global state from apex modules
A global variant was used to store the global mapping between
modules and APEXes.  Replace it with storing pointers to APEX
contents inside each module so that they can query the contents
of any APEXes they belong to.

Bug: 146393795
Test: all Soong tests
Test: single line change to build.ninja host install dependency ordering
Test: no Android-${TARGET_PRODUCT}.mk, make_vars-${TARGET_PRODUCT}.mk or late-${TARGET_PRODUCT}.mk
Change-Id: Id2d7b73ea27f8c3b41d30820bdd86b65c539bfa4
2020-10-06 13:39:57 -07:00
Treehugger Robot
3641d82f7e Merge "Avoid panic when a boot jar is provided as a java_import" am: a8baa88424
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1450816

Change-Id: Ibbb8129ed2d43342815c1e5d7b8ac2a9baf64a2d
2020-10-06 20:14:50 +00:00
Treehugger Robot
a8baa88424 Merge "Avoid panic when a boot jar is provided as a java_import" 2020-10-06 19:55:00 +00:00
Colin Cross
d7f1653e7b Merge changes I4c8cd544,I62d4d43d,I0ae667d4,Id357adc0,I1ff87134 am: ac0cd89283
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1445698

Change-Id: I3b3af12a19a2fa1a6f0496401b5051d3eb394a34
2020-10-06 18:28:30 +00:00
Tom Cherry
6ddbb00e24 Reland: "Include system/core/liblog/include instead of using symlinks"
It seems better to include this path directly rather than creating
symlinks in system/core that accomplish the same result.

Bug: 165825252
Test: treehugger
Change-Id: Ic78f09d86039540a2b0eead45e985b42c553f415
2020-10-06 10:45:28 -07:00
Colin Cross
ac0cd89283 Merge changes I4c8cd544,I62d4d43d,I0ae667d4,Id357adc0,I1ff87134
* changes:
  Don't create version variations of sdk modules
  Create fewer empty version variants
  Don't make SplitPerApiLevel imply UseSdk
  Remove vendor crt special case
  Fix apex_test.go and add it to Android.bp
2020-10-06 17:33:30 +00:00
Paul Duffin
aa55f74505 Allow access to the class jar for java_import using {.jar} tag
Layoutlib requires access to the jar file (containing .class) files for
a number of libraries including "core-libart". It does that using the
{.jar} output tag, e.g. "core-libart{.jar}".

This change makes sure that works when "core-libart" is provided as a
java_import instead of a java_library.

Bug: 142938164
Test: m nothing
Change-Id: I605019d680c28e4a33f0ca14279d63fa62b9774b
2020-10-06 17:48:37 +01:00
Paul Duffin
81febc4500 Avoid panic when a boot jar is provided as a java_import
Bug: 142938164
Test: m nothing
Change-Id: I607009825f5946d7e1daa31dc1e4bb8f2609206d
2020-10-06 16:54:02 +01:00
Ulya Trafimovich
a54d33be77 Fail the build if dexpreopt cannot find path to a <uses-library>.
This doesn't apply to compatibility libraries (those added to
conditional class loader context base on the targetSdkVersion in the
manifest), because Soong doesn't know if they are needed or not (the
build rule that parses the manifest runs at Ninja stage).

In the future we may need to relax this and instead of failing the build
to disable dexpreopt in such cases. But currently there are no use cases
that fail.

Also, this patch replaces hardcoded install path with a constant.

Test: lunch aosp_cf_x86_phone-userdebug && m
Bug: 132357300
Change-Id: Ic894bc17e8ffd8ff173111ea09366252001ef3e9
2020-10-06 14:04:49 +01:00
Ulya Trafimovich
39b437b25f Add dependency on implementation <uses-library> for modules that depend on component libraries.
If a dexpreopted Java module depends on a component library (such as
stubs), it must be dexpreopted against the implementation library,
because that is what it will use at run time. Therefore dexpreopt needs
to know about the implementation library.

One of the subtests of TestUsesLibraries is removed. This is because the
subtest was previosuly split in two variants with the only difference
that the first variant had dependency on a stubs library, and the second
one had dependency on the implementation. The latter caused dexpreopt to
be disabled because Soong couldn't find the implementation (it had only
the name, but no access to the module). Now that there is a dependency
on the implementation, the problem goes away and the two subtest
variants can be merged into one.

Add a method for getting the name of the implementation library for the
optional SDK library. Currently it is the same as the SDK library name,
but it may change in future.

Test: lunch aosp_cf_x86_phone-userdebug && m
Bug: 132357300
Change-Id: I584df4b6db874c7ae3c478231fc51572a46929b1
2020-10-06 14:04:49 +01:00
Anton Hansson
ecf5435590 Add outputfiles tags for droidstubs api txts
These can then easily be used in genrules to merge txt files.

Bug: 169034951
Test: m combined-dex-api
Change-Id: Id49739c90a2ab52a72094b76696a4e5211c8d742
2020-10-06 10:01:29 +01:00
Jooyung Han
605b7a6bde Merge "apex: emit file_contexts for flattened apex" am: 51ce6b0acc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1435292

Change-Id: I23fe348b58f5e60fd854c79c594b09a8fa66c6da
2020-10-06 03:43:55 +00:00
Martin Stjernholm
02460abb30 Avoid conflicting shared libraries from SDK snapshots.
Test: m nothing
Test: env SANITIZE_HOST=address \
  SANITIZE_TARGET='hwaddress fuzzer' \
  build/soong/soong_ui.bash --make-mode \
  TARGET_PRODUCT=blueline_hwasan haiku dist
Bug: 170041398
Change-Id: Ifa4f72d6778cbb10663a780c7eb54b5e21d5b571
2020-10-06 04:27:42 +01:00
Jooyung Han
51ce6b0acc Merge "apex: emit file_contexts for flattened apex" 2020-10-06 03:26:14 +00:00
Colin Cross
565cafdcb1 Don't create version variations of sdk modules
They are never used, skip creating them.

Test: m checkbuild
Change-Id: I4c8cd544327ae79b781f704be5a9064efdbdf2af
2020-10-05 18:57:26 -07:00
Colin Cross
3146c5cd67 Create fewer empty version variants
Don't create empty version variants for binaries, objects, rust
rlibs or rust dylibs.

Test: no change to build.ninja
Change-Id: I62d4d43da476eafdb258a08b5ada758bb2971a1a
2020-10-05 18:57:21 -07:00
Steven Moreland
3453948ad0 build/soong/scripts/update-apex-allowed-deps.sh
For bionic_libc_platform_headers(minSdkVersion:29).

Bug: 166675194
Test: build
Change-Id: I5c516265003ee2e0cec619ef7872e8a549354385
2020-10-06 00:52:00 +00:00
Tom Cherry
042238162e Merge "Revert "Include system/core/liblog/include instead of using symlinks"" am: 66fee25c5b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1449380

Change-Id: I6703303e549f04432f1c32720ec2411cc722dd8e
2020-10-05 19:54:26 +00:00
Tom Cherry
66fee25c5b Merge "Revert "Include system/core/liblog/include instead of using symlinks"" 2020-10-05 19:26:17 +00:00
Tom Cherry
271f4acd72 Revert "Include system/core/liblog/include instead of using symlinks"
Revert submission 1428983-no-log-header-symlinks

Reason for revert: Build breaks
Reverted Changes:
I248a2f045:Include system/core/liblog/include instead of usin...
Ic189e0f59:Remove logging symlinks from system/core/include

Change-Id: I9ee896f5fde36c879c182365295c1f5a5a39a76b
2020-10-05 19:24:12 +00:00
Tom Cherry
f6a4e63413 Merge "Include system/core/liblog/include instead of using symlinks" am: 24ee3605fa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1429369

Change-Id: I2d3a7994578d9766ac85231189046eec2759f59b
2020-10-05 17:35:57 +00:00
Tom Cherry
24ee3605fa Merge "Include system/core/liblog/include instead of using symlinks" 2020-10-05 15:26:51 +00:00
Paul Duffin
f78b75224f Merge "Add prebuilt_visibility property" am: cbda59333c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1441935

Change-Id: I6228adbeabd2cf7e1ce957964c269e40b553be2a
2020-10-05 12:13:00 +00:00
Paul Duffin
cbda59333c Merge "Add prebuilt_visibility property" 2020-10-05 11:41:55 +00:00
Treehugger Robot
e74f6092de Merge "Remove stale apex_available dependency." am: 0400ede359
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1435497

Change-Id: I9ab452e3dd054fa68dd64f829c829cf58af8f996
2020-10-04 23:26:28 +00:00
Treehugger Robot
0400ede359 Merge "Remove stale apex_available dependency." 2020-10-04 22:52:57 +00:00
Ivan Lozano
46df6b07e3 Merge "rust: Allow rust_bindgen to use cc_defaults." am: 4e7b26a434
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1439751

Change-Id: I161ce227d518125f5cd13607b4b5dcb669101b18
2020-10-03 00:35:24 +00:00
Ivan Lozano
4e7b26a434 Merge "rust: Allow rust_bindgen to use cc_defaults." 2020-10-03 00:22:49 +00:00
Ivan Lozano
9197667b21 Merge "rust: Add static binary support" am: e934c5ba7e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1446955

Change-Id: I5d9a7613f7231107828a8a6be28e9f6b3d0b1e5b
2020-10-02 22:31:26 +00:00
Ivan Lozano
e934c5ba7e Merge "rust: Add static binary support" 2020-10-02 21:48:00 +00:00
Colin Cross
1348ce3f13 Don't make SplitPerApiLevel imply UseSdk
UseSdk was returning true when SplitPerApiLevel returned true,
which was causing the platform variant of SplitPerApiLevel
module to compile against the SDK.  Check SplitPerApiLevel
separately in the sdkMutator instead.

Test: m checkbuild
Change-Id: I0ae667d48a3b7b96709a6cad8e8ea9701659fc2a
2020-10-02 13:00:19 -07:00
Colin Cross
b6135218a4 Remove vendor crt special case
It doesn't seem to be necessary, crt objects can get headers via
local_include_dirs.

Test: m checkbuild
Change-Id: Id357adc054c85576aa9935d0acbee5f1ae3dcbff
2020-10-02 13:00:19 -07:00
Colin Cross
9f720ce52a Fix apex_test.go and add it to Android.bp
apex_test.go wasn't listed in the Android.bp file, which allowed
it to bitrot.  Make the API level methods take a PathContext
so that they can be called from a test using configErrorWrapper.
Also fix an int that was converted to a string.

Test: apex_test.go
Change-Id: I1ff87134c837bd5d344d22550baabde10d1b0b2e
2020-10-02 13:00:14 -07:00
Pirama Arumuga Nainar
18fc11a093 Merge "Update to use clang-r399163b." am: 0b88bf33fc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1443739

Change-Id: Iadcdee65467e9e5ee4ccbb33beeac8ef52c605f4
2020-10-02 16:57:04 +00:00
Pirama Arumuga Nainar
0b88bf33fc Merge "Update to use clang-r399163b." 2020-10-02 16:37:52 +00:00
Ivan Lozano
bf63d00c54 rust: Add static binary support
Adds the "static_executable" property to rust_binary modules which
allows for building fully static executables. This only impacts bionic
targets.

Bug: 169434439
Test: rust_binary module with static_executable true builds, runs on
      device.

Change-Id: I83c19fddd070859b7e56d248237cfd73e1768519
2020-10-02 12:31:23 -04:00
Paul Duffin
55a2ad6c6b Merge "Explicitly specify visibility in sdk/module_exports snapshot" am: 958dd4f6ad
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1441934

Change-Id: I125abb0ba408a538d3b311ac2dc5b2ee5f49ca2a
2020-10-02 10:05:49 +00:00
Paul Duffin
157f40f056 Add prebuilt_visibility property
Some mainline modules provide an `sdk` and one or more set of
module_exports. When the snapshots are unpacked into separate prebuilts
directories (one per snapshot) then any dependencies from a member of
one snapshot to a member of another may require the latter to have
additional visibility rules.

Previously, these rules had to be added to each source module. This
change allows additional visibility rules to be specified on the
sdk/module_exports that are added to all the prebuilts in its snapshot.

Bug: 155921753
Bug: 168301990
Test: m nothing
Change-Id: Ia3eacb5749981f04770ae9872a8013e43c5c6ef1
2020-10-02 10:59:41 +01:00
Paul Duffin
958dd4f6ad Merge "Explicitly specify visibility in sdk/module_exports snapshot" 2020-10-02 09:45:22 +00:00
Colin Cross
0730dce1c0 Merge changes from topic "sanitizer-runtime-stubs" am: 973f46703b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1437232

Change-Id: I5807ce1617f2d78828c914fea8858d26a5883409
2020-10-02 01:22:03 +00:00
Artur Satayev
a0a4061836 Track allowed transitive deps in any updatable module. am: 4e1f2bd0d8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1437234

Change-Id: Ie8fb3d8d69d3cbf68b7652f3465a6f268498c8d8
2020-10-02 01:21:27 +00:00