Commit graph

21074 commits

Author SHA1 Message Date
Jingwen Chen
a9af2cefaf Merge "Create a AOSP Bazel overlay workspace with Soong" am: 2106bf8458
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1359245

Change-Id: I167ee06ac23afebcf38676b490d6ce75773b2639
2020-08-07 00:10:07 +00:00
Jingwen Chen
2106bf8458 Merge "Create a AOSP Bazel overlay workspace with Soong" 2020-08-06 23:56:54 +00:00
Matthew Maurer
86fdf15721 Merge "[rust] Escape flags for bindgen" am: 217a1e406e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1388348

Change-Id: I70a49bf440a2286c7c562538069eda56252993dd
2020-08-06 21:44:50 +00:00
Mitch Phillips
0ae16213d9 Merge "Added write only sanitizer for ASAN and HWASAN" am: 8dc2af873b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1372178

Change-Id: I23e8b419658f01af16337a4ba2674a9422dacad4
2020-08-06 21:44:29 +00:00
Matthew Maurer
217a1e406e Merge "[rust] Escape flags for bindgen" 2020-08-06 21:33:49 +00:00
Mitch Phillips
8dc2af873b Merge "Added write only sanitizer for ASAN and HWASAN" 2020-08-06 21:17:12 +00:00
Steven Moreland
34fabfeffa Merge "allow empty phony modules" am: bd60c83271
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1390950

Change-Id: Id575e4e89f2dee5d727dc99d7beb9b4ecc5b2c67
2020-08-06 17:40:47 +00:00
Steven Moreland
bd60c83271 Merge "allow empty phony modules" 2020-08-06 17:22:11 +00:00
Ulyana Trafimovich
434e708101 Merge "Add structured representation for colon-separated jar lists." am: 910eb70891
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1354005

Change-Id: I46ca0273cda33ca194400744fc19583d21118ffc
2020-08-06 15:24:29 +00:00
Ulyana Trafimovich
910eb70891 Merge "Add structured representation for colon-separated jar lists." 2020-08-06 15:07:27 +00:00
Nicolas Geoffray
484464e4ba Merge "Add platform-mainline-test-exports in list of modules to build." am: 1f109cd376
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1391356

Change-Id: Ie30b12b1d3ea5e9e67f716c75e67c65d402cd525
2020-08-06 14:02:15 +00:00
Nicolas Geoffray
1f109cd376 Merge "Add platform-mainline-test-exports in list of modules to build." 2020-08-06 13:49:25 +00:00
Thiébaud Weksteen
2cb2bf7134 Revert "rust: validate existence of library source" am: c810510898
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1393037

Change-Id: I50fc8f00dcbd528e80dc9551364250b1620d371a
2020-08-06 12:53:33 +00:00
Thiébaud Weksteen
4e62bf5357 Revert "rust: handle modules with same crate_name" am: 246e69c586
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1393036

Change-Id: Ieb7b7048d7f619e35d9d8a152754a7374c8fa288
2020-08-06 12:53:30 +00:00
Thiébaud Weksteen
c810510898 Revert "rust: validate existence of library source"
Revert submission 1391076

Reason for revert: Broken downstream Darwin build (b/162975597)
Reverted Changes:
I275f04639:rust: handle modules with same crate_name
Ie736d7ebb:rust: validate existence of library source

Change-Id: I1732d50a08546864f17cd826c8af574c1064c670
2020-08-06 12:28:08 +00:00
Thiébaud Weksteen
246e69c586 Revert "rust: handle modules with same crate_name"
Revert submission 1391076

Reason for revert: Broken downstream Darwin build (b/162975597)
Reverted Changes:
I275f04639:rust: handle modules with same crate_name
Ie736d7ebb:rust: validate existence of library source

Change-Id: I995923153c11db26b4af985f2eabe94912fb04d3
2020-08-06 12:27:56 +00:00
Jingwen Chen
5ba7e479d1 Create a AOSP Bazel overlay workspace with Soong
The Bazel overlay is a directory at out/soong/bazel_overlay that
replicates the layout of the AOSP Soong module tree, but as a Bazel
workspace. Each Soong module variant is represented as a BUILD target
created with the `soong_module` rule.

To create this overlay, run `m bazel_overlay`.

A `soong_module` target can depend on other `soong_module` targets.
These dependencies replicate each module's `directDeps` in the Blueprint
graph, just before `PrepareBuildActions`.

This enables users to use bazel query as a way to introspect the Soong
module graph. For example,

- Direct reverse dependencies of //bionic/libc:generated_android_ids in
//bionic/libc/...:

$ bazel query 'rdeps(//bionic/libc/...,
//bionic/libc:generated_android_ids, 1)'
//bionic/libc:libc_bionic_ndk--android_recovery_arm_armv7-a-neon_static
//bionic/libc:libc_bionic_ndk--android_ramdisk_arm_armv7-a-neon_static
//bionic/libc:libc_bionic_ndk--android_arm_armv7-a-neon_static_com.android.runtime
//bionic/libc:libc_bionic_ndk--android_arm_armv7-a-neon_static
//bionic/libc:generated_android_ids

- Why does com.android.runtime depend on lzma?

$ bazel query
'somepath(//bionic/apex:com.android.runtime--android_common_com.android.runtime_image,
//external/lzma/...)'
//bionic/apex:com.android.runtime--android_common_com.android.runtime_image
//bionic/libc/malloc_debug:libc_malloc_debug--android_arm_armv7-a-neon_shared_com.android.runtime
//system/core/libunwindstack:libunwindstack--android_arm_armv7-a-neon_shared_com.android.runtime
//external/lzma/C:liblzma--android_arm_armv7-a-neon_shared_com.android.runtime

- What does the dep graph of //bionic/libc:crtbegin_so look like?

$ bazel query
'deps(//bionic/libc:crtbegin_so--android_arm_armv7-a-neon)'
--output=graph > graph.in && dot -Tpng < graph.in > graph.png

https://photos.app.goo.gl/DfsdoFRNsRjGwTmy8

Test:  croot && m bazel_overlay && cd out/soong/bazel_overlay && bazel
query //... && bazel query 'rdeps(//bionic/libc/...,
//bionic/libc:generated_android_ids, 1)'

Signed-off-by: Jingwen Chen <jingwen@google.com>
Change-Id: I3bf40309bfb2d963bb8a688706385a57ee304c37#
2020-08-06 10:24:21 +00:00
Treehugger Robot
d044e8452f Merge changes from topic "soong_sanitize_fix" am: 8c69770ff0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1385288

Change-Id: Ib9bacd5827c479fc9bc2e01d081ab6c4ddab4634
2020-08-06 01:08:08 +00:00
Inseob Kim
9803127f58 Move image mutator things to image.go am: e498dd9ac3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1387116

Change-Id: I634265c598700fc1f7c6c91bf59669bbd5444625
2020-08-06 01:08:06 +00:00
Treehugger Robot
8c69770ff0 Merge changes from topic "soong_sanitize_fix"
* changes:
  Separate lists of soong sanitize modules
  Move image mutator things to image.go
2020-08-06 00:48:16 +00:00
Colin Cross
f6c453a3fd Merge "Add libraryDependencyTag to track dependencies on static and shared libraries" am: 2eddd06879
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1378332

Change-Id: I9277e0586e43230bc7af5366f3883f5c8d3d31e7
2020-08-06 00:16:56 +00:00
Colin Cross
2eddd06879 Merge "Add libraryDependencyTag to track dependencies on static and shared libraries" 2020-08-06 00:06:28 +00:00
Elliott Hughes
37e860e37f Merge "Switch to toybox patch(1)." am: 325d73f260
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/870109

Change-Id: I9dcb3f2a2e7c879acddb2958034faaa62f2b0bdc
2020-08-05 23:33:09 +00:00
Treehugger Robot
0c5157f2e6 Merge "[cc/coverage] Pass directory to -fprofile-instr-generate" am: cf187bcbbc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1391163

Change-Id: I976ca4ae19e517616a481dc936dd33b637bcfa85
2020-08-05 23:32:33 +00:00
Elliott Hughes
325d73f260 Merge "Switch to toybox patch(1)." 2020-08-05 23:30:14 +00:00
Treehugger Robot
cf187bcbbc Merge "[cc/coverage] Pass directory to -fprofile-instr-generate" 2020-08-05 23:10:00 +00:00
Matthew Maurer
b32f2b3412 Merge "Make Rust test harness optional for test binaries" am: 53bba5de8a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1295711

Change-Id: I097ee109f599c8386e0c72459155b352192edd13
2020-08-05 21:44:28 +00:00
Matthew Maurer
53bba5de8a Merge "Make Rust test harness optional for test binaries" 2020-08-05 21:26:45 +00:00
Ivan Lozano
89d57368b9 Merge "Make source_stem required for Rust SourceProviders" am: d13b308960
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1390938

Change-Id: Ib5f8f63e06743dfd95ca2d2360e81e5eeed921e5
2020-08-05 19:48:14 +00:00
Ivan Lozano
d13b308960 Merge "Make source_stem required for Rust SourceProviders" 2020-08-05 19:38:19 +00:00
Steven Moreland
9cd45782e5 allow empty phony modules
In order to allow reservation of names in the build system.

Bug: 162275959
Test: build only
Change-Id: I8f1622bdbebe794dafd5c341d861da5468cd52bd
2020-08-05 19:31:54 +00:00
Ivan Lozano
66b577a9de Merge "Add support for custom bindgen binaries." am: 80668b07d2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1391296

Change-Id: I3d58c5be64084895f967b2688a20729a6c6a98b7
2020-08-05 19:12:14 +00:00
Liz Kammer
a4278eba24 Merge "Add property api_levels_jar_filename to droidstubs" am: 9c55b0efa2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1388544

Change-Id: I4da722343ed53baedf40ad7661fc1f017051a70d
2020-08-05 19:12:02 +00:00
Ivan Lozano
80668b07d2 Merge "Add support for custom bindgen binaries." 2020-08-05 19:08:20 +00:00
Liz Kammer
9c55b0efa2 Merge "Add property api_levels_jar_filename to droidstubs" 2020-08-05 19:05:13 +00:00
Thiébaud Weksteen
285318aa0f Merge changes I275f0463,Ie736d7eb am: 6090575f63
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1391076

Change-Id: I9310ba5e7945f7f2a34f7aebe1ba98b35b699723
2020-08-05 19:02:42 +00:00
Thiébaud Weksteen
6090575f63 Merge changes I275f0463,Ie736d7eb
* changes:
  rust: handle modules with same crate_name
  rust: validate existence of library source
2020-08-05 18:50:06 +00:00
Bill Peckham
25bd47b9fa Merge "Adds 'kernel/' to vendor proprietary dirs." am: 6ed589039c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1387788

Change-Id: I5ef08b2230ed2dbc78f3dde62bd3cca8705789e9
2020-08-05 18:30:07 +00:00
Bill Peckham
6ed589039c Merge "Adds 'kernel/' to vendor proprietary dirs." 2020-08-05 18:14:52 +00:00
Ivan Lozano
ff3a5b31c0 Make source_stem required for Rust SourceProviders
This removes ambiguity for developers with the 'stem' property.

Bug: 159064919
Test: New Soong test; error is produced if this property is undefined.
Change-Id: I790fbcfa6cd7dbf6df63b5cf5c22983426ec072e
2020-08-05 13:31:34 -04:00
Pirama Arumuga Nainar
f45e152e15 [cc/coverage] Pass directory to -fprofile-instr-generate
Bug: http://b/157081822

This will be used if LLVM_PROFILE_FILE is not set at runtime.  Some
bionic tests are run without LLVM_PROFILE_FILE set and if they are run
from '/', they fail unable to write to '/default.profraw'.  This may
affect other tests as well.  Setting this to the value defined by
init.rc.

Test: Enable coverage for bionic, ensure relevant bionic-unit-tests
pass.

Change-Id: If1d0e16ce003149fb21d5472d10699ef6582e065
2020-08-05 10:23:07 -07:00
Liz Kammer
46971c5469 Merge "Refactor java compileDex" am: 9eb51fc9d4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1360617

Change-Id: Id45425bf971c94012e1e744248becf199dac783c
2020-08-05 15:54:55 +00:00
Liz Kammer
9eb51fc9d4 Merge "Refactor java compileDex" 2020-08-05 15:41:03 +00:00
Martin Stjernholm
41bca360c6 Merge "Disable all host OS variants except those explicitly included." am: 42e6dabe81
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1360541

Change-Id: Ic5ff339c9b384d865c95914ae930bd90e7331274
2020-08-05 15:06:47 +00:00
Nicolas Geoffray
b0df23f201 Add platform-mainline-test-exports in list of modules to build.
Needed for ART testing.

Bug: 142935992
Test: build-mainline-modules.sh

Change-Id: I842feff85f88ecc2c7db1e84e803d9e8149923af
2020-08-05 15:56:21 +01:00
Ivan Lozano
c564d2d5a4 Add support for custom bindgen binaries.
In some cases customized logic is required to generate the expected
bindgen bindings. This adds support for rust_bindgen modules to define a
HostTool module to use instead of bindgen.

Bug: 161816141
Test: New Soong tests pass.
Test: Local test case shows custom_binary module being used for bindgen
      generation.

Change-Id: Id52aec4f25c38206d7e585d8e662be7836aa1d4b
2020-08-05 10:51:43 -04:00
Martin Stjernholm
42e6dabe81 Merge "Disable all host OS variants except those explicitly included." 2020-08-05 14:50:48 +00:00
Thiébaud Weksteen
ad8ac53581 rust: handle modules with same crate_name
crate_name do not need to be unique. A library may depend on two
different versions of the same crate. Use the module name instead of the
crate name when indexing the modules for rust-project.json.

Test: SOONG_GEN_RUST_PROJECT=1 m nothing
Bug: 162896400
Change-Id: I275f04639ef05f2b649c30168046e13b2efcacb9
2020-08-05 16:34:38 +02:00
Ivan Lozano
d6d5a03a63 Merge "[rust] Disable clippy for rust_bindgen modules." am: b14e141519
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1389096

Change-Id: Ic1279970dfe39950be298888e82817ee34f024f3
2020-08-05 13:06:54 +00:00
Andrei-Valentin Onea
6214fa7603 Merge "Rename hiddenapi manual lists" am: fe58347aef
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1382571

Change-Id: I2f3164eb4e8fe20f4989702316b65d85ccb8c261
2020-08-05 13:06:28 +00:00