Commit Graph

7431 Commits

Author SHA1 Message Date
Jose Galmes
d7d99be225 Support for rust recovery snapshot.
Bug: 197866992
Test: source build/envsetup.sh
Test: m -j nothing
Change-Id: I02bb188669cf9f17073592a4622998f96d5f54ac
2021-11-09 08:40:50 -08:00
Jingwen Chen
d8d0564398 Merge "bp2build: add support for soong_config_module_type." am: 8c10020ffd am: a207f3a127 am: 81cbd8462a am: 4aebb43d72 am: ba9200f3be
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1878091

Change-Id: I65f968c71153f338c448f8c63f171d60140b4184
2021-11-09 09:02:30 +00:00
Jingwen Chen
8c10020ffd Merge "bp2build: add support for soong_config_module_type." 2021-11-09 06:59:34 +00:00
Jingwen Chen
a47f28d28e bp2build: add support for soong_config_module_type.
Test: CI, go unit test
Bug: 198556411
Change-Id: Idf862904d51d822f92af0c072341c31b7a02fc64
2021-11-08 13:38:28 +00:00
Jooyung Han
07f70c0e92 Pass --min_sdk_version to aidl compiler
cc/java modules can have .aidl files as srcs. Pass min_sdk_version to
the aidl compiler so that it can check some features against it.

For example, ParcelableHolder AIDL type is available since 31.

Bug: 205338951
Test: soong test && m
Change-Id: I7ecab913e00c9b6a3ce870dacbe9773d2ddb7e93
2021-11-06 07:31:50 +09:00
Colin Cross
ae882c5529 Merge changes from topic "soong-cc-install" am: fc06a59904 am: f8d0d6db23 am: 17b89eb071 am: 5a7cc8a4c9 am: 6fa618ce4c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1869554

Change-Id: Ie60a8d2decab9a5d759dafd1bc184a0a12a631a2
2021-11-05 18:35:55 +00:00
Colin Cross
fc06a59904 Merge changes from topic "soong-cc-install"
* changes:
  Move cc module installation into Soong
  Temporarily add method to get java binary tool
2021-11-05 17:14:59 +00:00
Ivan Lozano
928ddde20d Merge "rust: Emit toc files for cdylibs" am: 925942127a am: d1d040f36a am: 08f5b6830f am: 15737511a5 am: e81a527cad
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1879645

Change-Id: I2e4a284ad18d8088f510066163ee389fdcf5ac3b
2021-11-05 14:31:55 +00:00
Ivan Lozano
925942127a Merge "rust: Emit toc files for cdylibs" 2021-11-05 13:09:20 +00:00
Jim Tang
c44ba2a6f9 Dump deps for native and java to json files.
Abandon the use of SOONG_COLLECT_CC_DEPS and SOONG_COLLECT_JAVA_DEPS,
soong can generate module_bp_cc_deps.json and module_bp_java_deps.json
without passing any variables.

BUG: 204397180

Test: rm out/soong/module_bp*json
"m nothing" should see both json files were generated.

Change-Id: If30ad5dbabb6709f834134cbc9a513a9bdc9d9de
2021-11-05 12:06:15 +08:00
Treehugger Robot
aa5ee404e1 Merge "Pass HWASan workarounds cflags to linker as well" am: 51ade343eb am: 53f0f3e683 am: b6f5dc01a4 am: 888abe9030 am: 6b374c8080
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1880991

Change-Id: Id15f051101ec7a82121385dd2f676d32ee9257a6
2021-11-04 21:05:04 +00:00
Colin Cross
acfcc1f682 Move cc module installation into Soong
Move cc module installation rules into Soong by overriding
InstallBypassMake.  Update the locations that find host tools
to look in the Make installation directory instead of the Soong
installation directory, which will no longer be used.

The methods that find host tools are also used on go binaries,
so update the config methods that tell Blueprint where to install
go binaries to the Make installation directory too.

Bug: 204136549
Test: m checkbuild
Change-Id: Id172592c195e506102982a4af0084f6d9c68a896
2021-11-04 10:28:58 -07:00
Ivan Lozano
62cd0388eb rust: Support MTE memtag_heap sanitizer
This CL adds support for the MTE memtag_heap sanitizer. This is
controlled via inclusion of an ELF note.

Bug: 170672854
Test: Heap MTE-enabled Rust test binary triggers MTE
Change-Id: I2619818785e86a94667d02b30d102c83456b7925
2021-11-04 10:51:54 -04:00
Yi Kong
286abc6f17 Pass HWASan workarounds cflags to linker as well
ThinLTO shifts codegen to linking stage. Need to pass the same set of
workaround flags to linker.

Test: m GLOBAL_THINLTO=true; adb shell incident_helper
Bug: 159343917
Bug: 204746309
Change-Id: I1e42bb043d6a86d880054b85e8831386ae4ea7e5
2021-11-04 20:19:57 +08:00
Ivan Lozano
7b0781d14c rust: Emit toc files for cdylibs
Write toc files that list the exported symbols so dependents are
only rebuilt if the exported symbols change.

This exports the CC function TransformSharedObjectToToc, and also
removes an unused arg from its signature.

Bug: 178185435
Test: New Soong test passes.
Test: m <toc file path>
Change-Id: I7ab69bf7e7f32f25eb4c7ca9d18d877dac1511db
2021-11-03 15:34:50 -04:00
Treehugger Robot
3a71307cd8 Merge changes Id11f4fb1,Id573d970,Ia94a0b5c am: a3bd963988 am: 62539c2872 am: 3fe1cc8006 am: e681a108f9 am: 948e460567
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1878086

Change-Id: Ib71c32684d955f06e3163cc222fea8c4fa7c838e
2021-11-03 17:06:11 +00:00
Ivan Lozano
5482d6a991 rust: Support global sanitizers
This CL adds Rust support for the SANITIZE_TARGET options.

This CL includes a couple small fixes to related to HWASAN, ASAN,
ensuring that the Never sanitize property is respected. Notably,
additional llvm-args are passed to ensure that HWASAN-ified Rust/C
interop works correctly.

Bug: 170672854
Bug: 204915322
Test: SANITIZE_TARGET globally applies hwasan to Rust targets
Change-Id: Ia904d07b4618f72cdc95c51f88961905c240ac53
2021-11-03 12:29:01 -04:00
Treehugger Robot
a3bd963988 Merge changes Id11f4fb1,Id573d970,Ia94a0b5c
* changes:
  Fix //conditions:default excludes computation for LabelListAttribute.
  bp2build: split Bazel conversion context into smaller ones, and change TopDownMutatorContext signatures to use Bazel conversion context.
  Add an error check in `bazelPackage` for malformed labels.
2021-11-03 15:36:28 +00:00
Dan Willemsen
b3262740ae Drop support for pre-macOS 11 SDKs am: 1332eda6e0 am: a9b765c072 am: 6f9cc50d7e am: e889f83925 am: 5088300162
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1877741

Change-Id: Idc0bbf5c252570e3feb59b60ca6e70199f252e6d
2021-11-02 08:34:40 +00:00
Jingwen Chen
55bc820d66 bp2build: split Bazel conversion context into smaller ones,
and change TopDownMutatorContext signatures to use Bazel conversion context.

This minimizes the context interfaces/functions actually needed to
convert a module, and makes such interfaces easier to mock/test.

Test: CI
Change-Id: Id573d97023d59e06ef70e1f54437024d3f7aadbd
2021-11-02 06:51:27 +00:00
Dan Willemsen
d5584757da Add Darwin+Arm64 toolchain support am: 8528f4ec5e am: e44a424acc am: 648df28c38 am: 508f4b07f7 am: 6658910853
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1863969

Change-Id: I76ecbed4c1c8c698d5b5e778e0577f78588b8894
2021-11-02 06:40:29 +00:00
Dan Willemsen
1332eda6e0 Drop support for pre-macOS 11 SDKs
As they can't built arm64 binaries. All of our master-based builds are
now running on macOS 11 buildbots.

Bug: 203607969
Change-Id: I24c34a8365a399fbe43629ab5a22a1d53e3429b3
2021-11-01 16:04:43 -07:00
Dan Willemsen
8528f4ec5e Add Darwin+Arm64 toolchain support
This just sets up the toolchain and allows Darwin+Arm64 to be specified
as a HostCross target. These variants will not be exported to Make, or
be installed on a Soong-only build. A future CL will add support for
universal binaries using these variants.

This config is a bit stranger than the regular 64/32 multilib, as it's
two primary 64-bit configs. And on a Darwin/X86 machine, the Arm64
versions are HostCross (doesn't work on the current machines), while a
Darwin/Arm64 machine, either version works (if Rosetta is installed).

Bug: 203607969
Change-Id: Iacaed77d267773672da027cd74917e33fb1c1e94
2021-11-01 15:07:37 -07:00
Colin Cross
535a392cc8 Merge "Make installable arch-variant and static vs shared variant for cc modules" am: 4985224198 am: 5dc0ab4daa am: 385517b48d am: b24afb8f67 am: ac4cef36df
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1874552

Change-Id: Ib4dbbb955fd1b2ae8117d962b3da0c4e4a52dfd1
2021-10-30 06:30:22 +00:00
Colin Cross
4985224198 Merge "Make installable arch-variant and static vs shared variant for cc modules" 2021-10-30 04:56:22 +00:00
Colin Cross
1bc9412fb3 Make installable arch-variant and static vs shared variant for cc modules
libc's native_bridge shared variant needs to be installable: false,
make the installable property arch-variant and allow the static and
shared clauses to override it.

This relands I8e0eaed2169e89520b07bb0326bb97ac0b4a70ac with fixes to
allow only the shared variant to be marked installable: false.

Bug: 204136549
Test: m checkbuild
Change-Id: Ie579b5ba56ca21f4d9243088afd5078d8c122a68
2021-10-29 15:00:38 -07:00
Treehugger Robot
a017247fd3 Merge "Revert "Do not build tests with ThinLTO"" am: a471535c72 am: 77f08017ab am: 038ce8bb1d am: bdd85d034a am: f80d303ae9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1874098

Change-Id: I66ff65265ae8a5523a5f2c93f492ae5f47c426b6
2021-10-29 21:07:59 +00:00
Treehugger Robot
a471535c72 Merge "Revert "Do not build tests with ThinLTO"" 2021-10-29 19:48:30 +00:00
Colin Cross
854fa57eea Merge "Revert "Make installable arch-variant for cc modules"" am: 972e7ba893 am: c6dd42f2ae am: b6289005da am: 9978e476d1 am: 7b570f08c9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1875314

Change-Id: I1754ded22646943e4273b926e4e426d6cc21dd2c
2021-10-29 19:36:53 +00:00
Colin Cross
972e7ba893 Merge "Revert "Make installable arch-variant for cc modules"" 2021-10-29 18:10:59 +00:00
Colin Cross
545104bea1 Revert "Make installable arch-variant for cc modules"
Revert submission 1874144-native_bridge_libc_dup_rules

Reason for revert: breaks ndk_translation_all build
Reverted Changes:
I5379aa959:Make native bridge libc uninstallable
I2220d6b48:Remove BUILD_BROKEN_DUP_RULES from cuttlefish buil...
I8e0eaed21:Make installable arch-variant for cc modules

Bug: 204136549
Fixes: 204572444
Change-Id: I089a13675123a33a3ec3fea8eaa40c65fb2e5e59
2021-10-29 18:08:36 +00:00
Yi Kong
04e459d9ff Revert "Do not build tests with ThinLTO"
On second thought, this is actually counter-productive rather than an
optimisation. LTOing test code is usually quite cheap, however since
tests can pull in additional static libraries (e.g. to set up test
environment), we will have to create non-LTO variants for these
dependent libraries, which can be much more expensive.

This reverts commit 85d7297318.

Bug: 195134194
Bug: 203737712
Change-Id: I1a105136075133a5b5895d00847d8796c419964c
Test: m GLOBAL_THINLTO=true dist device-tests platform_tests
2021-10-29 17:53:27 +00:00
Colin Cross
883b2d03d1 Merge "Make installable arch-variant for cc modules" am: f87065fedb am: 10f31785fa am: 1dc06ad960 am: 77450557b7 am: dffeb5dd25
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1874481

Change-Id: If252e5703f20f03446990f41c2ea846f89483849
2021-10-29 16:30:23 +00:00
Colin Cross
f87065fedb Merge "Make installable arch-variant for cc modules" 2021-10-29 14:58:03 +00:00
Treehugger Robot
65388ec852 Merge "Make a pass over our codebase cleaning up non-precise / non-inclusive language." am: c9e85ca825 am: e68637799b am: 5bb9910ea6 am: df50b4ba4b am: 3be5075c71
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1871701

Change-Id: I744d6e359d05f169084b7844732fcc3a2870b9cf
2021-10-28 22:11:33 +00:00
Treehugger Robot
c9e85ca825 Merge "Make a pass over our codebase cleaning up non-precise / non-inclusive language." 2021-10-28 20:51:17 +00:00
Colin Cross
1e7cfdea4a Make installable arch-variant for cc modules
libc's native_bridge variant needs to be installable: false, make
the installable property arch-variant.

Bug: 204136549
Test: m checkbuild
Change-Id: I8e0eaed2169e89520b07bb0326bb97ac0b4a70ac
2021-10-28 13:26:45 -07:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
67854187d7 cc_prebuilt_library_shared converted via bp2build am: 7fa0696eb7 am: 66ca6a87ff am: 5d5754f774 am: 46c1550dac am: 356f1b5d22
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1871615

Change-Id: Id8120b1c2b948a8433a5fb450ed349418c98a6ec
2021-10-28 20:00:15 +00:00
Joe Onorato
b4638c1ac3 Make a pass over our codebase cleaning up non-precise / non-inclusive language.
Test: treehugger
Bug: 204369779
Change-Id: I6e63cae824d323535cdb14b493edd868df47738d
2021-10-28 10:32:07 -07:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
7fa0696eb7 cc_prebuilt_library_shared converted via bp2build
Bug: b/203699063
Test: bp2build/cc_prebuilt_library_shared_test.go
Test: USE_BAZEL_ANALYSIS=1 m nothing
Test: mixed_{libc,droid}.sh
Change-Id: I4c58224e88c31507a4b285f8c55bdc066bd47232
2021-10-28 11:04:50 -04:00
Chih-hung Hsieh
252613501f Merge "Do not add .tidy files as RBE link inputs" am: 4dceb3705f am: 6e1b62d2b1 am: 9e2cb93d0a am: 9232e1f658 am: dbc8d2b4ac
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1869384

Change-Id: Ie96d5890ce772325068fca88d5db237c59193eb3
2021-10-27 22:02:13 +00:00
Chih-hung Hsieh
4dceb3705f Merge "Do not add .tidy files as RBE link inputs" 2021-10-27 20:29:04 +00:00
Liz Kammer
106d3eeaf6 Merge "bp2build: Handle export_generated_header property" am: cc910df597 am: 3c2c46f492 am: 1556173806 am: eb31a46cb1 am: fc4baed432
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1863256

Change-Id: I117f6309b1b33dfcb0c3b13ad8a0e356f95f7130
2021-10-27 16:58:26 +00:00
Liz Kammer
cc910df597 Merge "bp2build: Handle export_generated_header property" 2021-10-27 15:07:03 +00:00
Steven Moreland
53662c64f3 Merge "Add health to vndk vendor variant list" am: bc909df732 am: 62dc52bb85 am: 83bb70d062 am: 75b7cb8e3d am: 61c03cdc28
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1557255

Change-Id: I45a435e52124e47a7dc50ad1977df3772d432620
2021-10-26 23:58:24 +00:00
Steven Moreland
bc909df732 Merge "Add health to vndk vendor variant list" 2021-10-26 22:33:31 +00:00
Nick Desaulniers
9f963c5a1c remove support for *.mc files am: dc24d26093 am: 5e884723e3 am: e6ee25a2df am: 8dea2bcf32 am: 4766dc2b3f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1870523

Change-Id: I5a6f30cb1c50a98d4f4c80c80df24baa05396068
2021-10-26 22:26:10 +00:00
Nick Desaulniers
c42ae48370 remove support for *.rc files am: 16bc50a128 am: 4e56d1ff60 am: 0e50b37e2b am: b2494f0506 am: 1e24d6a428
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1870522

Change-Id: Ia50e4a711c76cfee812371483a8e00db73ccb635
2021-10-26 22:26:08 +00:00
Arthur Ishiguro
6941b9dbc0 Add sensors AIDL interface
Bug: 195593357
Test: Presubmit
Change-Id: Ie3947594a35c829245535f04937b1ad7f3798cde
2021-10-26 20:24:07 +00:00
Liz Kammer
e6583482a8 bp2build: Handle export_generated_header property
The generated_header property resides in BaseCompilerProperties, while
export_generated_header resides in BaseLinkerProperties. Previously
bp2build handled these property structs separately; however, these two
related properties residing in separate structs requires restructuring
the code to allow access to both BaseCompilerProperties and
BaseLinkerProperties for a single axis/configuration combination to
resolve which generated headers are exported/not for the
axis/configuration..

Test: go test soong tests
Test: build/bazel/ci/bp2build.sh
Change-Id: Id150003637fd19d87e8dc5d6941e9f36dc4031dd
2021-10-26 15:10:41 -04:00