Commit Graph

7431 Commits

Author SHA1 Message Date
Martin Stjernholm
611e140043 Reduce code duplication for testing the two header modules.
Preparation for adding more tests to them.

Test: m nothing
Bug: 202192894
Change-Id: Ica29c649c4669e821371fbf8360f437871b7d041
2021-12-01 16:04:34 +00:00
Liz Kammer
46fb7aba4d Support empty strings in bp2build
Previously, could not set an empty string as a value of an attribute;
however, this is necessary in some cases. To not unnecessarily create an
empty string, use string pointers for attributes rather than strings.

Test: go test bp2build tests
Change-Id: I03b3a3567452d455246d22d81f86c317d06b7c39
2021-12-01 10:14:49 -05:00
Florian Mayer
77d0035a07 Revert "Enable hwasan use after scope detection."
This reverts commit 753dd32123.

Reason for revert: Broke hwasan postsubmit and https://r.android.com/1906006 does not seem to fix it. Reverting while investigating.

Change-Id: I0033314ac936e7062dc785b3b362ead0b5e9d8f0
2021-12-01 02:31:45 +00:00
Chih-Hung Hsieh
5b72153646 No NDK libraries in clang-tidy pathDeps
Bug: 208310402
Test: WITH_TIDY=1 make tidy-soong
Change-Id: I530fc23a1f6215b8c7f8f2bfcb235d6f58c2a702
2021-11-30 17:31:23 -08:00
Florian Mayer
8362131259 Merge "Enable hwasan use after scope detection." am: 413da04189 am: 06ca0a8871 am: 695c537a25 am: 4b76f726c2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1894675

Change-Id: I39d5a72d28dc0f26de8606714d41faf47b2cf44e
2021-11-30 19:35:31 +00:00
Florian Mayer
413da04189 Merge "Enable hwasan use after scope detection." 2021-11-30 18:36:48 +00:00
Christopher Parsons
7b09baa54e Merge "bp2build implementation for c_std" am: 93c3cb69bc am: cd37948bf8 am: 640ecbcd91 am: c604da7467
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1905394

Change-Id: Ifda5afbaaad8b8ac49c8bb61c3d9bacaa7c7da10
2021-11-30 16:52:47 +00:00
Chris Parsons
79bd2b7761 bp2build implementation for c_std
Test: mixed_droid in conjunction with topic changes
Change-Id: Ic673c1b269f5082b490b32057eb60f3b73eb0940
2021-11-29 18:38:31 -05:00
Martin Stjernholm
fb7001e078 Merge "Fix prebuilt selection logic for cc_prebuilt_library_headers." am: a3ee4aadce am: 7867136695 am: c18029760a am: 0ba4875b63
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1900779

Change-Id: Iede62859e9938111c97cdf9b37d917bb341a8cc8
2021-11-26 12:07:31 +00:00
Martin Stjernholm
e65c3aee02 Fix prebuilt selection logic for cc_prebuilt_library_headers.
Unlike other prebuilt modules it doesn't have a srcs property of any
kind, so android.Prebuilt cannot defer to the source module just
because its srcsSupplier would return nil.

Test: m nothing
Bug: 202192894
Change-Id: Iafcf165569bad6eae37820cf71aa0fcacb720e02
2021-11-24 20:48:04 +00:00
Jingwen Chen
17615f8419 Fix bp2build select generation for inter-attribute soong config am: 58ff6801f4 am: d4c0c1fc12 am: 19de6d49ea am: c71a9482c5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1894968

Change-Id: I742ff28ab3c601571d6fbe38d76e0274a8713119
2021-11-23 12:46:21 +00:00
Jingwen Chen
58ff6801f4 Fix bp2build select generation for inter-attribute soong config
variable usage.

There's bug a in the current soong_config_variable handling
implementation where a soong_config_variable sets conditions_default
value for an attr, and a non-conditions_default value for another attr.
This results in the former attr not properly setting the zero value for
the non-conditions_default select key, resulting in the pretty printer
omitting the attribute totally.

The current implementation in this CL ensures that the zero value is set
whenever this happens at the module level. This is seen in
library_linking_strategy_cc_defaults (see comments in code, and the new
tests)

Test: CI
Bug: 198556411

Change-Id: Ibaeb94508c51a7429fb7a08df610cbb5470f76d2
2021-11-23 08:37:30 +00:00
Jack Yu
facd3ef423 Merge "Support for OMAPI Vendor stable interface" am: bc07b0c67e am: 87bf97ac19 am: 1eecb9e3aa am: 9438c79bb0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826613

Change-Id: I182b8dd5d8190442ca469d3f4adb934fbf69eeec
2021-11-23 06:00:30 +00:00
Jack Yu
bc07b0c67e Merge "Support for OMAPI Vendor stable interface" 2021-11-23 04:54:02 +00:00
Jooyung Han
4a8f41081e Set min_sdk_version (system/core)
Many modules requiring min_sdk_version have been used without setting
it, but hard-coded in allowlist.

Bug: 158059172
Test: m
Change-Id: Ibb09ddfdb11df0791a28eb8a0a49f1780084fd95
2021-11-23 11:10:38 +09:00
Treehugger Robot
dfde3607d0 Merge "Revert "Revert "Switch to clang-r437112""" am: 3eb75a72a0 am: d9618f7e75 am: 52886846f7 am: d762ac2769
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1895919

Change-Id: Ie269502775f3a43c3e78602e5320e588c0d03890
2021-11-22 23:21:08 +00:00
Treehugger Robot
3eb75a72a0 Merge "Revert "Revert "Switch to clang-r437112""" 2021-11-22 22:07:06 +00:00
Chih-hung Hsieh
933e7014da Revert "Revert "Switch to clang-r437112""
This reverts commit 1973f4d2cc.

Reason for revert: try to fix the failed test

Change-Id: I70b6e32d45db9e272432c85233cbf38e1e38a6ad
Bug: 201432564
2021-11-17 22:53:25 +00:00
Florian Mayer
753dd32123 Enable hwasan use after scope detection.
Test: flash & boot flame_hwasan-userdebug
Test: run parts of CTS on flame_hwasan-userdebug

Bug: 184289082
Bug: 172507966
Change-Id: I520bf57df57df45a63bc06a47462d6dc9a541828
2021-11-17 19:55:55 +00:00
Treehugger Robot
7fa2f52328 Merge "Revert "Switch to clang-r437112"" am: 88560585be am: f27ed4b546 am: 55db5f79fb am: 3d8a436898
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1895137

Change-Id: I497fbf2bcb47d09e35aaaec784b960f94f69a56f
2021-11-17 16:44:43 +00:00
Treehugger Robot
88560585be Merge "Revert "Switch to clang-r437112"" 2021-11-17 15:23:44 +00:00
Martin Stjernholm
1973f4d2cc Revert "Switch to clang-r437112"
This reverts commit 0d58894613.

Reason for revert: Suspected culprit for test failure b/206716119

Change-Id: Ibdd0aa783e07df5b41fd804efd175c12a7fe6592
2021-11-17 12:23:49 +00:00
Treehugger Robot
0be84e3b55 Merge "Switch to clang-r437112" am: 6515910b4f am: 24c800dd23 am: a2f81a3e5f am: a8dff4e750
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1885449

Change-Id: I393f2e9091258f0b1883f1eb2cff7bb043b3723e
2021-11-17 00:03:32 +00:00
Treehugger Robot
6515910b4f Merge "Switch to clang-r437112" 2021-11-16 23:03:07 +00:00
Chih-Hung Hsieh
0d58894613 Switch to clang-r437112
* to test with build 7917927

Bug: 201432564
Test: make
Change-Id: Ic21f76f238abb2727e559ece41fd6cc76fb69f85
2021-11-16 18:18:08 +00:00
Ivan Lozano
1bf9837099 Merge "rust: Add Recovery Snapshot Soong tests for rust." am: aed0adfee9 am: d6e91ece1b am: 7f48e65c1a am: 725c0aef00
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1886523

Change-Id: If7501681123acac56ab2086e1eee4ffc220e2a49
2021-11-16 14:56:42 +00:00
Ivan Lozano
d90fa476aa Merge "rust: Add data_libs and data_bins to rust_test" am: b993a835c3 am: 1966b6156d am: 95e1c5db24 am: 073a95efe9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1883189

Change-Id: I5ac194f8a43c07893c9e0fc37da3dc09e9a83291
2021-11-16 14:56:33 +00:00
Ivan Lozano
aed0adfee9 Merge "rust: Add Recovery Snapshot Soong tests for rust." 2021-11-16 13:47:18 +00:00
Ivan Lozano
b993a835c3 Merge "rust: Add data_libs and data_bins to rust_test" 2021-11-16 13:46:49 +00:00
Treehugger Robot
1b67dc3177 Merge "Refactor ProductConfigProperties to use a struct key instead of an string key with hardcoded patterns." am: 59a5cb072b am: 7f98f45ff8 am: b8dc51a5cc am: 501f02c3d0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1892222

Change-Id: I6f52e72d08dd18a2edd2aa695b94211caddce7cd
2021-11-16 05:55:00 +00:00
Treehugger Robot
59a5cb072b Merge "Refactor ProductConfigProperties to use a struct key instead of an string key with hardcoded patterns." 2021-11-16 04:55:15 +00:00
Jingwen Chen
25825ca08d Refactor ProductConfigProperties to use a struct key instead of an
string key with hardcoded patterns.

This fixes a bug with label list conditions_default attrs where the
attribute values get clobbered in a map with the keys
"conditions_default" (with a default empty list) and
"acme__feature__conditions_default" (with a non-empty list) when
generating the LabelListAttribute.

Test: CI
Change-Id: I5429e40f747b7a0ed559f8a468a4831cd32df2c0
2021-11-16 02:50:22 +00:00
Ivan Lozano
b535eb0e8d Merge "Use new soong_cc_rust_prebuilt.mk" am: 3e1bc6cc0d am: 7e68fdef86 am: c7a2d4b4aa am: 61bd087651
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1890877

Change-Id: Ifde67fcb6c5aff56ddd635db3174ebb0a2cefcf0
2021-11-15 23:24:20 +00:00
Ivan Lozano
3e1bc6cc0d Merge "Use new soong_cc_rust_prebuilt.mk" 2021-11-15 22:19:46 +00:00
Ivan Lozano
4e5f07d27b rust: Add data_libs and data_bins to rust_test
Allows defining data binaries and libraries that should be installed
alongside a rust_test module, similar to cc_test.

This refactors cc_test as well so it can define rust_ffi_shared and
rust_binary modules as data.

Bug: 171710847
Test: New Soong tests pass.
Test: Example module installs data appropriately.
Change-Id: I0b56098fb475ec54f9b7a761220d260fe68cbee1
2021-11-15 17:18:42 -05:00
Ivan Lozano
c2ca1ee83d rust: Add Recovery Snapshot Soong tests for rust.
Bug: 197866992
Test: m nothing
Change-Id: I4b5401cf2ffa0dbcc6fea60f90bad4c47a9d5e6b
2021-11-15 17:11:20 -05:00
Colin Cross
6be68b5a28 Merge "Mark vndkLibrariesTxt modules as device modules" am: cb16a92ee4 am: 4c05008f42 am: 5b8c857f9a am: df95450b97
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1889921

Change-Id: I930e16bf5883c92ee0a6ca0dd18ce8ad6e4d028b
2021-11-13 00:33:32 +00:00
Colin Cross
cb16a92ee4 Merge "Mark vndkLibrariesTxt modules as device modules" 2021-11-12 23:30:51 +00:00
Ivan Lozano
49a8db2b5f Merge changes I26198187,Ia904d07b am: 94e8a651fa am: b84c426099 am: a6426b8e64 am: 865f0689b2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1877339

Change-Id: Ibe2fafd53f0f5bf4beb5451589ae38b6d8805887
2021-11-12 20:32:03 +00:00
Ivan Lozano
94e8a651fa Merge changes I26198187,Ia904d07b
* changes:
  rust: Support MTE memtag_heap sanitizer
  rust: Support global sanitizers
2021-11-12 19:26:04 +00:00
Ivan Lozano
d06cc748c1 Use new soong_cc_rust_prebuilt.mk
soong_{cc,rust}_prebuilt.mk has been merged. Use the new file.

Bug: N/A, clean-up
Test: m
Change-Id: I3f03e866815f6394aacd8cb0deba04f381b78c29
2021-11-12 13:27:58 -05:00
Colin Cross
45bce85fc9 Mark vndkLibrariesTxt modules as device modules
vndkcorevariant.libraries.txt needs to be installed onto the device,
mark the vndkLibrariesTxt module type as a device module so that
PathForModuleInstall returns a path in the system partition.

Bug: 204136549
Test: m checkbuild
Change-Id: Ic2aadff27cee6a5e6352ceaf61b707ad3e5b531f
2021-11-12 09:12:22 -08:00
Christopher Parsons
f13f05e439 Merge "Support host platform cc builds" am: 4f5b548e74 am: 063cd58d11 am: 79f7491e78 am: d1da8a1fb1 am: 039183d116
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1885868

Change-Id: I1d876756a323f788cd56816713d8022594f61835
2021-11-11 18:29:09 +00:00
Christopher Parsons
4f5b548e74 Merge "Support host platform cc builds" 2021-11-11 17:18:15 +00:00
Treehugger Robot
8ebb5e9b3a Merge "Dump deps for native and java to json files." am: 008d17612a am: 17550eb4a0 am: 1dde18a42c am: 4c9cb33365 am: 43d724ab16
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1878094

Change-Id: Ice7462a409b063f4b8e991c00f2233ed27b72796
2021-11-11 05:57:56 +00:00
Treehugger Robot
008d17612a Merge "Dump deps for native and java to json files." 2021-11-11 04:48:16 +00:00
Chris Parsons
494eef3dc8 Support host platform cc builds
This involves handling of linux-* platforms (identifying them
appropriately as host), disabling unsupported Windows platform, and
denylisting of still-problematic modules.

Test: mixed_droid, with verification that shared library artifacts
originate from bazel-out

Change-Id: Ib52db49a2d2a3c1ff9b76af23fd4f22cfc9182d0
2021-11-10 21:57:15 +00:00
Jooyung Han
e266b958eb Merge "Pass --min_sdk_version to aidl compiler" am: a5b538394c am: 29b2f3e48a am: 75a0719cbf am: 120e23ef81 am: 6ce4a8ef78
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1883408

Change-Id: I4714c2feffe69f40b886bedf5a92866ff5e1ef4f
2021-11-10 02:09:07 +00:00
Jooyung Han
a5b538394c Merge "Pass --min_sdk_version to aidl compiler" 2021-11-10 00:31:54 +00:00
Jose "Pepe" Galmes
60642aa8c6 Merge "Support for rust recovery snapshot." am: cd3af1e52c am: 32bfcdb916 am: b9be67b911 am: 2aa23d5a40 am: 62dab7a935
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1885929

Change-Id: I47819be748a68a8d973084ecff3b2caf2a62b725
2021-11-09 21:50:36 +00:00