Commit graph

62872 commits

Author SHA1 Message Date
Colin Cross
4c608f54b0 Use platform libc++ for riscv64 sdk variants
There is no prebuilt libc++ for riscv64 provided by the NDK, build
it using the platform sources instead.

Test: lunch aosp_riscv64-userdebug && m -k
Change-Id: Ib9c99381e61331e10c136127a3f1b1626ce75ebe
2023-01-26 15:40:58 -08: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
Spandan Das
627fc3e436 Rename API surface provided to mainline modules
This API surface is provided by platform and mainline modules to other
mainline modules. Rename it to module-lib API surface to align it with
the terminology in go/android-api-types

Test: go test ./bp2build
Test: go test ./cc
Change-Id: Ieb9f3214e66366fc2ceb6f47e2d6623acb537827
2023-01-26 23:02:53 +00: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
Christopher Ferris
2fc8e039ac HWAsan: Increase the malloc fill size.
To match the scudo allocator's always return zero allocation behavior,
set the max malloc fill size larger than the largest size class.
Currently, the largest is 65552, so set the max to 128KB to avoid
needing to change this in the future.

Test: Run test that verifies allocations returned are zero and it passes.
Change-Id: Ie9f0b0d54f846008b1c6d5dc6e55c7031262d29e
2023-01-26 14:19:27 -08: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
Usta Shrestha
cae3bfa702 soong_build cmline args validation
Bug: NA
Test: +ve: `m bp2build`, `m libc` etc. -ve: `m --bazel-mode-dev --bazel-mode-staging libc`, `m bp2build libc` etc
Change-Id: Idc6f3cc7b96c49a5a5e00f203c8d00a4777880c9
2023-01-26 18:22:18 +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
Sam Delmerico
3fad8ed0d1 convert cc_object crt property in bp2build
Bug: 263905692
Change-Id: I71e3fc4a42954c2d1f9f631d012949b81f4536de
2023-01-26 10:21:58 -05:00
Andrew Walbran
c61652ee5a Remove unused field 'subAndroidMkOnce'.
Test: m crosvm vmbase_example_bin
Change-Id: Ica201b8bfa89073bcd7d5e3c1a2822adfe7ad28c
2023-01-26 14:06:35 +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
Alfred Piccioni
2d0349f133 Merge "Removing references to arm7 emulator targets." 2023-01-24 09:55:13 +00:00
Cole Faust
31010d91d7 Merge "Add --config alias for musl host platform" 2023-01-24 01:34:06 +00:00
Jihoon Kang
362aa9db12 Add libs property to java_api_library module
Module Lib API surface takes modules that are not part of the API
surface as classpath during compilation of the JAR file. Thus, add libs
property to add deps in bp module definition.

Test: m
Change-Id: I8967d53430fa4cc8e4aa431770ba4e97893f8c61
2023-01-24 00:44:22 +00:00
Chris Wailes
a3ecafb24b Merge "rustc-1.65.0 Build 9502310" 2023-01-23 20:59:44 +00:00
Trevor Radcliffe
4f95ee96b8 Export sanitizer vars for use in Bazel
Bug: 265154269
Test: Unit tests
Change-Id: I46584159264476d76079e396c6ec294fb394acff
2023-01-23 20:28:06 +00:00
Cole Faust
c167d0f1d6 Add --config alias for musl host platform
Test: b build --config=linux_musl_x86_64 //build/bazel/examples/python/protobuf/...
Change-Id: Id665660ee7fe123d74ad78d42eb26d4a65e64a60
2023-01-23 10:17:21 -08:00
Spandan Das
d623192eea Merge "Export system headers for SdkVariants as well" 2023-01-20 23:54:08 +00:00
Sam Delmerico
9f9c0a22fa transitive Java deps for r8
The -libraryjars argument to r8 was missing transitive dependencies, and
so complained when there were classes used in the program JAR which were
not provided via libraries. This CL propagates transitive dependencies
to the r8 command to reduce the warnings that are generated for missing classes.

Bug: 242088131
Change-Id: Ifad7bc7c5d406e3de8d98ea963c97e88c84b45a1
2023-01-20 17:05:14 -05:00
Treehugger Robot
c823617f96 Merge "Don't add flattened files apex as dependencies of an image apex" 2023-01-20 20:06:04 +00:00
Spandan Das
baef7ff6df Merge "Add documentation about the purpose of #apex and #symbols in map.txt" 2023-01-20 18:20:13 +00:00