Commit graph

51964 commits

Author SHA1 Message Date
Sasha Smundak
e198eafaf6 Clean up android/module.go
Test: treehugger
Change-Id: I41973dfc6805009d44323f3f1a89f923abf39c79
2022-08-04 15:49:11 -07:00
Sasha Smundak
f2bb26f492 Show module's type and path when reporting dependency problems
Test: treehugger
Change-Id: I25c3eddbeeb10bd6b9bfa9e869f6fbc98d2a6ec4
2022-08-04 14:49:25 -07:00
Spandan Das
9f7ae7f565 Set targetSdkVersion to 10000 for MTS tests targeting current
MTS tests built on unstable branches (e.g. git_master) should be testable on
old system images (e.g. S). However, they run into an error during installation
on older images:
`Requires development platform $<current_codename>, but this is a
release platform`

This CL fixes this issue by updating the target_sdk_version of MTS test apps
targeting current to the magical sdk_version 10000

Bug: 227473065
Test: go build ./java
Test: TH
Change-Id: Ic0358a48a19dc239defbb4ee8ec99225cce75584
2022-08-04 21:23:14 +00:00
Liz Kammer
3a0355f99c Merge "export common bp2build testing functions" 2022-08-04 18:11:16 +00:00
Jingwen Chen
9009dc2d8f bp2build: Allowlist and build fastboot with Bazel.
Test: $ b build //system/core/fastboot:fastboot --config=linux_x86_64 &&
bazel-bin/system/core/fastboot/fastboot --help

Change-Id: I70159a49e7fdfbb8a0b653161e9ea2a9eeeab977
2022-08-04 15:26:46 +00:00
Jingwen Chen
5012e07bae bp2build: Allowlist //external/toybox.
Test: $ b build //external/toybox:toybox --config=linux_x86_64 && bazel-bin/external/toybox/toybox ls
Change-Id: I1809c0fcc3ae4a1965ee4bff0653266f9f64f23f
2022-08-04 15:04:43 +00:00
Alexei Nicoara
075571b5e7 Merge "Overriding placeholder version in updatable apks" 2022-08-04 08:28:16 +00:00
Remi NGUYEN VAN
bdad314f97 Make ignorewarnings optional in optimize
This allows targets to opt-in to running R8 without the -ignorewarnings
flag. Ignored warnings can cause code to be optimized incorrectly, so
this makes the build safer for such targets.

Ideally ignore_warnings should default to false, but all targets need to
be fixed for that to happen. As a first step, provide a mechanism for
individual targets to ensure they do not introduce regressions.

Bug: 229727645
Bug: 180878971
Bug: 226127213
Bug: 239990030
Test: m (runs dex_test)
Change-Id: Ic0eef29598c1ee47e958da8a5048d9696165a235
2022-08-04 13:23:47 +09:00
Alexander Smundak
fe57ecfdef Merge changes Id3de4ede,Iae326016
* changes:
  Consolidate Bazel conversion state into a single field in CommonProperties
  Index Go code in the build/make/tools
2022-08-04 02:34:17 +00:00
Jooyung Han
113bd15013 Merge "Allow libwifi-hal to use makefile_goal" 2022-08-03 22:40:43 +00:00
Cole Faust
7071a05c93 bp2build support for .asm files
Bug: 233948256
Test: ./build/bazel/ci/bp2build.sh
Change-Id: I387c2aeb36df004f0e1838a08a4f28b38503d6ed
2022-08-03 13:34:15 -07:00
Sasha Smundak
a095406411 Consolidate Bazel conversion state into a single field in CommonProperties
Bazel conversion state needs to be cloned during module cloning, so it
should be registered via module.AddProperties. Until now it was done
implicitly as the modules converted so far added the whole
base.commonProperties field (and thus transitively all its subfields).
However, adding CommonProperties also adds its fields to the list of
the module's attributes, which is undesirable. The problem surfaced
while implementing Bazel conversion to the `license` rule.

Bug: 190817312
Test: treehugger
Change-Id: Id3de4ede8df81b21f00065a3a1bdc2d707391c3a
2022-08-03 10:46:19 -07:00
Sasha Smundak
08253a0901 Index Go code in the build/make/tools
Test: manual
Change-Id: Iae326016074cbed8b83940dd188ca1171cc4d696
2022-08-03 10:46:19 -07:00
Sam Delmerico
c31778ffbc Merge "add java_import to mixed build" 2022-08-03 17:13:06 +00:00
Sam Delmerico
fb845984df Merge "copy JNI from AAR files to android_app APK" 2022-08-03 13:12:03 +00:00
Alexei Nicoara
69cf0f3756 Overriding placeholder version in updatable apks
Test: presubmit, checked the app version after build locally
Bug: 231691162
Change-Id: Icd242432540ea424235b226a45aac839dbc995be
2022-08-03 12:05:14 +01:00
Jooyung Han
39cadf9f06 Allow libwifi-hal to use makefile_goal
To migrate libwifi-hal from make to soong, its dependencis
(libwifi-hal-<vendor>) are wrapped in makefile_goal until they are
migrated to soong as well.

Bug: 239984067
Test: m
Merged-In: Icb09ef1bf40311498db04b7358634eadd0fed5fa
Change-Id: Icb09ef1bf40311498db04b7358634eadd0fed5fa
(cherry picked from commit f9392095d7e6f065310ab7662bb34897295f7d9f)
2022-08-03 17:47:25 +09:00
Mu-Le Lee
950f28abe2 Merge "Diff source dump and current version dump for Cross-Version ABI Check" 2022-08-03 03:52:38 +00:00
Hamzeh Zawawy
f79bfe8b03 Merge "Fixing issue with boolean params in cc_fuzz" 2022-08-03 00:09:04 +00:00
Matthew Maurer
801b058fe3 Merge "Revert^3 "rust: Only allow bindgen to produce rlibs."" 2022-08-02 23:28:26 +00:00
Matthew Maurer
199c188502 Revert^3 "rust: Only allow bindgen to produce rlibs."
9cc801ab7a

Change-Id: Ib59840b51b316c0ad03bc66565814dd96be0b072
2022-08-02 23:26:16 +00:00
Treehugger Robot
c4ee5535f1 Merge "Revert^2 "rust: Only allow bindgen to produce rlibs."" 2022-08-02 21:36:37 +00:00
Usta Shrestha
b7e4b08e46 Merge "Cosmetic Changes plus log errors" 2022-08-02 21:33:51 +00:00
Usta Shrestha
db46a9bbb8 Cosmetic Changes plus log errors
Test: N/A
Bug: N/A
Change-Id: I39e622a93270c922bdbea27ca79632a606431a2c
2022-08-02 20:24:57 +00:00
Sam Delmerico
82602492fc copy JNI from AAR files to android_app APK
JNI libs present in AAR files are ignored in the build. If those
libraries are necessary, they must be manually extracted and a
prebuilt_cc_library module must be created for them. Instead, we can
extract these libraries and copy them to an output APK as part of the build.

Bug: 228848794
Test: created android_app that depends on an android_library_import with
  JNI embedded, and verified that .so libs are present in APK
Test: created android_app that depends on an android_library which
  depends on android_library_import with JNI embedded, and verified
  that .so libs are present in APK
Test: verified that multiple .so's from a single architecture are copied
  to APK
Test: verified that the absence of a jni/<arch> folder or files in the
  folder will cause the Ninja action to error
Change-Id: I242a862d7bd881f7a4a8c23493924d8fe441ea25
2022-08-02 16:12:06 -04:00
Mu-Le Lee
5e04753bb6 Diff source dump and current version dump for Cross-Version ABI Check
In the newly proposed Cross-Verison ABI Check, the path of dump that
LLNDK, NDK and mainline reference to is changed to:
Before finalization: current/
After finalization: {PLATFORM_SDK_VERSION}/
In addition, a related CL(aosp/2147882) modifies the script to create
dump to folders that match the current finalization stage.

Test: make libbinder_ndk
Bug: 238387082
Change-Id: I92a4a52c26c85cf4c866b441e54291c6a624fbf4
2022-08-02 17:35:15 +00:00
Bob Badour
a015ed548d Merge "Add BSD-like binary-only license kind." 2022-08-02 17:35:09 +00:00
Treehugger Robot
769414a169 Merge "Don't write bogus built targets." 2022-08-02 17:25:58 +00:00
Treehugger Robot
a070baad71 Merge "Filter defaults from license metadata dependencies." 2022-08-02 17:23:22 +00:00
Treehugger Robot
0ea404eb36 Merge "Remove obsolete notice property." 2022-08-02 17:22:42 +00:00
Matthew Maurer
9cc801ab7a Revert^2 "rust: Only allow bindgen to produce rlibs."
b983c8971b

Change-Id: Ic82433885f7932be8cfe65433330527214807684
2022-08-02 16:57:30 +00:00
Jingwen Chen
7810e17e54 Export default apex version from updatable_modules.go to Bazel's
apex_toolchain through soong_injection.

This is necessary to keep both Bazel and Soong in sync.

Test: presubmit
Bug: 238723069
Fixes: 238153998

Change-Id: Ibf4a8ed91d358dc7800c10e4112485a52f0606bb
2022-08-02 10:11:36 +00:00
Alexei Nicoara
21b027dca8 Merge "Moving default version outside of apex package" 2022-08-02 08:52:01 +00:00
Matthew Maurer
d13d15a9c0 Merge "Revert "rust: Only allow bindgen to produce rlibs."" 2022-08-01 22:19:32 +00:00
Matthew Maurer
b983c8971b Revert "rust: Only allow bindgen to produce rlibs."
This reverts commit 53a452d1ff.

Reason for revert: Broken build

Change-Id: I4c1c6f2166c3729ef1916ad7c21e32599c5e692f
2022-08-01 21:59:00 +00:00
Matthew Maurer
a8ea3ff66e Merge "rust: Only allow bindgen to produce rlibs." 2022-08-01 20:50:41 +00:00
Sam Delmerico
3177a6e1e0 export common bp2build testing functions
bp2buildTestCase
attrNameToString
runBp2BuildTestCase
makeBazelTargetNoRestrictions

The testing framework defined in the bp2build package can only be used
from within the package because many common testing functions are
private to the package. This prevents modules defined in Soong
plugins (e.g. system/tools/aidl/build) from testing bp2build conversions.

Test: go test ./bp2build
Change-Id: Ia867081327c5181d04687b13c4550e68e6a11f86
2022-08-01 14:49:31 -04:00
Matthew Maurer
53a452d1ff rust: Only allow bindgen to produce rlibs.
Generated bindings are intended to be slim translation layers, usually
consisting of nothing more than type signatures and constants.
Generally, they should also be used in exactly one location by the safe
wrapper for these bindings. By preventing them from building as
`dylib`s, we avoid the per-library overhead of these non-reused pieces
of code.

Additionally, default visibility restrict all bindgen modules to their
subpackages. This is being done both:
* to encourage use of a single safe bindings crate
* to avoid diamond dependency graphs with mixed rlib/dylib dependencies

Bug: 166332519
Test: m; Make sample module use dylib bindgen dependency, see build failure.
Change-Id: I8e9d9cb851c2ec99f4ed63e6e18c4ba26b29721c
2022-08-01 16:28:51 +00:00
Alexei Nicoara
7579b67ef9 Moving default version outside of apex package
The default version needs to be used by both apex and apk updatable
modules. Moving it to android package so it can be accessed without
circular dependencies.

Test: presubmit
Bug: 231691162

Change-Id: Icafd50d0b065e89a115ae9c9b6ea55adf2730b49
Merged-In: Icafd50d0b065e89a115ae9c9b6ea55adf2730b49
2022-08-01 16:28:48 +01:00
Bob Badour
5282f6d2f1 Don't write bogus built targets.
Bug: 239638693

Test: m droid dist
Change-Id: I1a5bc587afc2ac4835bed929d79b4bf28d7d6a6d
2022-07-29 15:49:58 -07:00
Treehugger Robot
88e7512572 Merge "Implement mixed builds for apex modules, take 2." 2022-07-29 22:43:19 +00:00
Alix Espino
2f384a7432 Merge "Implement bp2build for linker_config" 2022-07-29 18:19:00 +00:00
Bob Badour
7fd521e62e Filter defaults from license metadata dependencies.
Bug: 239638693

Test: m droid dist
Change-Id: Ic094aa706145ddd1cb8a1b134117c83ad41061b7
2022-07-29 11:18:12 -07:00
Bob Badour
0cc5facf79 Remove obsolete notice property.
Bug: 192434786

Test: m droid dist

Change-Id: I0f384ae895cebab9732448b82db600c67eb8f711
2022-07-29 17:54:40 +00:00
Alix
1be00d4e48 filter unknown clang cflags in bp2build
filtering out no longer useful flags in bp2build conversion

Test: cc_library_shared_conversion_test
Bug: 231995978
Change-Id: I5172f6d07a8928291bbc11bd8802678b33cc5b1f
2022-07-29 12:17:25 +00:00
Sasha Smundak
fe9a5b833d Implement mixed builds for apex modules, take 2.
* Add ApexCqueryInfo to obtain apex artifacts used by the makefile
  generator and downstream modules
* Refactor code common to GenerateAndroidBuildActions and ProcessBazelQueryResponse
* Implement android.MixedBuildBuildable for modules
* Enable mixed build for apex modules with payload_type:"image"

The first take 6a2b7c40b was setting compressed APEX suffix incorrectly, and
was reverted in 8a3c91494.

Fixes: 239925080 239695521 232085015
Test: treehugger
Change-Id: I1720f8db3c7cc773183d25a815d9b7eeaf7c73ad
2022-07-28 14:43:50 -07:00
Matthew Maurer
cf3844c879 rust: Rust is now GA for platform usage
Rust is now approved for general platform use without project-specific
review.

Bug: 240501326
Test: m
Change-Id: I6fd4c22ba2c6a3a5bac6f91fd087fe5cffe46c01
2022-07-28 06:57:26 -07:00
Ken Chen
d8cded58fe Merge "Disallow '_' in bpf source name" 2022-07-28 07:00:12 +00:00
hamzeh
3c983d2ba6 Fixing issue with boolean params in cc_fuzz
Test: m example_fuzzer
Change-Id: I2661d9915949d4150876db6527b865e63d356e5e
2022-07-26 14:19:22 -07:00
Sam Delmerico
277795cb4f add java_import to mixed build
Bug: 220168131
Test: go test ./java -run TestImportMixedBuild
Test: USE_BAZEL_ANALYSIS=1 m CtsManagedProfileApp && verify jars are
  included from execroot/__main__ directory
Test: build/bazel/ci/mixed_droid.sh
Change-Id: I6d35a2389ea35525d532efc8474c71d2c8825646
2022-07-26 17:14:42 -04:00