Commit graph

7778 commits

Author SHA1 Message Date
Justin Yun
08270c6c2d Disable sanitizer for vendor_snapshot_object modules
vendor_snapshot_object modules do not provide sanitizers.
Avoid sanitizer mutation for these modules.

Bug: 234772527
Test: build against the vsdk with SANITIZE_TARGET=hwaddress
Change-Id: Ib4fe4def673aa77a4321f47c09393adcb2fa2964
2022-12-19 23:04:08 +09:00
Justin Yun
8814fc5c20 VSDK: capture hwasan static libs for vsdk snapshot build
When generating vsdk snapshot with SANITIZE_TARGET=hwaddress option,
include hwasan static libraries to the vendor snapshot.

Bug: 234772527
Test: build against the vsdk with SANITIZE_TARGET=hwaddress
Change-Id: I6fdecefaa8557b5c968745487a3ed7c959e682f9
2022-12-19 17:18:22 +09:00
Kevin Dagostino
32edd1a608 Add tradefed attributes to cc_test bazel macro
The BUILD file will now have the needed attributes to run the tradefed
test rules.

Test: b test //packages/modules/adb:adbd_test --platforms=//build/bazel/platforms:android_target
Change-Id: I5cb84ccdde27a7fadbef479269df594344a29187
2022-12-18 04:38:16 +00:00
Treehugger Robot
2731ca8377 Merge "Allow adding extra tradefed options in the Android.bp file" 2022-12-17 03:40:01 +00:00
Treehugger Robot
841fc797c1 Merge "Enable -Wno-xor-as-pow for external code." 2022-12-15 22:21:35 +00:00
Treehugger Robot
0bf1ff9fe1 Merge "Add Soong test to verify runtime_deps doesn't have afdo variant" 2022-12-15 18:12:56 +00:00
Vinh Tran
9c6080cc4b Add Soong test to verify runtime_deps doesn't have afdo variant
Test: go test
Change-Id: If6ef4f5ee529b322a251b11ebdceca4bbcacdd63
2022-12-15 15:31:31 +00:00
Krzysztof Kosiński
af32e1ba3f Enable -Wno-xor-as-pow for external code.
Bug: 145211022
Test: presubmit
Change-Id: I025842df61cfd3657b21159fe4c05da857043a4c
2022-12-14 22:38:51 +00:00
Sam Delmerico
5a67ad19da Merge "add APEX transitive dependency validation" 2022-12-14 15:40:47 +00:00
Jingwen Chen
90fff77810 Merge "Fix "--version_script" typo in doc." 2022-12-14 12:38:24 +00:00
Treehugger Robot
1f9ca39a5a Merge "Remove linkerconfig from bionic list." 2022-12-14 07:16:13 +00:00
Treehugger Robot
7853388422 Merge "Add arch variants for Intel Atom CPUs" 2022-12-14 03:32:13 +00:00
Yabin Cui
4abd2ca5b4 Merge "Update clang version to clang-r475365b" 2022-12-13 21:35:04 +00:00
Sam Delmerico
eddd3c0ba4 add APEX transitive dependency validation
Bug: 218419109
Test: b build //packages/modules/adb/apex:com.android.adbd
Change-Id: I93b0c99d6521e419e52c63271646448f6d708c22
2022-12-13 14:32:19 -05:00
Treehugger Robot
6441a125cf Merge changes from topics "bp2build_cc_object_dynamic_deps", "bp2build_cc_prebuilt_object"
* changes:
  Add support for headers from dependencies to bazel cc_object
  Add bp2build support for cc_prebuilt_object
2022-12-13 16:25:58 +00:00
Jooyung Han
bff7335056 Remove linkerconfig from bionic list.
Note that the list is used to install symlinks to com.android.runtime
and also install "bootstrap" copy in subdir.

We don't need bootstrap/linkerconfig since linker itself provides a
default config for those early processes.

This removes both symlink and bootstrap copy from /system.

Bug: 260982509
Bug: 262330207
Test: MicrodroidAppTest
Test: vm run-microdroid
Change-Id: I7c62db96bd3acc91214340d4beed9b561ff6663f
2022-12-13 18:29:44 +09:00
Jingwen Chen
b582e61a31 Fix "--version_script" typo in doc.
The linker flag is --version-script.

Change-Id: I3bc66e848cc27ca6eebc004c662152faef6f8076
Test: N/A
Bug: 257226023
2022-12-13 06:53:08 +00:00
Vinh Tran
6916999cd0 Merge changes from topic "afdo-in-cc-rules"
* changes:
  Change out path to android_target-opt in bazel integration tests
  Add check for handcrafted BUILD file in bp2build
  Add bp2build conversion to reference to fdo_profile targets
2022-12-13 00:12:03 +00:00
Treehugger Robot
331360e7d6 Merge "Add support for variant_prepend properties in bp2build for cc library" 2022-12-12 22:46:33 +00:00
Trevor Radcliffe
8e360f1119 Merge "Revert "bp2build conversion for Sanitize.Integer_overflow"" 2022-12-12 18:47:57 +00:00
Yabin Cui
8e6aeb7682 Update clang version to clang-r475365b
Bug: 253033919
Test: build

Change-Id: Id0fc8e1b135c9478b73d0e0cb5a249c5bd3474ea
2022-12-12 10:02:04 -08:00
Vinh Tran
bc9c8b494c Add check for handcrafted BUILD file in bp2build
ag/20469925 added a handcrafted BUILD file (allowlisted in ag/20597986)
to internal master. ag/c/platform/build/soong/+/20583593/12/cc/bp2build.go#818 generates references to the targets in the BUILD file. However in tm-dev, the BUILD file doesn't exist while the .afdo files do.

One solution is to cherry-pick the BUILD file to tm-dev. However, tm-dev doesn't have vendor/google/build/soong/bp2build_allowlist.go to check in the BUILD file in bp2build.

This CL adds a check that the BUILD file exists to avoid the failure as in https://android-build.googleplex.com/builds/pending/P45724500/aosp_cf_x86_64_phone-userdebug/latest/view/logs/build_error.log in tm-qpr-dev-plus-aosp branch.

Bug: 253540178
Test: go test
Change-Id: I47fb853015ca230afe3cefe1d37728bf714624be
Merged-In: I47fb853015ca230afe3cefe1d37728bf714624be
2022-12-12 12:17:49 -05:00
Vinh Tran
99270ea3c3 Add bp2build conversion to reference to fdo_profile targets
The fdo_profile targets are handcrafted in ag/20469925. Bp2build creates fdo_profile attribute on cc_library_shared and references to the fdo_profile target if the profile exists. This works under assumption that all afdo profiles have an associated Bazel fdo_profile target declared in the same folder/package.

As noted in b/253540178, this won't work when we check in the BUILD files (which is likely 6+ months away) because some profiles might only exist internally but not in AOSP. We will implement a long-term solution once we figure out all the requirements we need to support afdo both in Soong and Bazel.

Bug: 253540178
Test: go tests
Change-Id: Iebd5dd7a76583b4b2bf0d9ee56d58f247d313a54
Merged-In: Iebd5dd7a76583b4b2bf0d9ee56d58f247d313a54
2022-12-12 12:16:43 -05:00
Zi Wang
1cb11800f7 Add support for variant_prepend properties in bp2build for cc library
Some properties in soong are marked "variant_prepend", which means
in bp2build output, variant properties(select ...) should come before
general properties.
Prepend property is added in StringListAttribute
stuct so that bp2build can handlle variant_prepend properly, if
Prepend is properly set in different module logics.
This change also coordinates cc library with Prepend.
Coordination with other module types will be in separate CLs.

Bug: 261644490
Test: TestCcLibraryHeadersSimple,
TestCcLibraryHeadersArchAndTargetExportSystemIncludes and TH

Change-Id: I3b61c491c54bbe91ba9aa2af9b4c84193c91ae7f
2022-12-09 16:41:23 -08:00
Cole Faust
8ec823cba1 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: I75f7eb002c8325ce7cdc76e12e76e16195320620
2022-12-09 15:23:26 -08:00
Colin Cross
65ebc429e0 Add support for headers from dependencies to bazel cc_object
The libc_musl_crt* cc_object modules use header_libs to add
headers to the search path.  Propagate static_libs, shared_libs
and header_libs to includes_deps.

Bug: 259266326
Test: TestCcObjectHeaderLib
Change-Id: I8db4d6886761426d3ece38c43ac868d3248f7a9f
2022-12-09 13:58:58 -08:00
Colin Cross
c5075e917e Add bp2build support for cc_prebuilt_object
Add bp2build support for cc_prebuilt_object to allow buiiding
musl crt objects that use prebuilt clang_rt.crtbegin and
clang_rt.crtend.

Bug: 259266326
Test: //extenral/musl:libc_musl builds
Change-Id: Ic2b0375bc6e7336d31c9e2cf51bdc2ea894185aa
2022-12-09 13:58:58 -08:00
Trevor Radcliffe
682bfb2923 Revert "bp2build conversion for Sanitize.Integer_overflow"
This reverts commit f82482db31.

Reason for revert: http://b/261935841

Change-Id: I8155c2b17c6052b734efea43be06b1099ffedd32
2022-12-09 20:39:12 +00:00
Trevor Radcliffe
4fb00eea27 Merge "bp2build conversion for Sanitize.Integer_overflow" 2022-12-07 15:47:37 +00:00
Trevor Radcliffe
3a69f93987 Merge "Add test that shared libs don't propagate ubsan rt" 2022-12-06 21:29:03 +00:00
Trevor Radcliffe
f82482db31 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: I9dbec1d99353f8cbe6751d5241283ab19592dc27
2022-12-06 20:13:21 +00:00
Spandan Das
d53878e2f0 Merge changes I5b4e5570,I1de4b322
* changes:
  Add an api_files property in java_api_library
  Use relaxed check for prebuilt src
2022-12-06 16:48:07 +00:00
Treehugger Robot
218468755d Merge "Add a build rule for opt-in ABI dumps" 2022-12-06 07:22:56 +00:00
Spandan Das
6830f6be7e Use relaxed check for prebuilt src
The source stub.so might not exist during Soong analysis in Multi-tree.
This will be provided by the build orchestrator in the combined ninja
execution.

Test: TH
Change-Id: I1de4b322fa8e456071630bf86c5fbaab063d44ba
2022-12-05 22:27:06 +00:00
Liz Kammer
c03724c442 Merge changes If7b81296,I3ddc53f0
* changes:
  Add more afdo testing
  Extend lto_test
2022-12-05 13:48:46 +00:00
Liz Kammer
3b8b7803a8 Merge "Disable misc ubsan Soong test on mac" 2022-12-02 18:06:22 +00:00
Yu Liu
3f32b38cfb Merge "Support abi check in mixed build." 2022-12-02 16:23:21 +00:00
Liz Kammer
8c8e8d5207 Add more afdo testing
Test: go test soong cc tests
Change-Id: If7b812962f5dfbf51c799225356862cbaea33e5d
2022-12-02 10:40:43 -05:00
Liz Kammer
81d0950934 Extend lto_test
Test: go test soong cc tests
Change-Id: I3ddc53f0984b7cd4b40ff17b1f93a9b4db62f94c
2022-12-02 10:39:43 -05:00
Liz Kammer
2a109bc820 Disable misc ubsan Soong test on mac
Test: run on mac build
Change-Id: I869775ce76fd619557bf6833f99c5b924bcc5a8e
2022-12-02 09:36:01 -05:00
Jingwen Chen
8ec23f846d Merge "Convert apex_available (for supported modules) to bazel tags." 2022-12-02 07:22:10 +00:00
Kiyoung Kim
62ed3dd5f8 Rename export_headers of cc_api_variant
Rename export_headers of cc_api_variant as export_include_dirs, because
the property only supports header directory.

Bug: 244244438
Test: Cuttlefish vendor build succeeded
Change-Id: I6e1468f51694150c70d3b0def2917f0ba74f7ea0
2022-12-02 10:31:48 +09:00
Treehugger Robot
a8ad378abc Merge "Remove workaround for -fexceptions and stack MTE" 2022-12-02 00:52:41 +00:00
Treehugger Robot
6721ab5d40 Merge "Allow hwasan variant for vendor_snapshot_static modules" 2022-12-02 00:27:22 +00:00
Treehugger Robot
5195178376 Merge "soong: add os name to cc_genrule" 2022-12-01 22:55:33 +00:00
Florian Mayer
06aca9b448 Remove workaround for -fexceptions and stack MTE
The upstream change was merged in https://r.android.com/2322236

Bug: 174878242
Change-Id: Ia23d4a9d6ef54ed2c286e0b1becec1f35df75160
2022-12-01 14:23:23 -08:00
Liz Kammer
f843436455 Merge changes Ia165e4be,I63fe74fb
* changes:
  Update sanitize to not modify user properties
  Extend sanitize_test.go
2022-12-01 22:10:18 +00:00
Treehugger Robot
b8ae9cd936 Merge "Limit propagating san config of shared to fuzzer" 2022-12-01 20:33:50 +00:00
Patrick Rohr
5307b3c790 soong: add os name to cc_genrule
While converting from gn to bp we stumbled upon genrules that have different cmd's for different targets. cc_genrule supports different architectures, but it does not give us any information about the OS types (some genrules are use for both host and android targets).

Change-Id: Ida531ad8b59d87a91d6faedbfe8fee9f75640bd1
Test: TH
2022-12-01 20:01:03 +00:00
Yu Liu
24214aacc2 Support abi check in mixed build.
Bug: 253498204
Test: Manual tested.
Change-Id: I451a6109a2a7efa24bafc860b7b757e23fde09e1
2022-12-01 10:59:06 -08:00