Commit graph

21074 commits

Author SHA1 Message Date
Jooyung Han
b96c02671f Merge "Fix __ANDROID_SDK_VERSION__=0" am: 3992b7c486
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1371677

Change-Id: I9a429cb42d398c6dadc5b33a86964b00e9cf1a01
2020-07-24 02:17:12 +00:00
Jooyung Han
3992b7c486 Merge "Fix __ANDROID_SDK_VERSION__=0" 2020-07-24 02:07:03 +00:00
Dan Willemsen
b1d1e0e6bd Fix builds with absolute OUT_DIR
Test: OUT_DIR=$PWD/out m
Change-Id: I23887110a6ee1228162f9e1a9fc89a97f45ac781
2020-07-23 17:39:12 -07:00
Dan Willemsen
1ab5fe458a Merge "Revert "Support per-module MakeVars"" am: 1a4ab20c1a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1371260

Change-Id: If4706691a86cab45b3c56ddfd5a634ae026ae075
2020-07-23 21:51:24 +00:00
Dan Willemsen
1a4ab20c1a Merge "Revert "Support per-module MakeVars"" 2020-07-23 21:43:04 +00:00
Dan Willemsen
613564eed4 Revert "Support per-module MakeVars"
This reverts commit 2019658b86.

Reason for revert: broke builds where makefiles were using M4 without depending upon it

Change-Id: I18304246e7a8a8f8c2620dd2c65ed77acd256be2
2020-07-23 21:37:35 +00:00
Dan Stoza
e05c751f38 Merge "Add SettingsRoboTests to the allow-list for legacy core/platform API." into stage-aosp-master 2020-07-23 21:36:28 +00:00
Dan Willemsen
bef2696b56 Merge changes from topics "prebuilt_build_tool", "prebuilt_build_tool_make" am: 4ec839a251
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1366377

Change-Id: I1f23af148543b76031cac9f090adac14f330fe24
2020-07-23 21:25:16 +00:00
Dan Willemsen
d97bee1578 Switch cc's use of bison and flex to prebuilt_build_tool am: d2e291ae5c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1366376

Change-Id: I8f28910f1578f3e315ea82c804cdefec6a59d971
2020-07-23 21:25:14 +00:00
Dan Willemsen
402706f2d2 Add prebuilt_build_tool to allow genrules to use prebuilt tools am: 13af8140bc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1364950

Change-Id: Ia88bd5acfbe4afbbb31ceb3c681e1e24de558ec0
2020-07-23 21:25:11 +00:00
Dan Willemsen
4ec839a251 Merge changes from topics "prebuilt_build_tool", "prebuilt_build_tool_make"
* changes:
  Support per-module MakeVars
  Switch cc's use of bison and flex to prebuilt_build_tool
  Add prebuilt_build_tool to allow genrules to use prebuilt tools
2020-07-23 21:10:04 +00:00
Pete Gillin
d5c16eb731 Add SettingsRoboTests to the allow-list for legacy core/platform API.
Bug: 161967461
Test: m SettingsRoboTests
Change-Id: If4e58fba5f74dd06457497c1d131bc1f273f6f5b
2020-07-23 20:47:11 +00:00
satayev
967ccf6e16 Merge "Revert "Track allowed transitive deps in any updatable module."" am: 71c96d1e1d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1371941

Change-Id: I0a21f5a0e868ba2f3b1a7fcb668a594b25e59317
2020-07-23 15:42:29 +00:00
satayev
71c96d1e1d Merge "Revert "Track allowed transitive deps in any updatable module."" 2020-07-23 15:20:18 +00:00
satayev
53bbc085e4 Revert "Track allowed transitive deps in any updatable module."
Revert submission 1312796-apex-allowed-deps

Reason for revert: b/161974327
Reverted Changes:
I52a4be72e:Add a check for apex/allowed_deps.txt to droidcore...
I56771ba3f:Track allowed transitive deps in any updatable mod...

Change-Id: I3be0a1b0dd824dafeadb485daca8e58b81a3ec5c
2020-07-23 15:15:54 +00:00
Treehugger Robot
8a1463cf7f [automerger skipped] Merge "Add SettingsRoboTests to the allow-list for legacy core/platform API." am: 0ec8c508a4 -s ours
am skip reason: Change-Id I15e5a6c2f07e73718803501d705de0d7ab9bec90 with SHA-1 84c3807b99 is in history

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1371938

Change-Id: Ib51122ab4be2fe7f54234bad23ff9c205a1a4007
2020-07-23 13:43:25 +00:00
Treehugger Robot
0ec8c508a4 Merge "Add SettingsRoboTests to the allow-list for legacy core/platform API." 2020-07-23 13:33:46 +00:00
Ivan Lozano
d2d95e3eed Merge "Call rustfmt on rust_bindgen bindings." am: f90e64a34f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1371038

Change-Id: I8b0b0e4685f703acb4563670db3cf124f10b7293
2020-07-23 12:55:55 +00:00
satayev
dbbff877a4 Merge "Track allowed transitive deps in any updatable module." am: a71cf86853
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1312796

Change-Id: I63dfbad1b0a1f75a6bb24e81ab22581fdef96e9d
2020-07-23 12:55:49 +00:00
Ivan Lozano
f90e64a34f Merge "Call rustfmt on rust_bindgen bindings." 2020-07-23 12:41:58 +00:00
satayev
a71cf86853 Merge "Track allowed transitive deps in any updatable module." 2020-07-23 12:41:11 +00:00
Pete Gillin
9f4893d86f Add SettingsRoboTests to the allow-list for legacy core/platform API.
Bug: 161967461
Test: m SettingsRoboTests
Merged-In: I15e5a6c2f07e73718803501d705de0d7ab9bec90
Change-Id: If4e58fba5f74dd06457497c1d131bc1f273f6f5b
2020-07-23 12:34:07 +01:00
Pete Gillin
25b4503936 Merge "Enforce the legacy core/platform API restriction." am: 4ab239ec57
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1367399

Change-Id: I46c7e8d79e7ab5c46b1a8a5db972dbfab40b7a62
2020-07-23 10:52:11 +00:00
Pete Gillin
4ab239ec57 Merge "Enforce the legacy core/platform API restriction." 2020-07-23 10:40:37 +00:00
Pete Gillin
84c3807b99 Enforce the legacy core/platform API restriction.
This change silently decides whether modules which depend on either
sdkPrivate or sdkCorePlatform get the legacy or the stable version of
the core/platform API, based on whether the module's name is on a
hard-coded list or not.

Test: m java
Test: make a target from the list when its entry is commented out, which correctly fails
Bug: 157640067
Change-Id: I15e5a6c2f07e73718803501d705de0d7ab9bec90
Merged-In: I15e5a6c2f07e73718803501d705de0d7ab9bec90
Merged-In: Iaa97ddaa015e8079fcb3426585c5101c7ec9e22a
(cherry picked from commit c0f4373106)
2020-07-23 09:06:52 +01:00
Paul Duffin
be01df3105 Improve IDE navigation to SdkBase methods am: 50f0da4205
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1371416

Change-Id: Ic800fe28ef1cf1df2beeb22ea5f4767877c79627
2020-07-23 06:30:06 +00:00
Jooyung Han
de34d2375f Fix __ANDROID_SDK_VERSION__=0
__ANDROID_SDK_VERSION__ for a cc module means API level of which the
module should work with.

For APEX variants, it should be apex.min_sdk_version and tracked by the
variable cc.Module.apexSdkVersion.

The variable was set in the wrong place and used uninitialized
sometimes, which results __ANDROID_SDK_VERSION__=0.

Bug: n/a
Test: m
Test: checked build.ninja manually
      => no __ANDROID_SDK_VERSION__=0
Change-Id: Iba532b2c62773983414a061f5291a73363322487
2020-07-23 05:01:56 +00:00
Jooyung Han
698dd9f007 apexDepsMutator uses WalkDeps
apexDepsMutator marks all dependencies of apex modules. Previously, it
was converted from WalkDeps() to Top-down mutator to avoid the pitfall
of WalkDeps() bug. (It did't handle multiple visits via different
paths.)

Because WalkDeps() problem solved in aosp/1277516, apexDepsMutator can
be reverted to use WalkDeps().

Even though there's no observable difference between them, I revert this
for the up-coming change, which requires different pruning strategies
per apexes.

Bug: 159195575
Test: m
Change-Id: Ib09cbc7a3dfd143dd37b660b1aea6c71392ce2e3
2020-07-23 13:54:50 +09:00
Colin Cross
08dca38eb0 Build transitive lint reports for apex modules
Build and export transitive lint report zips for apex modules.

Bug: 153485543
Test: m TARGET_BUILD_APPS=com.google.android.wifi lint-check dist
Change-Id: I5a1805440452301a7e2c4ca91482b989638b54fb
2020-07-22 20:16:14 -07:00
Paul Duffin
50f0da4205 Improve IDE navigation to SdkBase methods
Previously, it was not possible to navigate directly from the interface
methods in SdkAware to the implementations in SdkBase as the former
embeds android.Module but the latter did not implement those methods
and so did not implement SdkAware. Finding the implementation of those
methods required explicitly searching for them.

This change extracts sdkAwareWithoutModule interface to allow use of
the IDE capability to navigate directly to implementations of an
interface method.

Test: m nothing
Change-Id: I0cd25180ea0081a54681b58e3202ff9491563131
2020-07-22 23:36:11 +01:00
Ivan Lozano
ec54eec571 Call rustfmt on rust_bindgen bindings.
This makes debugging easier when the bindings contain errors.

Bug: 161730753
Test: Generated bindings are formatted.
Change-Id: Ic46f69d8b6d07b4dc6912b7f02d7427ea6c11cde
2020-07-22 16:51:33 -04:00
Ivan Lozano
f6fe9956bf Add a rust_bindgen_host module type.
Bug: 161826371
Test: Local rust_bindgen_host only provides host variants.
Change-Id: I8cc7819a193a6eefe40402e4b6a82f436c5de78a
2020-07-22 20:34:52 +00:00
Ivan Lozano
07cbaf4d89 Enforce correct variant usage for rust_bindgen.
Modules defined in the srcs property are automatically added as
dependencies with AddDependency(), which will use any variant available.
This can cause incorrect architecture bindings to be silently pulled in,
such as when a host module uses a rust_bindgen module that doesn't
create a host variant.

This moves populating depPaths.SrcDeps over to depsToPaths and adds a
check for SourceProviders to make sure the correct OS and architecture
is being used.

Bug: 161826371
Test: Soong no longer silently pulls in bindings for the wrong
      target.
Test: New Soong test to catch this case passes.
Change-Id: I2b3651cf6fc7dabf4081434df1c455e637f5b3a4
2020-07-22 20:34:22 +00:00
Ivan Lozano
80cba226ef Merge "Add source collision test, rust_bindgen doc." am: 9429c612ff
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1370276

Change-Id: I61a08e57bedf3480f0c7d21c073b43a23a5471a8
2020-07-22 17:54:20 +00:00
Christopher Parsons
a8106ebbfb Merge "Create 'cc_prebuilt_test_library_shared' module type" am: 6b3d9c3fe8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1341895

Change-Id: Ic0c9e94723a26096a028c7730bd8d0da3ab1b433
2020-07-22 17:53:50 +00:00
Ivan Lozano
9429c612ff Merge "Add source collision test, rust_bindgen doc." 2020-07-22 17:44:03 +00:00
Christopher Parsons
6b3d9c3fe8 Merge "Create 'cc_prebuilt_test_library_shared' module type" 2020-07-22 17:35:34 +00:00
Chris Parsons
1f6d90f4c7 Create 'cc_prebuilt_test_library_shared' module type
This new module type allows cc_test modules to depend on prebuilt
shared libraries and have them included as data dependencies alongside
the test binary.

Test: Manually verified to facilitate mk-to-bp migration of
bionic-unit-test prebuilt dependencies (aosp/1339035)

Change-Id: Idbac0854f1f9e2e01bbfa63591de458b61733e17
2020-07-22 16:06:37 +00:00
Ivan Lozano
10735d90d6 Add source collision test, rust_bindgen doc.
Bug: 159064919
Test: Soong tests pass (and fail if error is modified).
Change-Id: Id4f76e53e11e46ae495f9613a2699c598e7daea4
2020-07-22 09:18:13 -04:00
Treehugger Robot
4ae015807b Merge "Use RelativeInstallPath for DataPaths in apex" am: 188f2ee1ee
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1368876

Change-Id: I5fa0621017a28af0034605ff164dd7aa70c82311
2020-07-22 06:09:36 +00:00
Treehugger Robot
188f2ee1ee Merge "Use RelativeInstallPath for DataPaths in apex" 2020-07-22 05:55:01 +00:00
Treehugger Robot
b07baa734e Merge "Provide generated sources to clippy." am: d2946c3ea3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1368597

Change-Id: I14bf9b53327d6d05658874e746f43b0dc5907237
2020-07-22 01:44:15 +00:00
Treehugger Robot
d2946c3ea3 Merge "Provide generated sources to clippy." 2020-07-22 01:30:49 +00:00
Yi Kong
a7fcd17a0f Merge changes I90df9c04,I70bb8dc2 am: f9a78248b0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1368617

Change-Id: I14839f94dc8611a9e956183987e77ca4aedd4214
2020-07-22 01:06:12 +00:00
Yi Kong
f9a78248b0 Merge changes I90df9c04,I70bb8dc2
* changes:
  [pgo] Allow profile gather and use flags to coexist for sampling PGO
  [pgo] Sampling PGO does not require benchmark property
2020-07-22 00:46:42 +00:00
Liz Kammer
0a51aa2c98 Use RelativeInstallPath for DataPaths in apex
The RelativeInstallPath is currently unused for apexes; however, as it
stands, relative install paths would be handled differently for
flattened and unflattened apexes.

Test: go java test
Test m nothing

Change-Id: Iad9350642cad27c4f745cea6e5fc9e11e7b06ee4
2020-07-21 13:29:37 -07:00
Ivan Lozano
bae62bee7d Provide generated sources to clippy.
clippy was not being provided generated sources previously, so it would
error out on being unable to locate the sources.

Test: Clippy no longer errors out on generated sources.
Bug: 161748694
Change-Id: I85907327ca40c82a9520e0c0dbd643bfba6b7315
2020-07-21 14:24:35 -04:00
Yi Kong
a575ff38a8 [pgo] Allow profile gather and use flags to coexist for sampling PGO
Bug: 79161490
Test: presubmit
Change-Id: I90df9c04dbe2a423c06e9a966fe9bcaed0a84a65
2020-07-22 02:01:49 +08:00
Christopher Parsons
4a016f49a9 Merge "Install data_libs using relative_install_path property" am: fef9d4b601
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1359742

Change-Id: I3eb5e74c4011d732ab9b7c0b08a3593187166d25
2020-07-21 17:45:39 +00:00
Yi Kong
84803c50a6 [pgo] Sampling PGO does not require benchmark property
Test: build with Sampling PGO
Bug: 79161490
Change-Id: I70bb8dc2e4492d6a3713ca16fcb3f1216615f8ac
2020-07-22 01:36:20 +08:00