Commit graph

62510 commits

Author SHA1 Message Date
Wei Li
fcfc9d3130 Merge "Add integration test for testing the arch variant passed to cc modules included in APEXES." 2023-01-07 06:35:09 +00:00
Cole Faust
501a7976be Merge "Bp2build support for multiple product configs" 2023-01-07 03:09:08 +00:00
Wei Li
6c588296a2 Add integration test for testing the arch variant passed to cc modules included in APEXES.
Bug: 258422889
Test: build/soong/tests/run_integration_tests.sh
Change-Id: I0852454e1d18ccd706f5270c0c87f9546cede5bf
2023-01-06 22:40:52 +00:00
Paul Duffin
e76fa00998 Merge "Remove IsModuleInVersionedSdk" 2023-01-06 22:37:59 +00:00
Paul Duffin
5366821635 Merge "Dedup checks for module being in versioned sdk snapshot" 2023-01-06 22:37:15 +00:00
Paul Duffin
c8fe431e89 Merge "Stop using versioned snapshots in TestBasicSdkWithBootclasspathFragment" 2023-01-06 22:35:58 +00:00
Bill Yi
4a0f4020ca Merge "Merge TQ1A.230105.002 to aosp-master - DO NOT MERGE" 2023-01-06 19:33:50 +00:00
Treehugger Robot
6228be4cd4 Merge "support libs for android_library" 2023-01-06 19:30:02 +00:00
Bill Yi
f09cfc4d5f Merge TQ1A.230105.002 to aosp-master - DO NOT MERGE
Merged-In: I1c6f5fccdddcece10d5ebc54e6323dd801fa567e
Merged-In: I64f8f25224bf2b6bdeb28bd2672c662a5a197dc1
Change-Id: I2c335a301c7c90f68ff6c62035f47fba30cb6a8b
2023-01-06 07:13:50 -08:00
Usta Shrestha
a4e0a0f7f6 cosmetic: auto-scan test_ functions
bug: NA
test: manually ran build/soong/run_integration_tests.sh and verified all tests ran
Change-Id: I1a0a2e227888efc2e7fd7f718b8e534e6dbdbcf1
2023-01-06 14:26:56 +00:00
Cole Faust
c49c49a69d Merge "Show correct line numbers for errors in an $(eval)" 2023-01-06 03:13:29 +00:00
Sam Delmerico
a2cccc3926 bp2build converts android.hardware.audio AIDL
Test: build --config=android //hardware/interfaces/audio/aidl:android.hardware.audio.effect-V1-ndk_aidl_code_gen
Change-Id: I55764604fbed4e40dd85b1e2fd1491fa043c92f8
2023-01-05 16:55:28 -05:00
Alix
82fb94e91e support libs for android_library
adds support for *-> android_library and android_library->* edges

Change-Id: I41d4e1d1b8106a17e67951d47e67b59ef3170d17
Test: manually inspected build files for libWallpaperPicker & android-suppor-v4
2023-01-05 21:13:57 +00:00
Cole Faust
b85d1a15cc Bp2build support for multiple product configs
Create a
build/bazel/product_config/generated/products/<product_name>/BUILD
file that contains the platform definitions needed for
a particular product. Currently we just create it for the
current lunch target, but the idea is that eventually when
all product config is in starlark, all the products will
have their platform definitions in the tree at once.

Bug: 249685973
Test: Presubmits
Change-Id: I08c82ff28dcf62f09d3b1d2e3186a6b961e12f6e
2023-01-05 12:49:14 -08:00
Joe Onorato
059285911d Merge "Move common functions to script_utils.sh" 2023-01-05 20:10:10 +00:00
Cole Faust
7366042870 Show correct line numbers for errors in an $(eval)
Bug: 264488559
Test: go test
Change-Id: I95ce0345912a2af351be0ecc4595bdc4a2047c0c
2023-01-05 11:22:46 -08:00
Paul Duffin
58f7784e95 Merge "Stop changes to BAZEL_METRICS_DIR regenerating ninja file" 2023-01-05 18:02:10 +00:00
mattgilbride
69f04a150c Configure ObsoleteLintCustomCheck lint as fatal
Lint raises an issue ObsoleteLintCustomCheck if it detects
incompatibilities between a custom lint check jar and the lint api
itself.

This is a warning by default, but in AOSP it should be fatal.
Any custom checks are expected to run. If they don't, there is risk
of introducing bugs.

ObsoleteLintCustomCheck will now cause build breakage so that it will
be investigated immediately.

Bug: N/A
Test: TH
Change-Id: I3a46c93d5b53ee0e1add7c287af791bd1b41f1c1
2023-01-05 17:44:24 +00:00
Mark Dacek
92297f21a3 Merge "Rename proto field." 2023-01-05 16:15:07 +00:00
Treehugger Robot
c00d91df96 Merge "Run ckati step of the Android build tracing given variables" 2023-01-05 05:21:56 +00:00
Spandan Das
85333078aa Merge "Revert "R8/D8 should use sdk_version prop to determine API surface stability."" 2023-01-05 02:24:16 +00:00
Spandan Das
7eb9243fa7 Revert "R8/D8 should use sdk_version prop to determine API surface stability."
This reverts commit daa220ae8c.

Reason for revert: Suspected to be a cause for build failure (b/264446640). Will use go/abtd to verify

Change-Id: Ibfdf893f2426b1119923467027e0acedd08808c1
2023-01-04 22:14:59 +00:00
Alix Espino
d363771bc1 Merge "Libs support for * -> java_library_edge with kt sources" 2023-01-04 22:11:55 +00:00
MarkDacek
a3a62a37b4 Rename proto field.
Test: N/A
Change-Id: I97dd3bc26afcbef4ad69cb7a3cbad73bf34b5fe6
2023-01-04 22:04:44 +00:00
Cole Faust
49dd3d583e Merge "Fix missing test name after aosp/2372150" 2023-01-04 21:50:30 +00:00
Cole Faust
da5e739628 Merge "Use WriteFileRule instead of custom echo commands" 2023-01-04 19:40:26 +00:00
Cole Faust
0cec5ea146 Fix missing test name after aosp/2372150
The test name defaulting to ctx.ModuleName() was
accidentally removed, readd it

Bug: 184895128
Fixes: 264423240
Fixes: 264433459
Test: Verified ninja files produced with this cl and aosp/2372150 are the same as with aosp/2372150 reverted
Change-Id: I23ab8ab39132b93719cc6f797d92b1cabce5eae9
2023-01-04 11:24:28 -08:00
Zi Wang
9f609db46a Add variant_prepend support for all the properties in bp2build
This is a follow up of aosp/2336916. All the properties that have
variant_prepend tag are supported in bp2build.

Bug: 261644490
Test: TH and modified tests with updated expected behaviors
Change-Id: I13bb5d4d8fcd38bf153fa9083c9c945aec2dfa19
2023-01-04 11:19:50 -08:00
Sasha Smundak
648e32c341 Run ckati step of the Android build tracing given variables
Test: `m nothing && build/soong/scripts/run-ckati.sh FOO BAR`, see FOO
and BAR assignments in out/ckati.trace

Change-Id: Ife8bb6d716bfde5ee9f75b85b1e5738ab2238dce
2023-01-04 10:08:43 -08:00
Cole Faust
94682b23c4 Merge "Allow adding extra tradefed options in the Android.bp file" 2023-01-04 17:30:38 +00:00
Treehugger Robot
f038e067ee Merge "R8/D8 should use sdk_version prop to determine API surface stability." 2023-01-04 17:04:00 +00:00
Usta (Tsering) Shrestha
253171b016 Merge "Use comma not pipe in switch-case" 2023-01-04 15:43:57 +00:00
Paul Duffin
184366a18f Stop changes to BAZEL_METRICS_DIR regenerating ninja file
Bug: 262738679
Test: BAZEL_METRICS_DIR=dir1 m nothing
      BAZEL_METRICS_DIR=dir2 m nothing
      # Make sure that the second does not regenerate the ninja file.
Change-Id: If30f13eee5d27d902c894af04af38078f437b6df
2023-01-04 10:55:20 +00:00
Mark Dacek
d1bc69d5dd Merge "Add upload-only mode and manual build-started-time flag." 2023-01-04 00:18:07 +00:00
Spandan Das
daa220ae8c R8/D8 should use sdk_version prop to determine API surface stability.
`min_sdk_version` is used to represent the api_level of the device and
its type will eventually become android.ApiLevel. OTOH,
`sdk_version` property represents the API surface a module builds against
_and_ the version of that API surface. For
R8/D8, the additional `--android-platform-build` should be determined
using the sdk_version of the soong module and not min_sdk_version, since
min_sdk_version will not contain information about the api surface used
for compilation.

The unit test for `core_platform_app` in TestR8 were passing since
min_sdk_version was not set, and therefore it implicitly defaulted to
sdk_version.

Also created a custom struct to propagate params to the helper dex
functions

Test: In build/soong, go test ./java
Test: TH
Bug: 208456999
Change-Id: I08ac6f496444d603557e498c8a1794af665abc7a
2023-01-04 00:16:45 +00:00
Joe Onorato
fa5fc26ce2 Move common functions to script_utils.sh
Test: m
Bug: 260003429
Change-Id: Iac401eeaf97c904ea751583bf80091d50526f695
2023-01-03 14:50:36 -08:00
Cole Faust
a734749148 Use WriteFileRule instead of custom echo commands
These instances could use WriteFileRule instead of
making their own shell code to write a file.

Test: Presubmits
Change-Id: I9c809b2164a68b4ce1c22fbbd0d7497240110b39
2023-01-03 14:42:23 -08:00
Vinh Tran
55225e343d Remove apex_available tag in cc_library_static generated from stubs-providing lib
When a cc library has stubs, its static variant shouldn't be included in an apex to ensure the library with stubs isn't statically linked. See https://cs.android.com/android/platform/superproject/+/master:build/soong/apex/apex.go;l=2804;drc=89b01aeaa9e19377ff547baab791277719b8aaf3

This CL modifies bp2build so that it excludes apex_available tag from the static target if the library has stubs. This way, we can ensure that no apex can depend on the static target which results to static linking.

Test: go test
Bug: 255589949
Change-Id: Iedf248994b808436f2440570b094fd06d6284ae9
2023-01-03 21:44:07 +00:00
Usta Shrestha
7fae695336 Use comma not pipe in switch-case
brings down time to complete by 40%

Bug: NA
Test: m queryview and m soong_docs
Change-Id: I3681e2f5015fc1f5cabaf0462d4d52a4fe9db56c
2023-01-03 21:24:18 +00:00
Cole Faust
216805457c Allow adding extra tradefed options in the Android.bp file
Some tests need to add custom tradefed options, but still want to
keep most of the soong autogenerated tradefed xml file.

Expose a test_options: { tradefed_options: [...] } property that
will allow tests to add more options to the autogenerated xml file.

Fixes: 184895128
Test: go test, and verified that the ninja files did not change for aosp_arm64
Change-Id: I50d4ad139322e9e207202f1e1a50f5bbb424aa6f
2023-01-03 12:47:11 -08:00
Trevor Radcliffe
2266e02a3a Merge "bp2build conversion for Sanitize.Integer_overflow" 2023-01-03 18:30:46 +00:00
Nikita Ioffe
22f8b3d9bc Merge "Run host_init_verifier when building filesystem" 2022-12-30 11:53:56 +00:00
Trevor Radcliffe
db7e0263f4 bp2build conversion for Sanitize.Integer_overflow
and Sanitize.Misc_undefined.

This is a redo of aosp/2277186 with changes to account for issues
in mixed builds. Specifically, for now we're disabling mixed builds
for modules that use ubsan. This bug tracks enabling it:
b/261058727.

Bug: 253428057
Test: Unit tests
Change-Id: Ia1277a7fa9a82f40998d7f3d2c40ea90f38201e7
2022-12-29 21:21:23 +00:00
Spandan Das
87c149dccb Merge "Create (API) bp2build converters for droidstubs" 2022-12-29 17:58:45 +00:00
Zi Wang
60adbe233e Merge "Add variant_prepend test for cc_library" 2022-12-29 17:58:04 +00:00
Treehugger Robot
bb258f4a6d Merge "Don't add dexpreopt compat deps to android_library modules" 2022-12-29 02:49:42 +00:00
Spandan Das
4ac2aed136 Create a "Toolchain" API surface
This creates a new API surface for the APIs provided by ART to compile
other API domains (e.g. this contains LambdaMetaFactory). The scope of
this API surface is restricted to compile-time. Unlike the other API
surfaces (e.g. public) whose APIs will exist on device in the form of
implementation libraries, these classes are not guaranteed to exist on
device.

This also updates the naming convention map used in Multi-tree API
export

Bug: 261244752
Test: TH
Change-Id: I164714d68618a3c289bac1a695958e36fdbbda5d
2022-12-28 23:58:55 +00:00
Spandan Das
0b555e323b Create (API) bp2build converters for droidstubs
- The converter runs for api_bp2build, not bp2build workspace
- Since droidstubs is an internal module created by java_sdk_library,
  the conversion encompasses the latter as well
- Since droidstubs do not have an api_surface attribute, this conversion
  uses naming convention to infer the api_surface represented by the api
  file e.g. *stubs.source -> publicapi, *stubs.source.system -> systemapi)
- Also adds an SdkIntraCore enum to represent the API surface provided
  by one core module to another

There is also ongoing work to check in java_api_contribution modules in
Soong. Once we have that, we can update this converter to operate on
that module type instead

Test: go test ./bp2build
Change-Id: Ia85828e04c738d9ffcc524856d7c3034ee29bbf9
2022-12-28 23:58:52 +00:00
Zi Wang
0f82844b75 Add variant_prepend test for cc_library
The comments in aosp/2336916 are also addressed here

Test: TH and TestCcLibraryVariantPrependPropOrder
Change-Id: If1472658fcd4b5544dec2e2691049a180520c84e
2022-12-28 11:18:11 -08:00
Hsin-Yi Chen
8feb41392a Add header_abi_checker properties for vendor, product, and platform
The developers can apply different configurations to vendor, product,
and platform libraries. In LSDUMP_PATHS_FILE, the vendor and product
variants are tagged with VENDOR and PRODUCT. Their ABI dumps will not be
generated in the directories under prebuilts/abi-dumps.

Test: make libutils.vendor libutils
Bug: 227282691
Change-Id: I747ceb174a070a67d592c5a47fcc848a6129661d
2022-12-28 18:50:38 +08:00