Commit graph

25148 commits

Author SHA1 Message Date
Christopher Parsons
03f233c372 Merge "Mixed bazel/soong build prototype for genrule" am: c8f84809ad
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1441107

Change-Id: Id68d377e339684f9a16d5c73c0f3d4c641f64299
2020-10-09 14:42:54 +00:00
Christopher Parsons
c8f84809ad Merge "Mixed bazel/soong build prototype for genrule" 2020-10-09 14:27:04 +00:00
Thiébaud Weksteen
6f8494caf8 Merge "rust: refactor tests setup" am: 43977e8d0e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1454815

Change-Id: Ida3b2650bf02d10a739f5ce0fd510716a84ba146
2020-10-09 12:26:39 +00:00
Thiébaud Weksteen
43977e8d0e Merge "rust: refactor tests setup" 2020-10-09 12:13:15 +00:00
Joe Onorato
fc8ab60603 Refactor OWNERS files in platform/build/soong. am: a80b480eea
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1455169

Change-Id: I7b794896884a4f11e5203817b814223ec09e69d8
2020-10-09 04:45:30 +00:00
Chris Parsons
f3c96efea4 Mixed bazel/soong build prototype for genrule
With this change, bazel_module is a specifiable property on
genrule module definitions. With bazel-enabled mode, soong_build will
defer to Bazel for information on these modules.

source build/soong/bazelenv.sh to enter bazel-enabled mode.

Test: Manually verified on bionic/libc genrules using aosp_cf_x86_phone-userdebug
Change-Id: I3619848186d50be7273a5eba31c79989b981d408
2020-10-08 22:46:23 -04:00
Joe Onorato
a80b480eea Refactor OWNERS files in platform/build/soong.
Pulls out all of the per-file rules into their relevant directories
so platform/build/soong:/OWNERS can be included everywhere we need
the list of build system owners.

Test: treehugger
Bug: 170407947
Change-Id: I5a4b2d252bd9b3c280cd9954cf0e65ac21153ede
2020-10-08 16:14:32 -07:00
Thiébaud Weksteen
0a75e52460 rust: refactor tests setup
Move to a builder pattern to increase flexibility when generating the
test configuration. The testRust, testRustCov and testRustError are kept
as main entry points for standard tests. Add documentation.

Test: m nothing
Change-Id: I891bec982ff2d65413f150d2395edf0fb0d68a43
2020-10-08 15:51:10 +02:00
Treehugger Robot
df0998def7 Merge "Add android.system.keystore2-unstable-ndk_platform to vndk.go" am: 36e4ad1f4d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1443716

Change-Id: I4fb7b21c17c17f3810dc29739b748719b07bca08
2020-10-07 21:14:34 +00:00
Colin Cross
e81d9e0142 Merge "Make lots of tests run in parallel" am: 45fd6ace7e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1439471

Change-Id: I96efe7e57e1c446082b488d0b026d0f17eadb229
2020-10-07 21:13:34 +00:00
Treehugger Robot
36e4ad1f4d Merge "Add android.system.keystore2-unstable-ndk_platform to vndk.go" 2020-10-07 20:45:52 +00:00
Colin Cross
45fd6ace7e Merge "Make lots of tests run in parallel" 2020-10-07 20:40:38 +00:00
Colin Cross
21bb1d491c Merge "Remove global state from apex modules" am: 43159bd1b7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1428815

Change-Id: I9ddb389c6a107e7431ba761c58b0ab99048fbc11
2020-10-07 19:05:15 +00:00
Colin Cross
43159bd1b7 Merge "Remove global state from apex modules" 2020-10-07 17:58:00 +00:00
Paul Duffin
d8c90a7e8d Merge "Allow access to the class jar for java_import using {.jar} tag" am: a87ea4587d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1450820

Change-Id: I32200cbb541524bd73ba6695ace4b21162914529
2020-10-07 17:30:59 +00:00
Paul Duffin
a87ea4587d Merge "Allow access to the class jar for java_import using {.jar} tag" 2020-10-07 17:16:43 +00:00
Tom Cherry
320a70915c Merge "Reland: "Include system/core/liblog/include instead of using symlinks"" am: a5e9be9476
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1451057

Change-Id: Id25b73231d03002301bd34e6e9127b26bf442404
2020-10-07 15:38:09 +00:00
Tom Cherry
a5e9be9476 Merge "Reland: "Include system/core/liblog/include instead of using symlinks"" 2020-10-07 15:11:10 +00:00
Anton Hansson
c9e7c18c40 Merge "Add outputfiles tags for droidstubs api txts" am: 70bc545407
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1446800

Change-Id: Ib526b1cb47f0900900cb028011c864eb77e192c4
2020-10-07 10:00:19 +00:00
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
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