Commit graph

72199 commits

Author SHA1 Message Date
Cole Faust
ad35c57288 Merge "Fix TestPrebuiltRootHostWithWildCardInSrc" into main 2023-10-12 18:30:56 +00:00
Chris Wailes
7c1b29c9a4 Set incremental or codegen-units, not both
This CL changes the handling of Rust flags to only pass one of either
incremental or codegen-units.  This is necessary because incremental
implies a codegen-units value of 128 and it may be overridden by the
separate codegen-units argument.

Test: TH
Change-Id: Ia474e4f9fc071d5054cb479ec9de550fa886677e
2023-10-12 10:56:34 -07:00
Jihoon Kang
e100a884e3 Merge changes from topic "enable-hidden-api" into main
* changes:
  Enable hiddenapi check for from-text stub build
  Utilize module lib and test api superset module in hiddenapi
2023-10-12 17:33:35 +00:00
Zi Wang
7d54b3a5d8 Fix TestPrebuiltRootHostWithWildCardInSrc
Test: CI
Change-Id: Ia39ac3217fa827fec4c6e572e49c49c15e126109
2023-10-12 10:25:31 -07:00
Zi Wang
7c81b2b245 Merge "Support prebuilt_root_host in bp2build" into main 2023-10-12 17:10:21 +00:00
Cole Faust
4e234c99fb Merge "Denylist CompilationTestCases_package-dex-usage" into main 2023-10-12 16:57:00 +00:00
Cole Faust
3af559c9ce Denylist CompilationTestCases_package-dex-usage
I'm not sure how this was missed earlier.

Bug: 290816499
Test: build/soong/tests/genrule_sandbox_test.py -t sdk_phone_x86_64 all with aosp/2666142
Change-Id: I8d21a34e3b13ac568fa6153a31c43ba3e4d516bd
2023-10-12 09:54:53 -07:00
Cole Faust
14645b284d Merge "Add out/partitions_were_clean_at_start_of_build.txt" into main 2023-10-12 16:33:11 +00:00
Liz Kammer
93b7e9545e Handle java_resources as deps
Test: CI && unit tests
Change-Id: I51f3c7d876c3cc25cb0459d933e1a510cfb5bf13
2023-10-12 09:57:06 -04:00
Liz Kammer
9f52f6ba60 Change openjdk9 specific props in bp2build/Soong
JDK17 is the default java version, adding these props conditionally
openjdk9 is no longer relevant

Test: CI
Change-Id: I5d80fd22f474cedf389d1e295620cfc17bc327a0
2023-10-12 09:57:04 -04:00
Ivan Lozano
91738fddb3 Merge "rust: Temporarily disable ASAN builds for Host" into main 2023-10-12 12:53:43 +00:00
Jingwen Chen
390d4ca325 Allowlist mainline_modules_sdks_test
Test: b build `bmod mainline_modules_sdks_test`
Change-Id: I1e2e0fdf8547e48b53a96c42d492da861007b10c
2023-10-12 10:00:55 +00:00
Ian Zerny
57beac1b76 Merge "Ignore dex files in input archives" into main 2023-10-12 06:27:02 +00:00
Alix Espino
37e64f9c91 Merge "Use an option struct in aapt.buildActions & manifestMerger" into main 2023-10-12 02:53:10 +00:00
Jingwen Chen
a4c330e076 Merge "Move platform constraints to bazel_common_rules." into main 2023-10-12 02:22:26 +00:00
Treehugger Robot
452b794c33 Merge "TestJavaHostGeneral Fix" into main 2023-10-12 01:37:32 +00:00
Ramy Medhat
67b4973126 Merge "Set download_tmp_dir explicitly to be a directory under the output directory." into main 2023-10-12 01:05:18 +00:00
Krzysztof Kosiński
69101d699c Merge "Revert "Enable -Werror=incompatible-function-pointer-types"" into main 2023-10-11 23:16:07 +00:00
Ramya Subramanian
5e75975e04 Revert "Enable -Werror=incompatible-function-pointer-types"
This reverts commit 07c362bf7f.

Reason for revert: DroidMonitor: Potential culprit for Bug 304839693 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.”.

Change-Id: Iafb894510c48af2dd8b015d7264a031ff9348884
2023-10-11 23:00:33 +00:00
Alix
42d7ac96bc TestJavaHostGeneral Fix
This fixes "expected 2 bazel modules in "." but did not find any"
error that the test was getting.

Test: got test ./bp2build
Change-Id: I376c7c9974d301fc85894ecf2b0838c863a74a47
2023-10-11 22:39:27 +00:00
Treehugger Robot
154cf29b57 Merge "Sort genrule allowlists" into main 2023-10-11 22:35:21 +00:00
Treehugger Robot
36674db0b3 Merge "Use make_mock_top function" into main 2023-10-11 22:10:48 +00:00
Cole Faust
b36e79c72c Add GENRULE_SANDBOXING=false to non-sandboxed builds
Because sandboxing is becoming the default.

Bug: 290816499
Test: Presubmits
Change-Id: Icd8cb70f0275bafc580c7123a9d38991ac58adbf
2023-10-11 14:52:08 -07:00
Jihoon Kang
c5be9361b6 Merge "Retain concrete overrides of abstract methods by default" into main 2023-10-11 21:02:17 +00:00
Jihoon Kang
faf7251c7b Merge changes I804d3597,I6a25e2f6 into main
* changes:
  Add module dependency checking testing method
  Add droidstub modules for Soong java testing
2023-10-11 20:43:48 +00:00
Mark Dacek
360e8ebbff Merge "Add b_args_test." into main 2023-10-11 20:37:37 +00:00
Cole Faust
dc3c1454fa Sort genrule allowlists
To avoid merge conflicts.

Bug: 290816499
Test: Presubmits
Change-Id: I8f8ba5112ae87c21dd95513ee1cf0d3d16bccf3f
2023-10-11 12:37:25 -07:00
Zi Wang
040541496a Support prebuilt_root_host in bp2build
Also fix a bug that filename string may contain wild card

Test: Added unittest and CI

Bug: 303725325
Bug: 304590341
Change-Id: I5de9c195343328981a4154024c0fe4e14969ce79
2023-10-11 12:16:26 -07:00
Krzysztof Kosiński
7158f66753 Merge "Enable -Werror=incompatible-function-pointer-types" into main 2023-10-11 19:01:42 +00:00
Jihoon Kang
dff2aea212 Enable hiddenapi check for from-text stub build
This change removes the UNSAFE_DISABLE_HIDDENAPI_FLAGS env var setting
during from-text stub build, and enables hiddenapi list during from-text
stub build.

Test: ENABLE_HIDDENAPI_FLAGS=true m --build-from-text-stub
Bug: 275570206
Change-Id: Ic8cd60e376b978ccc658ff43a44d082eb2759fa5
2023-10-11 17:46:29 +00:00
MarkDacek
055a1207ad Add b_args_test.
Bug: 303269101
Test: run the test
Change-Id: I2c5e72d25dab601ef7354fb9ad624ce035e64812
2023-10-11 17:27:29 +00:00
Ivan Lozano
839b5f9ac5 rust: Temporarily disable ASAN builds for Host
This is breaking sanitized host builds. Disable the sanitizer in Rust
for host targets until this can be resolved.

Bug: 304507701
Test: SANITIZE_HOST=address m rust
Change-Id: I12b0c3e217717de7a89b32198f4c4729709e99b3
2023-10-11 13:18:37 -04:00
Jihoon Kang
244d42a91b Utilize module lib and test api superset module in hiddenapi
Hiddenapi takes a single widest api scope stub dex jar as an input, as
the tool does not support handling duplicate classes passed as inputs.
A problem regarding this is that the test and module lib api surfaces do
not strictly have a subset/superset relationship, unlike other api
surfaces.

This has not become a problem for stubs generated from source
files as the stubs contain all methods in the source files, but became a
problem for stubs genereated from text files as the stubs only contain
the methods that are essential for compilation of the stubs and its
reverse dependencies, and there were cases where the hiddenapi flags are
not properly propagated to the subclasses.

To resolve this problem, a java_api_library module that provides the
union of the test and the module lib api surfaces was introcudes. Since
hiddenapi_modular currently defines the module lib api surface to be a
wider api scope over the test api scope, the new module can be passed as
input to hiddenapi over the module lib non updatable stub module to
resolve the problem.

Test: enable hiddenapi for from-text stub build && ENABLE_HIDDENAPI_FLAGS=true m --build-from-text-stub
Bug: 191644675
Bug: 275570206
Change-Id: I9a230ec5082c52ed866f29b0748814f2cf10279b
2023-10-11 17:06:23 +00:00
Jihoon Kang
f00200b6fb Add module dependency checking testing method
Currently in Soong testing suite, the only method for testing module
dependency is CheckModuleDependencies(...), which comapares for the
exact module dependencies. This change adds the method
CheckModuleDependency(...) which enables checking the dependency between
two modules, instead of comparing for all dependencies of an interested
module.

Test: m nothing
Bug: 288624417
Change-Id: I804d35979ddc24b0134671e326c1d37615ec4190
2023-10-11 16:18:45 +00:00
Jihoon Kang
8f83dcd18c Add droidstub modules for Soong java testing
Previously, only the essential java_api_library and
java_api_contribution modules were being added to the template bp file
for testing purpose. However, since the child change aosp/2640275
adds droidstubs that generates the java_api_contribution as the
dependency of the java_api_library modules, not adding the droidstubs
modules to the template bp file will lead to missing dependency errors
in Soong test cases that tests the from-text generation &
java_api_library functionality.

To prevent this, this change adds the droidstubs modules instead of the
auto generated java_api_contribution modules to the template bp file to
more closely align with the real life behavior.

Test: m nothing
Bug: 288624417
Change-Id: I6a25e2f6c5f1281e96eca15aa5eec7417635df3f
2023-10-11 16:17:55 +00:00
Vinh Tran
14d60d1fd0 Allowlist toolchain/pgo-profiles
Test: m bp2build
Change-Id: I3c4b383941c24aa948e1a42aa782349567398c5f
2023-10-11 12:17:30 -04:00
Yu Liu
0bf0865f83 Merge "Change java_test_host to support cov variant." into main 2023-10-11 16:15:40 +00:00
Christopher Parsons
c27e8f1427 Merge "Turn on bp2build_deps by default" into main 2023-10-11 15:18:18 +00:00
Jingwen Chen
9c2e3ee54a Move platform constraints to bazel_common_rules.
This enables sharing of platform constraints between platform and kernel builds.

Bug: 304594734

Test: treehugger
Change-Id: I48091eeaf2e529c3f180ba056da3935911868b14
2023-10-11 12:07:44 +00:00
Jason Wu
5a2a94ebf0 Merge "Update sh_test conversion to handle data_bins and test_configs properly" into main 2023-10-11 01:11:15 +00:00
Yu Liu
d8aa20062a Change java_test_host to support cov variant.
Bug: 279960392
Test: CI and m --skip-soong-tests TARGET_PRODUCT=aosp_x86_64 EMMA_INSTRUMENT=true CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS="external/cronet" mts
Change-Id: I4489ed725aee6097e6e340f5f6d06ecaf1c64222
2023-10-10 16:00:32 -07:00
Ramy Medhat
bc06176350 Set download_tmp_dir explicitly to be a directory under the output directory.
This directory is where outputs are download first before being moved
to their final destination to ensure atomicity.

Change-Id: Ic224bf21c07566de00d292d02f1c0f7f727dcb08
2023-10-10 22:33:46 +00:00
Zhi Dou
1b052b0078 Add UnsupportedAppUsage to java_aconfig_library dependency
Generated flag requires UnsupportedAppUsage annotation to expose the
flag to CTS tests.

Bug: 301272559
Test: presubit
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:5e2c96a93b4c16b224c090570a10697400a42c0a)
Merged-In: I90c87596ca80766ece429ddee1b45723b01d2760
Change-Id: I90c87596ca80766ece429ddee1b45723b01d2760
2023-10-10 19:36:00 +00:00
Treehugger Robot
d56338cc6f Merge "Enable Flow Sensitive AutoFDO" into main 2023-10-10 18:46:26 +00:00
Jihoon Kang
90c3f5fac4 Merge "Introduce system_modules property to java_api_library" into main 2023-10-10 18:33:18 +00:00
Jason Wu
25c69eec45 Update sh_test conversion to handle data_bins and test_configs properly
sh_test.data_bins are used to mark special executable dependencies which should be installed alongside the test entry point's cwd as siblings. This change makes it such that the Tradefed rule places them at the expected location. In addition, this change also incorporates the `tradefed.TestConfigAttributes` to handle the test_configs conversions.

Test: bp2build.sh
Bug: 283486885
Change-Id: Ifeb049c13ae208c785dbdc858f589be8f21109d1
2023-10-10 14:03:19 -04:00
Paul Duffin
629b9d287d Retain concrete overrides of abstract methods by default
Bug: 299366704
Test: m checkapi
Change-Id: I3d9fafefe90a98568c16d80c30e4d1d88a22c350
2023-10-10 17:50:25 +01:00
Zi Wang
379257c84b Merge "Address comments from aosp/2777928" into main 2023-10-10 16:46:13 +00:00
Alix
f7a1027c6b Use an option struct in aapt.buildActions & manifestMerger
Change-Id: Ia056ab321e1fd146ed0cdb98fc2d4455601f648c
Test: Treehugger
2023-10-10 14:31:03 +00:00
Ivan Lozano
e94f26e2e8 Merge "rust: Emit -x c++ for bindgen modules with cpp_std" into main 2023-10-10 13:05:02 +00:00