Commit graph

27499 commits

Author SHA1 Message Date
Treehugger Robot
deea9b7659 Merge "Support building WITHOUT_CHECK_API=true" am: 527b2578ea
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1458439

Change-Id: I2ae68652c8ccc8ef62866ac3db12a38411464ac8
2020-10-14 12:27:51 +00:00
Treehugger Robot
527b2578ea Merge "Support building WITHOUT_CHECK_API=true" 2020-10-14 12:13:26 +00:00
Jingwen Chen
6874dbe104 Stop hardcoding sdk/module_exports dynamic prop types for Bazel overlay.
These sdk/sdk_snapshot/module_exports/module_exports_snapshot properties
are dynamically created using RegisterSdkMemberType [1] and eventually
createDynamicSdkMemberType [2]. All dynamically created sdk member types
are string list types.

Instead of hardcoding the mapping, retrieve them from the registry
instead.

[1]: https://cs.android.com/android/platform/superproject/+/master:build/soong/android/sdk.go;l=489-497;drc=master
[2]: https://cs.android.com/android/platform/superproject/+/master:build/soong/sdk/sdk.go;l=156;drc=master

Bug: 166563303
Bug: 170798271
Fixes: 170798271

Test: m bazel_overlay && cd out/soong/bazel_overlay && bazel cquery //...
Signed-off-by: Jingwen Chen <jingwen@google.com>
Change-Id: Ib77f4e0cc14a7b4ec344a2de115682c234927c16
2020-10-14 04:55:00 -04:00
Andrew Scull
7cfb22f518 Merge changes from topic "rust4virt" am: 251b517222
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1458259

Change-Id: I81df4c50f8f503e4625d1db1957ec66c80589879
2020-10-14 07:31:57 +00:00
Andrew Scull
0382c2cccf Allow packages/modules/Virtualization to use rust am: af2015d7d6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1455033

Change-Id: Icd6320a6aadfba6f084ffe08f81572a7a29988d9
2020-10-14 07:31:17 +00:00
Andrew Scull
251b517222 Merge changes from topic "rust4virt"
* changes:
  Update rustfmt preupload example reference
  Allow packages/modules/Virtualization to use rust
2020-10-14 07:15:02 +00:00
Treehugger Robot
52e3cbcfc4 Merge "Collect total number of CPU cores and available RAM for each build." am: 24600e394d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1459645

Change-Id: I935657f9f48b1ae24136eb85eb332093caf0427f
2020-10-14 03:58:56 +00:00
Treehugger Robot
de33278844 Merge "Install prebuilt_etc modules to out/soong" am: 544446ca33
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1440498

Change-Id: Idca635fd62303c1cb1b2f31e486bebe40e47c98d
2020-10-14 03:56:36 +00:00
Treehugger Robot
24600e394d Merge "Collect total number of CPU cores and available RAM for each build." 2020-10-14 03:52:53 +00:00
Treehugger Robot
544446ca33 Merge "Install prebuilt_etc modules to out/soong" 2020-10-14 03:04:51 +00:00
Colin Cross
14ca2fcf31 Merge changes Idc985c52,Ibbbde323,I51417cf6,I9886498d,I195d99c9 am: 6ddb81b0db
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1451109

Change-Id: I354aa7fd48ba6b269edf8ef2fc24c9811f567ab8
2020-10-14 00:44:38 +00:00
Colin Cross
6ddb81b0db Merge changes Idc985c52,Ibbbde323,I51417cf6,I9886498d,I195d99c9
* changes:
  Move LLNDK and NDK versionSelectorMutator special cases into versionedInterface
  use version mutator for CRT
  Use version mutator for NDK
  Reuse more of apex stubs implementation for llndk stubs
  Use libraryInterface instead of concrete type asserts for stubs
2020-10-14 00:20:05 +00:00
Patrice Arruda
3edfd48ef4 Collect total number of CPU cores and available RAM for each build.
Collect the total number of CPU cores and available RAM for each build
as part of the system resource info. This is to know what kind of
build machines that the developers are using.

Bug: b/169453825
Test: m nothing and ran printproto on soong_metrics to validate the
      data.
Change-Id: I8617bdb9490b37d7689abd27d349af1a651533db
2020-10-13 23:58:41 +00:00
Colin Cross
051ea998fb Merge "Start using Providers instead of direct module access" am: d4620701ad
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1439475

Change-Id: I27cacc976cd2136965df0aac6052c011ba32ef8d
2020-10-13 22:21:53 +00:00
Colin Cross
d4620701ad Merge "Start using Providers instead of direct module access" 2020-10-13 21:48:26 +00:00
Chris Parsons
a798d96076 find bazel-related files and add them to bazel.list and ninja deps
This retriggers soong_build whenever a new bzl, WORKSPACE, or
BUILD.bazel file is changed or added.

Test: Manually verified on bionic/libc genrules with manual changes to
related BUILD/bzl/WORKSPACE files -- these all retrigger builds.
Test: Updated finder_test.go

Change-Id: I634384f88781a6b6db32f5d6bf9c07e179e14c39
2020-10-13 16:18:59 -04:00
Treehugger Robot
e3d0a6f17e Merge "Collect the hostname of the machine as a metric." am: 585d7d4c2e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1457384

Change-Id: I95a9733c6aab8a343c7619e7d9e5cbaf6e01dab4
2020-10-13 18:10:22 +00:00
Evgenii Stepanov
2cd36f0b0a Merge "Support asan/hwasan versions of prebuilts." am: 00e07c9779
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1371811

Change-Id: Ib1ac643ba68d5f7b36b7ddb47579256442913ca8
2020-10-13 18:09:53 +00:00
Treehugger Robot
585d7d4c2e Merge "Collect the hostname of the machine as a metric." 2020-10-13 18:07:51 +00:00
Evgenii Stepanov
00e07c9779 Merge "Support asan/hwasan versions of prebuilts." 2020-10-13 17:51:58 +00:00
Steven Moreland
5ef24a21a2 Merge "Zero C++ heap by default." am: 88ed5d9353
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1379879

Change-Id: I05dad758bce9e8489a9c05ff267eaf529e1188e9
2020-10-13 17:11:08 +00:00
Steven Moreland
88ed5d9353 Merge "Zero C++ heap by default." 2020-10-13 16:49:16 +00:00
Paul Duffin
bc0fe96be3 Support building WITHOUT_CHECK_API=true
When WITHOUT_CHECK_API=true the check api process is not run which
means that the current.txt and removed.txt files are not generated by
the build. In that case this change causes the droidstubs module to
fallback to exporting the source files instead.

An additional removedApiFilePath property (to match apiFilePath) was
added to hold the exported path as removedApiFile has to be a
WritablePath and source paths are not writable.

Bug: 169034951
Test: m WITHOUT_CHECK_API=true nothing
      fails without this fix, passes with it.
Change-Id: If6b09dd67c8533368b71405143f524d66350703f
2020-10-13 15:37:10 +01:00
Andrew Scull
5a58bca1f4 Update rustfmt preupload example reference
The arguments passed to rustfmt have changed from those used in the
previously referenced CL so update the comment to reference a CL using
the new arguments.

Bug: 164111102
Test: None
Change-Id: I962d56ed36422709a1fcd07ca95f1c015daa6339
2020-10-13 13:52:37 +01:00
Andrew Scull
af2015d7d6 Allow packages/modules/Virtualization to use rust
Rust will be used for a few virtualization related components so allow
it to be used in the directory in which those components will reside.

Test: built a rust binary in the directory
Change-Id: I805d6117201c2144f7ecf21ec38b577c7c21e9c5
2020-10-13 11:43:52 +01:00
Anton Hansson
4fe970f303 Make test api extend system in sdk_library.go
The test stubs for the "main" android API are being changed to
incude @SystemApi annotated APIs. Update sdk_library to make modules
and optional libraries follow the same principle.

Bug: 129133308
Test: presubmit
Change-Id: I7bd940e1a8127d954d30c532c74d684a5ba9d33c
Merged-In: I7bd940e1a8127d954d30c532c74d684a5ba9d33c
(cherry picked from commit 13dbaac5b6)
2020-10-13 08:25:00 +01:00
Anton Hansson
4b59023120 Merge "Remove jdiff support from droiddoc" am: ff98103505
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1455335

Change-Id: I993974cb1da0e4f65c3c15488527fc569974fd61
2020-10-13 07:24:10 +00:00
Anton Hansson
ff98103505 Merge "Remove jdiff support from droiddoc" 2020-10-13 07:08:13 +00:00
Jiyong Park
f9f680595b Install prebuilt_etc modules to out/soong
prebuilt_etc* modules emit build rules to install their output to
out/soong. This is required for the cvd_host_package module to gather
installed files (not built files) of prebuilt_etc* modules.

Bug: 168086242
Test: m

Change-Id: I065640c7e6f188b0c19e70f081e82bdc30d7e752
2020-10-13 14:57:24 +09:00
Treehugger Robot
95069b99bf Merge "Expose android.filesToInstall" am: c8821b9451
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1440497

Change-Id: I5730091d52853e8d1cc871d5ce01b3ba0926dd96
2020-10-13 05:02:29 +00:00
Treehugger Robot
c8821b9451 Merge "Expose android.filesToInstall" 2020-10-13 04:52:36 +00:00
Treehugger Robot
a0e02f4b48 Merge "Add additional documentation in metrics proto regen.sh script." am: 0807abacf3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1455145

Change-Id: Ib124890fb89d09ec09b518189c1ea704b6963bd0
2020-10-13 04:40:50 +00:00
Treehugger Robot
0807abacf3 Merge "Add additional documentation in metrics proto regen.sh script." 2020-10-13 04:20:29 +00:00
Colin Cross
f36b061333 Merge changes Ieeca3c39,Iddeea2d0,I8d66a5d3 am: 9ebc22cf2d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1456349

Change-Id: Idcc959e68e44da66423684579bcba170e92f24de
2020-10-13 03:48:49 +00:00
Evgenii Stepanov
2080bfe79a Support asan/hwasan versions of prebuilts.
In apex_set and cc_prebuilt_library_*, provide a way to specify an
alternative source to use when build with sanitizers.

Test: prebuilt_test, apex_test
Change-Id: I1ab8091bf696d94da3547cf5248853df489bdee6
2020-10-13 03:37:32 +00:00
Colin Cross
9ebc22cf2d Merge changes Ieeca3c39,Iddeea2d0,I8d66a5d3
* changes:
  Add jni_libs to host java binaries
  Make java_binary common variant a dependency
  Replace jniDependencyTag with a value
2020-10-13 03:33:10 +00:00
TreeHugger Robot
93a82013c8 Merge "Merge ab/6749736 in stage." into stage-aosp-master 2020-10-13 03:31:46 +00:00
Colin Cross
3572cf74f9 Move LLNDK and NDK versionSelectorMutator special cases into versionedInterface
Implement stubsVersions on *llndkStubDecorator and *stubDecorator to
handle the special cases in versionSelectorMutator.

Test: m checkbuild
Change-Id: Idc985c52f91450df42c0275b2b2acef3f2ed8868
2020-10-12 16:55:49 -07:00
Colin Cross
bbc941b0d0 use version mutator for CRT
Move the CRT objects into the version mutator and retire the
ndk_api mutator.

Test: no change to build.ninja or Android-${TARGET_PRODUCT}.mk
Change-Id: Ibbbde323e3e0e8e4702dda4f3828a49786280118
2020-10-12 16:55:49 -07:00
Colin Cross
5ec407b594 Use version mutator for NDK
The ndk_api mutator is similar to the version mutator.  Move the
ndk_library ndk_api variations into the version mutator instead,
which will help later when consolidating the stubs handling
between NDK, LLDNK and Apex libraries.

Test: No change to build.ninja or Android-${TARGET_PRODUCT}.mk
Change-Id: I51417cf669265762c15f7289e1dc186d017ef4a9
2020-10-12 16:55:49 -07:00
Colin Cross
8e21aa54eb Reuse more of apex stubs implementation for llndk stubs
Use the linker script and exported flags support from apex stubs
for llndk stubs.

Test: no change to build.ninja or Android-${TARGET_PRODUCT}.mk
Change-Id: I9886498dcac7419958d290de99cf5f39f5fdedee
2020-10-12 16:55:49 -07:00
Colin Cross
c88c272298 Use libraryInterface instead of concrete type asserts for stubs
Start consolidating stubs, llndk stubs, and ndk stubs by replacing
all of the concrete type asserts in the stubs methods with
libraryInterface.

Test: no change to build.ninja, Android-${TARGET_PRODUCT}.mk
Change-Id: I195d99c91e5f7afda5bcb489d20b524b3300c1b1
2020-10-12 16:55:49 -07:00
Colin Cross
0de8a1e17b Start using Providers instead of direct module access
Export information about static libraries, shared libraries and
exported flags through Providers instead of accessing the module
directly.  Much more is left to be converted, but this significantly
simplifies the dependencies on libraries with stubs by making it easy
for a module to masquerade as another by simply exporting the
providers from the other module.  Instead of depending on all the
versions of a library and then picking which one to use later, it
can depend only on the implementation variant and then select the
right SharedLibraryInfo from the variant.

Test: m checkbuild
Test: only expected changes to build.ninja
Change-Id: I1fd9eb4d251cf96ed8398d586efc3e0817663c76
2020-10-12 16:55:47 -07:00
Treehugger Robot
43dea5e3d8 Merge "Add jetifier support to android_library_import" am: ff8838cb86
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1451138

Change-Id: I53e4c331a03abef70ca5fada31ac007841f5eabb
2020-10-12 23:48:58 +00:00
Treehugger Robot
ff8838cb86 Merge "Add jetifier support to android_library_import" 2020-10-12 23:38:06 +00:00
Liz Kammer
9f1b34982e Merge "Enable defaults in soong_config_module_type props" am: 9244491f17
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1455956

Change-Id: Ie08c0913937d7fb32b1630339f7b831f57725406
2020-10-12 23:30:26 +00:00
Liz Kammer
9244491f17 Merge "Enable defaults in soong_config_module_type props" 2020-10-12 23:18:28 +00:00
Patrice Arruda
1e2cad95c8 Add additional documentation in metrics proto regen.sh script.
Added additional instruction in the regen.sh script to build the
blueprint_tools and aprotoc in case the regen.sh script fails.

Bug: b/169395325
Test: ./regen.sh
Change-Id: Icb38c907fb47febc17eef1067d06d0588dd0b7ba
2020-10-12 22:58:27 +00:00
Patrice Arruda
4fb8adcc4c Collect the hostname of the machine as a metric.
The hostname is collected during a build to determine where the user
is build from (from office workstation, cloudtop, etc...). This is a
useful metrics for RBE related builds.

Bug: b/169395325
Test: m nothing, ran printproto to verify that soong_metrics has the
      hostname.
Change-Id: I3e5d64f948ae43c5dda60de1d4a52b187e36dff8
2020-10-12 22:44:27 +00:00
Jaewoong Jung
1ca5f01a37 Merge "Apply PRODUCT_ENFORCE_RRO_TARGETS to dependencies." am: c1c415d0f7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1451145

Change-Id: Ic2c01d84632658537aa413dd7916da48d4c1934b
2020-10-12 21:55:17 +00:00