Commit graph

62580 commits

Author SHA1 Message Date
Cole Faust
5c503d1c43 Precompile python sources
This signifigantly improves the startup time of soong-built
python binaries. For example, running
`m apexer && time out/host/linux-x86/bin/apexer` gives
0.734s before this cl, and 0.094s after.

Fixes: 259718110
Test: Presubmits
Change-Id: Ib19e83e2c60c39a849525be117279c318de3afa7
2023-01-27 15:43:38 -08:00
Mark Dacek
3420d978cf Merge "Write bazel metrics file from soong." 2023-01-27 22:27:39 +00:00
Sam Delmerico
78aca80710 Merge "add androidmk cc-related variables to androidmk" 2023-01-27 21:04:29 +00:00
Colin Cross
ec41b5c2e2 Merge "Disable VNDK apexes for unsupported API levels" 2023-01-27 19:49:48 +00:00
Colin Cross
bb137a3956 Disable VNDK apexes for unsupported API levels
Disable VNDK apexes when their version is below the minimum
supported API level for the primary architecture.

Test: TestVndkApexCurrent
Change-Id: Ie72a5beb9da432660d3fec5c520402224326f961
2023-01-27 19:49:38 +00:00
Colin Cross
31a8bd828b Merge "Raise minsdk for CRT dependencies" 2023-01-27 19:49:14 +00:00
Colin Cross
a13de4dea4 Merge "Don't install system image copies of libraries in unbundled apex builds" 2023-01-27 19:27:54 +00:00
Colin Cross
dd60d3aa66 Merge "rustc-1.65.0.p1 Build 9523344" 2023-01-27 18:56:29 +00:00
Diwas Sharma
fe4587161b Merge "Revert "Don't add flattened files apex as dependencies of an image apex"" 2023-01-27 17:55:13 +00:00
Treehugger Robot
6e7441edde Merge "Read ApexMkInfo for modules to be installed." 2023-01-27 15:45:08 +00:00
Dennis Shen
0c79be54b6 Merge "Support trimmed variant build in soong" 2023-01-27 13:11:50 +00:00
Jingwen Chen
29743c8423 Read ApexMkInfo for modules to be installed.
This piggybacks onto the ApexInfo cquery handler, so we're issuing a
single bazel query call that reads two providers in the starlark expr.

Also rename requiredDeps to makeModulesToInstall to differentiate it from
APEX's required/provided libs in the apex manifest.

Test: unit test
Test: mkdiff
Fixes: 263123189
Change-Id: Ib7e43f1586f29864eee8627dba3631bfaff27afa
2023-01-27 04:02:45 +00:00
Zhenhuang Wang
b5ad1eecca Merge "Support storing SHA256 checksum for files in soong_zip" 2023-01-27 02:34:44 +00:00
Jason Wu
47b0c8c620 Merge "Delete empty entries for covertedModules in bp2build_metrics" 2023-01-27 02:02:39 +00:00
Diwas Sharma
bb9202e688 Revert "Don't add flattened files apex as dependencies of an image apex"
This reverts commit eb8cd3122a.

Reason for revert: mainline module jacoco jar do not contain JAVA_LIBRARIES needed for coverage, see: b/266679012

Change-Id: If756f7aaf40c6bcfed170c59c494bcc426620039
2023-01-27 00:40:21 +00:00
Jihoon Kang
b6690d21ae Merge "Generate java_api_contribution module from droidstubs module" 2023-01-26 23:54:14 +00:00
Colin Cross
363ec76a6d Raise minsdk for CRT dependencies
Prevent depending on CRT variations that don't exist by raising
the CRT dependency api level to the minimum supported for the
architecture.

Test: lunch aosp_riscv64-userdebug && m -k
Change-Id: I575355569b3772f5d1fe2530161a1d45aa00a349
2023-01-26 15:40:58 -08:00
Colin Cross
df2043e96a Don't install system image copies of libraries in unbundled apex builds
Apex builds are setting LOCAL_REQUIRED_MODULES to include external
dependencies into the system image.  This make sense for device builds,
but just causes extra unnecessary builds for unbundled apex builds
that are not building device images.  Skip the dependency during
unbundled builds.

Test: aosp-master-art mainline_modules_x86_64-userdebug builds
Change-Id: I363995b7309cc3c90b0a584d051050f105b5b915
2023-01-26 15:40:58 -08:00
Colin Cross
3970b9e990 rustc-1.65.0.p1 Build 9523344
Test: m rust
Change-Id: Idb592ac87af21d21caf43b46da21b49ab08c1dbf
2023-01-26 14:54:42 -08:00
Treehugger Robot
8562855d2a Merge "Fix overwritten bug of noOverride64GlobalCflags support on Soong" 2023-01-26 22:33:30 +00:00
Jason Wu
9948a86e2e Delete empty entries for covertedModules in bp2build_metrics
Test: `m nothing` and verify the bp2build_metrics
Bug: 257975713
Change-Id: Ib6b8a116bee20f3eef80cadaa0afac28a25e2121
2023-01-26 15:49:29 -05:00
Liz Kammer
0725a60e5d Merge "Correct global excludes not always being excluded" 2023-01-26 20:09:14 +00:00
zijunzhao
14e68a250c Fix overwritten bug of noOverride64GlobalCflags support on Soong
Bug: b/261642850
Test: Build and check warnings. Add two xfail tests in bionic and see the
results locally.

Change-Id: I61be649f935c05461bdd6c260627f3c72261a9e8
2023-01-26 19:41:49 +00:00
Alix Espino
1db2ff3eaf Merge "arch variant support for libs property" 2023-01-26 19:11:23 +00:00
Cole Faust
8733a89cf8 Merge "Refactor python rules" 2023-01-26 19:03:25 +00:00
Jihoon Kang
3198f3cb52 Generate java_api_contribution module from droidstubs module
Context
- droidstubs module are either generated from the java_sdk_library
  module or defined in the bp files.
- Since droidstubs module contains API text file property,
  java_api_contribution module can by dynamically created from
  droidstubs.

Implementation
- Add `api_surface` property in droidstubs module. This property is
  either inherited from the java_sdk_library or written in the module
  definition in the bp file.
- Add defaultable hook in droidstubs module to generate the child
  java_api_contribution module.

Test: m
Change-Id: Ica43d65614723c623cd0c155266f9844e69e5d5e
2023-01-26 18:44:25 +00:00
Liz Kammer
748d70786c Correct global excludes not always being excluded
Test: bp2build go tests
Fixes: 266617441
Change-Id: I82418ef8da4cca880d5adac98853805a18a9780e
2023-01-26 11:16:39 -05:00
Dennis Shen
e2ed70c61a Support trimmed variant build in soong
variable.go:
add a new product variable TrimmedApex which is controlled by
environment variable PRODUCT_TRIMMED_APEX

config.go:
all config to check if trimmed build is turned on or not

apex.go:
add overridable apex module property:
use_DCLA: <DCLA apex module>

"use_DCLA" allows user to just use the lib list in DCLA to determine
which native shared libraries to trim. This property is no-op if
TrimApexEnabled is set to false.

builder.go
1, if it is to produce a trimmed variant, fix the default version code
by making the last variant digit to 2. this is only useful in local
build. in production build, there is apex manifest injection by
coastguard that determines the actual version code.

2, create a new apex rule called: "TrimmedApexRule", this rule invokes
an apexer wrapper called apexer_with_trim_preprocessing which will
properly trim the target libs.

BUG: b/259381334
TEST: adbd banchan build for both static and trimmed variant
Change-Id: I38a91cdef86a3c9185d00610ab3dd7acd07fd90a
2023-01-26 15:57:21 +00:00
Ian Zerny
9002605d72 Merge "Add default output location for full proguard configuration." 2023-01-26 07:16:03 +00:00
MarkDacek
00e3152aca Write bazel metrics file from soong.
Test: b build libcore:all
Change-Id: I372d48a9c7132bc57ecc1a8ba06eb098d28cbad7
2023-01-25 22:43:14 +00:00
Sam Delmerico
4e115cc90d add androidmk cc-related variables to androidmk
The adbd_test androidmk definition is missing some cc-related variables
for cc_test in mixed builds. These variables should be populated from
information from Bazel.

Bug: 265758350
Change-Id: I59d017e2eb2f139188ba3383c457cc0055372b61
2023-01-25 15:14:03 -05:00
Vinh Tran
ba46e76622 Merge "Delete __ANDROID_APEX_MIN_SDK_VERSION__ from Soong" 2023-01-25 19:09:27 +00:00
Treehugger Robot
d5ac8fe723 Merge "Add noOverride64GlobalCflags support to Soong" 2023-01-25 19:07:48 +00:00
Ian Zerny
82044f1327 Add default output location for full proguard configuration.
Test: n/a
Change-Id: I1d022ff138d14f6b6960811320436c7e5660e6e2
2023-01-25 19:56:22 +01:00
Cole Faust
4d247e6f21 Refactor python rules
The goal of this cl is to simplify the python rules,
mostly by removing the "decorator" pattern that they
currently use, and instead making separate module
types for libraries, binaries, and tests that inherit
from each other.

Bug: 259718110
Test: Verified ninja files are unchanged (they only change in the list of soong sources because I added/deleted files)
Change-Id: I1e836e2cc4782c7818f91db7df7895de3b8db7ca
2023-01-25 10:40:59 -08:00
Matthew Maurer
7b931c7652 Merge "rust: Enable Rust modules in Product" 2023-01-25 17:26:57 +00:00
Sam Delmerico
9202bb01de Merge "add error handling to cquery in MockBazelContext" 2023-01-25 17:08:12 +00:00
Sam Delmerico
41f9b734bb Merge "transitive Java deps for r8" 2023-01-25 16:05:43 +00:00
Treehugger Robot
7c30b6bad7 Merge "bp2build support .kt in android_library" 2023-01-25 15:47:49 +00:00
Liz Kammer
7c7409d57d Merge "Change visibility of bp2build proto for dir rename" 2023-01-25 14:26:19 +00:00
Treehugger Robot
8153bc40bb Merge "Add additional adbd related tests to mixed staging" 2023-01-25 13:21:07 +00:00
zijunzhao
933e38093d Add noOverride64GlobalCflags support to Soong
Bug: b/261642850
Test: Build and check warnings. Add two xfail tests in bionic and see the
results locally.

Change-Id: I68fca0084787c329b6c49ce4dff6fd132f820735
2023-01-25 04:02:29 +00:00
Zhenhuang Wang
b8451b8448 Support storing SHA256 checksum for files in soong_zip
Add a -sha256 argument to soong_zip that computes SHA256 checksum for
each file and stores the value in file header. The SHA information can
then be used by downstream systems that use content addressing.

Bug: 259513199
Test: zip_test.go
Test: soong_zip -o test.zip -D test_dir -sha256
Change-Id: I20e9f424bd0a4604f0dc7cc77bd65f10eb49a163
2023-01-25 10:00:58 +08:00
Matthew Maurer
993db7a7cc rust: Enable Rust modules in Product
The prohibition on Rust dylibs outside system still stands, but rlibs,
rust_ffi_static, and binaries will all work fine.

Test: m nothing (new soong tests added by this commit)
Test: Created sample product_specific rust_binary, checked out/ location
Bug: 165791368
Change-Id: I6453274064bb24b2019f38e57fc0d09b7c0fcf30
2023-01-24 16:39:52 -08:00
Jihoon Kang
6cf5e0d9cb Merge "Add libs property to java_api_library module" 2023-01-24 18:08:49 +00:00
Trevor Radcliffe
6f0aef34e8 Merge "Export sanitizer vars for use in Bazel" 2023-01-24 17:29:47 +00:00
Spandan Das
82a9e8fe03 Merge "Add j.a.p.Generated to ART's Public API surface" 2023-01-24 16:40:17 +00:00
Liz Kammer
9c667416de Add additional adbd related tests to mixed staging
Test: CI
Change-Id: I724e854dbbc67a1a37109e19935b28627066acc8
2023-01-24 10:47:18 -05:00
Sam Delmerico
ce39f83538 add error handling to cquery in MockBazelContext
Change-Id: Ia01072b6528caff2f3ceaca67cdba8b900924fe5
2023-01-24 10:39:07 -05:00
Alix
36795a74dc bp2build support .kt in android_library
Bug: 258690851
Test: bp2build tests and built target renderscript_toolkit
Change-Id: I43ddf5637c97e4849b63abd2423f29519d44c28f
2023-01-24 14:53:44 +00:00