Commit graph

7946 commits

Author SHA1 Message Date
Yi Kong
29ff4182f5 Merge "Update clang version to clang-r487747" 2023-03-01 05:02:15 +00:00
Joe Onorato
442b6fc701 Remove OWNERS access for non-build team people to core build system
Test: treehugger
Change-Id: I0c318ddd7d78110327bbd849ed9aa3973c86de5d
2023-02-28 19:29:47 -08:00
Cole Faust
18994c73f1 Replace SortedStringKeys with SortedKeys
Now that we have generics.

Bug: 193460475
Test: presubmits
Change-Id: I1594fd8feb505175d5c09c03ef397e5ffd5b09cb
2023-02-28 16:51:32 -08:00
Omar Eissa
fabd0dd8d3 Revert "Enable -Wformat-insufficient-args globally"
This reverts commit 49f09a3694.

Reason for revert: b/271045282

Change-Id: Ice56137c5567a38d15cc39f80497ce74bc18650f
2023-02-28 11:08:57 +00:00
zijunzhao
49f09a3694 Enable -Wformat-insufficient-args globally
Bug: b/191699019
Test: m
Change-Id: Ib71a422a7a1621c0994ea07a90fa9ab914fcc6fd
2023-02-27 22:55:01 +00:00
Kiyoung Kim
76b06f3973 Implement API surface import with APEX stub
Implement APEX stub of API surface so any stub can be replaced with API
surface when APEX stub interface is required.

Unlike other stub interface, APEX stub can be decided if it should be
used after APEX postdeps mutator analyzes which modules should be
included in which APEX. To cover this, APEX stub is being added to the
dependency if the dependency should not be covered with LLNDK or NDK
stub, and APEX stub exists. From depsToPaths, if dependency to both
original module and API library exists, then it choose one of the
dependency and ignore the other.

To cover this logic, a new property is added to the api_surface :
apex_libs. This is introduced as it is difficult to
gather all api library with apex stub before DepsMutator.

Bug: 264963986
Test: cf_x86_64_phone_vendor build succeeded
Change-Id: I9f0b1f70968e32eba94d3e0d7bb1f4bb29ff2438
2023-02-27 12:57:30 +09:00
Jooyung Han
8ecedd4dfc Merge "Prevent sdk variants from install" 2023-02-27 00:41:34 +00:00
Yi Kong
836690b593 Update clang version to clang-r487747
Test: presubmit
Bug: 264965700
Change-Id: I2db879f4dcc77b606c788b3e3890ed2a3faa6594
2023-02-23 20:49:59 +00:00
Yu Liu
995a3a192f Merge "Only apply apex transition to DCLA libs for now." 2023-02-23 02:16:19 +00:00
Yu Liu
89ce6bd127 Merge "bp2build of libraries with stubs should handle non-implementation deps" 2023-02-22 23:35:04 +00:00
Yu Liu
bfb2362cde Only apply apex transition to DCLA libs for now.
Bug: 270339610
Test: mixed_droid.sh
Change-Id: I6a8b7fdefeb504a25256e92647de9b487d5b65a3
2023-02-22 10:43:46 -08:00
Iavor-Valentin Iftime
a1e3a55810 Merge "Revert "Revert "Revert "Enable -Wformat-insufficient-args globally"""" 2023-02-22 10:22:40 +00:00
Iavor-Valentin Iftime
3251d4a6f0 Revert "Revert "Revert "Enable -Wformat-insufficient-args globally"""
This reverts commit c50ae9c6e2.

Reason for revert: b/270300283

Change-Id: I7da15937b200e707847bcf1403d4a7ac55c0822c
2023-02-22 10:18:51 +00:00
Treehugger Robot
ee8daaa689 Merge "Revert "Revert "Enable -Wformat-insufficient-args globally""" 2023-02-22 09:25:19 +00:00
Jooyung Han
54f780505d Prevent sdk variants from install
Platform variants should be available even when unbundled_build so that
unbundled build of com.android.virt apex can correctly have microdroid
image with system variants.

Bug: 268582372
Test: m (soong test)
Test: banchan com.android.virt aosp_arm64
      UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true m apps_only dist
      (microdroid should have the same contents)
Change-Id: I682e4f1f477f3024f7719dfaa67006ef335e0640
2023-02-22 13:45:49 +09:00
Zijun Zhao
c50ae9c6e2 Revert "Revert "Enable -Wformat-insufficient-args globally""
This reverts commit cc1d984d49.

Reason for revert: Fixed 
https://googleplex-android-review.git.corp.google.com/21522363

https://source.corp.google.com/h/googleplex-android/platform/superproject/+/tm-qpr-dev-plus-aosp:vendor/google/whitechapel/audio/hal/audio_hal/ext_module/amcs_ext/amcs_ext.c;l=266;bpv=1

Change-Id: I79ee06b720f1299ab02cb129baabb3c025c31483
2023-02-22 00:38:28 +00:00
Yu Liu
10174ff208 bp2build of libraries with stubs should handle non-implementation deps
Bug: 266724299
Test: Unit test and manual tests
Change-Id: I7d7641676fbf3d3fae413b27d329a4b05b1cd3bf
2023-02-21 12:07:07 -08:00
Yu Liu
e43124023c Support DCLA
Bug: 240424572
Test: Manual tests:
1. m --dev-mode-staging com.android.adbd com.android.media.swcodec.
2. verify the DCLA libs from the two apexes have the same size and
   sha1sum, and also match the libs in bazel-out.
3. empty the DCLA libs list in allowlist.go and repeat step 1
4. repeat step 2 and verify the opposite result
5. build git_master: mainline_modules_bundles-userdebug in ABTD
   with the cl, then follow go/build-sideload-dcla-locally to
   download the adbd and swcodec aab files, run the DCLA trimming
   workflow locally, and verify the symlinks in the two trimmed
   apexes are identical and also match the lib path in the DCLA
   apex that was created by the workflow.

Change-Id: Ib2f8a29126a54829c0e10eba17b256a79930fd70
2023-02-21 10:12:47 -08:00
Alex Márquez Pérez Muñíz Díaz Puras Thaureaux
01ec55ec92 Express no{,_lib}crt via features vs attrs
Given that we can map them directly to disabling the
corresponding Bazel features: `-{link_,use_lib}crt`

Test: Existing (adapted) Unit Tests
Test: bp2build.sh
Change-Id: Ib502f6fb929ace8e86a1001e3cc21f399317500c
2023-02-17 19:24:42 +00:00
Andrea Zilio
cc1d984d49 Revert "Enable -Wformat-insufficient-args globally"
This reverts commit af8b950357.

Reason for revert: Broke the build, see b/269687118

Change-Id: I6f7fac0e24c710bd00af77e4d96c845eefe0a9ce
2023-02-17 11:51:10 +00:00
zijunzhao
af8b950357 Enable -Wformat-insufficient-args globally
Bug: b/191699019
Test: m
Change-Id: I6349308d1f8b13e5c5d75b154e8c9b53d9eec4bf
2023-02-16 17:52:22 +00:00
Yi Kong
32a15c4269 Merge "Remove bug links for noOverrideExternalGlobalCflags" 2023-02-16 11:46:16 +00:00
Yi Kong
d80f6eebc9 Remove bug links for noOverrideExternalGlobalCflags
We are not going to fix these warnings for 3p projects, there is no
point keeping a bug link here.

Test: N/A
Change-Id: I1c2479d8919b1c1b10287e021827b78c52813585
2023-02-16 16:51:31 +09:00
Aditya Kumar
4c660ae58e Revert "Build riscv64 with thin LTO"
This reverts commit 17c9c2a5b5.

Reason for revert: Wait until new toolchain with linker fix las landed (https://android-review.git.corp.google.com/c/toolchain/llvm_android/+/2424081)

Change-Id: I05b14c12ac93182dd93c5b490f260071c6d3a090
2023-02-15 01:32:22 +00:00
Trevor Radcliffe
0620c7c56a Merge "Add test that LTO isn't propagated to runtime_libs" 2023-02-14 17:09:03 +00:00
AdityaK
17c9c2a5b5 Build riscv64 with thin LTO
Depends on: https://android-review.git.corp.google.com/c/platform/system/libhwbinder/+/2336346

Bug: b/254713216
Change-Id: Id750cab796ddf8c180fa0570e46cab0161788974
2023-02-13 21:42:30 +00:00
AdityaK
f7c0afdb6e Disable emulated tls for RISCV
Bug: b/267688421

Change-Id: I885bcf966db2e9a0a3edc1fee865b3cf9c6ff90a
2023-02-13 21:31:36 +00:00
Trevor Radcliffe
cb7c448066 Add test that LTO isn't propagated to runtime_libs
Bug: 261733821
Test: It is a test
Change-Id: I2cda89dc53d6eaa51c756f552d990169a280b053
2023-02-10 20:29:20 +00:00
Colin Cross
f5d42a206f Merge "Fix test so it works on mac" 2023-02-10 05:00:02 +00:00
zijunzhao
2863c0a40c Enable -Wnull-dereference globally
Bug: b/29823425
Test: m
Change-Id: I8d73cbc92b06829d8b937af262298d54c7697404
2023-02-09 19:05:09 +00:00
Trevor Radcliffe
e22f384f3c Fix test so it works on mac
Bug: 261733821
Test: The change is a test
Change-Id: I5cc15f642260b34d54840921941e6e56ef75d561
2023-02-09 19:01:31 +00:00
Yi Kong
aa0833a8fb Merge "Migrate to the new clang lib dir" 2023-02-08 20:29:17 +00:00
Trevor Radcliffe
41d0539715 Merge "Add test for LTO edge case" 2023-02-08 20:18:15 +00:00
Sam Delmerico
e413f4046f Merge "mixed build targets need transitive tidy files" 2023-02-08 20:11:30 +00:00
Ivan Lozano
e37e1578c1 Merge "Copy Rust fuzzer dependencies to /data." 2023-02-08 13:46:17 +00:00
Yi Kong
bd1888156a Migrate to the new clang lib dir
Test: presubmit
Change-Id: I7ac7eb415a5f5c3d8b6d9298c1b4ccf2839aaea6
2023-02-08 19:54:05 +09:00
zijunzhao
13b00771b6 A nit of code comment
This is not the correct bug link. It should be removed when enabling
-Wxor-used-as-pow in external. See: aosp/2356123

Bug: None
Test: None
Change-Id: I6bc1d35e07ed11fc0c70a625b0035348a6428678
2023-02-07 23:36:11 +00:00
Sam Delmerico
4ed95e263f mixed build targets need transitive tidy files
Previously in mixed builds, only the tidy files for the boundary module
were built, whereas all of its transitive dependencies' tidy files were
not being built. Instead we should export the list of transitive tidy
files for a module so that we can run clang-tidy for the boundary module
as well as its dependencies.

Bug: 195029134
Test: WITH_TIDY=1 DISABLE_ARTIFACT_PATH_REQUIREMENTS=true mss tidy-packages-modules-NeuralNetworks --bazel-mode-dev
Change-Id: I463646d2ae1fc4aa075a54c264e1c34571c3fd5c
2023-02-07 16:50:30 -05:00
Trevor Radcliffe
07cf4ed90d Add test for LTO edge case
This test confirms the behavior when LTO is disabled generally but
then enabled for a specific target.

Bug: 261733821
Test: Unit test
Change-Id: I415cd0146f2b83d85654239550d129f87e9001bc
2023-02-07 19:46:51 +00:00
zijunzhao
aeb73f8e57 Disable -Wformat-insufficient-args for external code.
Bug: 191699019
Test: presubmit
Change-Id: I8af5ccdca4078468d6de2f6212045875d7c6541b
2023-02-06 23:34:18 +00:00
Colin Cross
676e15a452 Merge "Use platform libc++ for riscv64 sdk variants" 2023-02-06 20:56:17 +00:00
Ivan Lozano
0f9963e9e4 Copy Rust fuzzer dependencies to /data.
Fix an issue where rust_fuzz modules were
not correctly packaging and copying their
dependencies.

This is done by extending the CC fuzz packager
to simply handle both Rust and CC modules,
ensuring this doesn't get out of sync again.
Fuzzer related functions are added to the
Linkable interface to facilitate this.

There was a bug where the Make definitions for
Rust fuzzers were not being created as well,
and that is addressed here.

Bug: 249551848
Test: m android_log_fuzzer #check $OUT/data/fuzz/arm64/libs
Change-Id: I9b41153e0cf08ab510476b75003c3a3baccc3858
2023-02-06 13:48:23 -05:00
Sam Delmerico
1978fdf9b2 Merge "clean up CL for androidmk variables" 2023-02-02 14:11:12 +00:00
Christopher Ferris
1f4ccd2ada Merge "HWAsan: Increase the malloc fill size." 2023-01-31 21:45:18 +00:00
Treehugger Robot
9bedfd0d4b Merge "Rename API surface provided to mainline modules" 2023-01-30 23:06:22 +00:00
Christopher Parsons
94f8a60f5d Merge "Fix nondeterminism in bp2build" 2023-01-30 22:58:17 +00:00
Chris Parsons
7b3289b471 Fix nondeterminism in bp2build
This fixes two main sources of nondeterminism:

1. Fix a bug in the ConfigurationAxis comparator (which caused
   ConfigurationAxis sorting to be nondeterministic)
2. Process C++ dependencies using the sorted ConfigurationAxis order. In
   theory, the order in which dependencies are processed shouldn't
   matter (as they should end up in different select stanzas). However,
   in the case of InApex stubs, this is not the case; we now ensure
   that lists are concatenated in a predictable order.

Added bonus: Some cleanup with SortConfigurationAxes which
makes use of go generics (this made it easier to debug this issue).

Will follow-up with regression tests.

Test: Manually verified that build.ninja checksum and BUILD.bazel checksums do not change after running `m nothing` 6 times in AOSP (with comment-only Android.bp changes in between each run)

Change-Id: I81168e45bdbbcd61ea95ff665cf6c4bc180aa4e0
2023-01-30 21:26:57 +00:00
Treehugger Robot
32c52ad62f Merge "convert cc_object crt property in bp2build" 2023-01-30 17:07:37 +00:00
Sam Delmerico
78aca80710 Merge "add androidmk cc-related variables to androidmk" 2023-01-27 21:04:29 +00:00
Sam Delmerico
5fb794ae37 clean up CL for androidmk variables
Change-Id: If14d1925bea78f467740f8395f1d529db00b618c
2023-01-27 16:01:37 -05: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
Treehugger Robot
6e7441edde Merge "Read ApexMkInfo for modules to be installed." 2023-01-27 15:45:08 +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
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
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
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
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
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
Sam Delmerico
3fad8ed0d1 convert cc_object crt property in bp2build
Bug: 263905692
Change-Id: I71e3fc4a42954c2d1f9f631d012949b81f4536de
2023-01-26 10:21:58 -05: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
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
Trevor Radcliffe
6f0aef34e8 Merge "Export sanitizer vars for use in Bazel" 2023-01-24 17:29:47 +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
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
Spandan Das
d623192eea Merge "Export system headers for SdkVariants as well" 2023-01-20 23:54:08 +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
Vinh Tran
f9754735f2 Delete __ANDROID_APEX_MIN_SDK_VERSION__ from Soong
Currently, Bazel sets __ANDROID_APEX_MIN_SDK_VERSION__ based on the cc library's min_sdk_version while Soong does based on apex's min_sdk_version. This causes a diff in the clang commands.

Digging further, we realized __ANDROID_APEX_MIN_SDK_VERSION__ isn't used anywhere so we might just delete it altogether instead of fixing it.

Bug: 265134933
Test: presubmit
Change-Id: I08e89dc8f6ef86669248ea5c47de6603e9d2ffbb
2023-01-20 00:14:48 -05:00
Spandan Das
934c97da5e Add documentation about the purpose of #apex and #symbols in map.txt
Currently we document the semantics of these two symbols. I would like
to add some documentation about why this granularity is necessary. The
majority of the details are contained in b/191371676

Test: N/A (documentation change)
Bug: 265485106
Change-Id: I752c921eabceff94f92f24a46c9a16dc28a2af19
2023-01-19 18:56:06 +00:00
Trevor Radcliffe
3a79caa3b9 Merge "Add musl defaults in bp2build" 2023-01-19 16:01:04 +00:00
Spandan Das
98c000ae43 Export system headers for SdkVariants as well
This code block exists for LLDNK code path (m.UseVndk()...), but was
missing from NDK code path (m.IsSdkVariant())

Test: TH
Change-Id: Ib156d14a6f013c88499a0641dbb547c632357362
2023-01-18 19:50:53 +00:00
Cole Faust
a905aba595 Remove cflag_artifacts.go
The artifacts it produces are no longer used.

Bug: 262629589
Test: m nothing
Change-Id: Ie9a23310bd6468cfc0b692424f43bf5c16577aee
2023-01-17 15:35:42 -08:00
Cole Faust
57f70c03cd Merge "Use WriteFileRule in cflag_artifacts" 2023-01-17 23:28:21 +00:00
Cole Faust
baa24a2077 Use WriteFileRule in cflag_artifacts
Most of the complexity in cflag_artifacts can be avoided
by using WriteFileRule.

Bug: 262629589
Test: m out/soong/cflags/module_cflags-Wall.txt
Change-Id: I5b0a678c24609f7b187c9fb8e5fcae7f89adf59c
2023-01-13 15:16:19 -08:00
Yi Kong
df456b5f33 Suppress misc-use-anonymous-namespace clang-tidy warning
This is a new warning introduced in clang-r484482.

Test: presubmit
Bug: 265438407
Change-Id: Ic31e0dac5aee3214e21bad41f2e6e3505daabe2c
2023-01-13 18:07:37 +00:00
Treehugger Robot
002254731f Merge "Make LLVM_NEXT extra cflags no override" 2023-01-13 01:00:17 +00:00
Colin Cross
4a25e78f52 Merge "Use the same rpaths for tests and binaries and cc and rust" 2023-01-12 23:14:46 +00:00
Yi Kong
60a2010415 Make LLVM_NEXT extra cflags no override
Test: m nothing
Change-Id: I2cf7ab1dcc9cb23298c45b6bf38f8ecc2a9d951e
2023-01-13 04:40:18 +09:00
Sasha Smundak
39a301c963 Clean up mixed builds module names filtering
* Remove `Bp2buildCcLibraryStaticOnlyList` it is never set
* Remove the rest of the sutff related to it
* Streamline MixedBuildsEnabled
* Rename BazelContext.BazelAllowlisted to BazelContext.NameFilter
  to reflect its action
* Rename bazelContext to mixedBuildBazelContext
* Fix minor warnings from Go static analyzer

Test: treehugger
Change-Id: Ie245c992f94bbfd5c7c23dd06917026200a28263
2023-01-12 00:32:45 +00:00
Colin Cross
225a37a7f0 Use the same rpaths for tests and binaries and cc and rust
Rust and cc binaries currently use $ORIGIN/lib64:$ORIGIN/../lib64 as the
rpath, and cc tests add $ORIGIN/../../lib64:$ORIGIN/../../../$ORIGIN:$ORIGIN.
This causes problems when a binary is included as test data in
out/host/linux-x86/testcases/<test dir>/<CPU>/<test>, as the
binaries can't find the libraries in out/host/linux-x86/lib64.

Use the same rpath for test and binaries, and for cc and rust.

Bug: 264604160
Test: m USE_HOST_MUSL=true out/host/linux-x86/testcases/acpi_tables_test_src_lib/x86_64/acpi_tables_test_src_lib && out/host/linux-x86/testcases/acpi_tables_test_src_lib/x86_64/acpi_tables_test_src_lib
Test: m USE_HOST_MUSL=true out/host/linux-x86/testcases/gen_sdk_test/x86_64/gen_sdk_test && out/host/linux-x86/testcases/gen_sdk_test/x86_64/toybox
Change-Id: I10fe5dc0de01d1f3c6aea8dbabbf60edab5989c3
2023-01-11 16:04:19 -08:00
Trevor Radcliffe
0d1b4029b8 Add musl defaults in bp2build
Bug: 261657184
Test: Unit Tests
Test: Manual Inspection of generated files
Change-Id: I69864abb410fddecd530fc75f2531aff33b33c97
2023-01-11 18:43:20 +00:00
Vinh Tran
57b1e4064b Merge "Remove apex_available tag in cc_library_static generated from stubs-providing lib" 2023-01-10 15:30:11 +00:00
Zi Wang
709c59b2df Merge "Add variant_prepend support for all the properties in bp2build" 2023-01-10 05:54:29 +00:00
Treehugger Robot
4520481c6a Merge changes I07db8afc,Ia89e0239
* changes:
  Stop module types being SdkAware
  Replace usages of SdkAware in sdk module with Module
2023-01-07 14:46:22 +00:00
Hsin-Yi Chen
8a5d4126a2 Merge "Add header_abi_checker properties for vendor, product, and platform" 2023-01-07 07:35:49 +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
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
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
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
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
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
Jooyung Han
f7562aee8b Merge changes from topic "dup-check-in-apex"
* changes:
  apex_vndk doen't need stub variants
  Check for duplicate bundled files from different modules.
2022-12-28 01:45:27 +00:00