Commit graph

20653 commits

Author SHA1 Message Date
Liz Kammer
8ffde8c9d5 Merge "Add data_native_bins property to java_test_host" 2020-07-28 16:15:56 +00:00
Treehugger Robot
75117fcdd0 Merge "Rename CFI blocklist files." 2020-07-28 15:59:47 +00:00
Yo Chiang
060dc0bea2 Merge "Use BaseModuleName() + SubName as apexFile.moduleName" 2020-07-28 11:27:52 +00:00
Colin Cross
96d4f4550a Merge changes from topic "revert-1366377-prebuilt_build_tool_make-RMDAHCHNNX"
* changes:
  Revert "Add prebuilt_build_tool to allow genrules to use prebuil..."
  Revert "Switch cc's use of bison and flex to prebuilt_build_tool"
  Revert "Fix builds with absolute OUT_DIR"
2020-07-28 01:52:25 +00:00
Kiyoung Kim
1b478e57a0 Merge "Deprecate VNDK-Lite" 2020-07-28 00:36:11 +00:00
Pirama Arumuga Nainar
eb8d403273 Rename CFI blocklist files.
Update language to comply with Android’s inclusive language guidance

See https://source.android.com/setup/contribute/respectful-code for
reference

Bug: 161896447
Test: build
Change-Id: I3de274e58135660e102c276a9822a2ef2cd7cba8
2020-07-27 18:37:48 +00:00
Liz Kammer
dd849a81f3 Add data_native_bins property to java_test_host
When multiple os/arch variants are supported, java_test_host could not
find a matching arch due to java having arch:common, whereas native
binaries support a specific architecture. This change adds the property
`data_native_bins` in order to support binaries with the appropriate
os/arch variants.

Test: m FirmwareDtboVerification with data_native_bins
Test: forrest
Bug: 153848038
Change-Id: I45adebff0fde2811d5ef5620c697b97b768c951f
2020-07-27 09:14:06 -07:00
David Su
bec7f53e4f Revert "Add prebuilt_build_tool to allow genrules to use prebuil..."
Revert submission 1366377-prebuilt_build_tool_make

Reason for revert: breaks build
Reverted Changes:
I20bf062bb:Export prebuilt tools to Make
I4bb526492:Move some prebuilt build tool configs to Soong
I195b68813:Support per-module MakeVars
Ibcb257e7b:Fix dependency loop with flex
I6150f0f39:Switch cc's use of bison and flex to prebuilt_buil...
I6939451b8:Reland "Use genrules to build a consistent awk."
Idee60640f:Add prebuilt_build_tool modules for genrule use
I00893172b:Rename bison to bison_bin
I82c26be1c:Add prebuilt_build_tool to allow genrules to use p...

Change-Id: I6b3acf306d355f3e0463564c9ebe9482fa0f609e
2020-07-24 21:25:13 +00:00
David Su
dd18efd95d Revert "Switch cc's use of bison and flex to prebuilt_build_tool"
Revert submission 1366377-prebuilt_build_tool_make

Reason for revert: breaks build
Reverted Changes:
I20bf062bb:Export prebuilt tools to Make
I4bb526492:Move some prebuilt build tool configs to Soong
I195b68813:Support per-module MakeVars
Ibcb257e7b:Fix dependency loop with flex
I6150f0f39:Switch cc's use of bison and flex to prebuilt_buil...
I6939451b8:Reland "Use genrules to build a consistent awk."
Idee60640f:Add prebuilt_build_tool modules for genrule use
I00893172b:Rename bison to bison_bin
I82c26be1c:Add prebuilt_build_tool to allow genrules to use p...

Change-Id: I1ca553ffe4b09250a441b9bc477c3ba98c6f6549
2020-07-24 21:25:00 +00:00
Colin Cross
fae4d517fc Revert "Fix builds with absolute OUT_DIR"
This reverts commit b1d1e0e6bd.

Reason for revert: b/162063775

Change-Id: Ifcdba9d918d2bd0b5ab7ab02ccdc727a844a5556
2020-07-24 20:47:24 +00:00
Ivan Lozano
41b4d79dab Merge "Add a rust_bindgen_host module type." 2020-07-24 18:53:13 +00:00
Ivan Lozano
264771ce53 Merge "Enforce correct variant usage for rust_bindgen." 2020-07-24 18:41:32 +00:00
Yo Chiang
e812805e75 Use BaseModuleName() + SubName as apexFile.moduleName
This change fixes this error:
```
TARGET module com.android.adbd.flattened requires non-existent TARGET
module: prebuilt_libclang_rt.ubsan_standalone-arm-android
```

apexFile.moduleName is used as Make dependency name, so it should use
m.BaseModuleName() instead of m.Name(), because soong may prepend
"prebuilt_" to or mutate the output of m.Name() in other ways.

android/androidmk.go emits Android.mk modules with
`LOCAL_MODULE := module.BaseModuleName() + <SubName>`, so replace
apexFile.moduleName with BaseModuleName() + <SubName> as much as
possible.

Bug: 7456955
Test: Add unit test in apex/apex_test.go
Test: lunch blueline_hwasan && SANITIZE_TARGET='hwaddress fuzzer' m nothing
Test: Verify out/soong/Android-blueline_hwasan.mk
Change-Id: If8537fc1bedbe6c3405de3662a5df210a073c43f
2020-07-24 20:05:20 +08:00
Treehugger Robot
13aa44fc15 Merge "Build transitive lint reports for apex modules" 2020-07-24 11:50:39 +00:00
Treehugger Robot
e8bc288702 Merge "apexDepsMutator uses WalkDeps" 2020-07-24 09:25:57 +00:00
Dan Willemsen
e59bf5118d Merge "Fix builds with absolute OUT_DIR" 2020-07-24 08:56:18 +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
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 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
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
0ec8c508a4 Merge "Add SettingsRoboTests to the allow-list for legacy core/platform API." 2020-07-23 13:33:46 +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
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
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
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
188f2ee1ee Merge "Use RelativeInstallPath for DataPaths in apex" 2020-07-22 05:55:01 +00:00
Treehugger Robot
d2946c3ea3 Merge "Provide generated sources to clippy." 2020-07-22 01:30:49 +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
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
Christopher Parsons
fef9d4b601 Merge "Install data_libs using relative_install_path property" 2020-07-21 17:26:57 +00:00
Jingwen Chen
8481186d56 Fix dist(s)-with-tag and add tests to prevent regression.
While AndroidMkEntries' DistFiles were populated from java_library
properly, there was a bug in the conditionals that dropped the tagged
DistFiles.

Fixes b/152834186
Fixes b/161339864

Test: soong tests, m sdk dist (creates out/dist/test.jar with
aosp/1363578)

Signed-off-by: Jingwen Chen <jingwen@google.com>
Change-Id: Id895282256fd367b2f46dcb7a643465fa66c9456
2020-07-21 12:30:39 +00:00
Treehugger Robot
0bcda81dd5 Merge "Generate module lib API and scope together" 2020-07-21 04:21:07 +00:00