Commit graph

6388 commits

Author SHA1 Message Date
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
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
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
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
a471535c72 Merge "Revert "Do not build tests with ThinLTO"" 2021-10-29 19:48:30 +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
f87065fedb Merge "Make installable arch-variant for cc modules" 2021-10-29 14:58:03 +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
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
4dceb3705f Merge "Do not add .tidy files as RBE link inputs" 2021-10-27 20:29:04 +00:00
Liz Kammer
cc910df597 Merge "bp2build: Handle export_generated_header property" 2021-10-27 15:07:03 +00:00
Steven Moreland
bc909df732 Merge "Add health to vndk vendor variant list" 2021-10-26 22:33:31 +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
Nick Desaulniers
dc24d26093 remove support for *.mc files
We've also removed the last consumer of .mc files in aosp/1867048
(external/mdnsresponder/).

Bug: 203794880
Test: lunch aosp_cf_x86_64_phone-userdebug && m
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: I2883a04d04b099273261d76319261d0857aa0300
2021-10-26 11:38:37 -07:00
Nick Desaulniers
16bc50a128 remove support for *.rc files
We're now packaging llvm-windres (aosp/1870074) which can be used as a
substitute for GNU binutils' windres, but we've also removed the last
consumer of .rc files in aosp/1867048 (external/mdnsresponder/).

In the worst case, we can bring back support for .rc files but instead
process them with llvm-windres.

Bug: 203794880
Test: lunch aosp_cf_x86_64_phone-userdebug && m
Change-Id: I30a873537e004b46a87191a932d076a89463c873
2021-10-26 11:32:36 -07:00
Paul Duffin
9804da0544 Dedup use of "prebuilt_"
Bug: 177893770
Test: m nothing
Change-Id: I664ee4d9c3aafda3de0a3f8985ee23f25db38680
2021-10-26 10:43:23 +01:00
Gabriel Biren
cbab07b45f Merge "Add android.hardware.wifi.supplicant-V1-ndk to VNDK list." 2021-10-26 04:43:57 +00:00
Yifan Hong
932920f403 Add health to vndk vendor variant list
Test: pass
Bug: 177269435

Change-Id: I40841daba4e52f65a27f5ed35b2731afb9a26a45
2021-10-25 20:22:11 -07:00
Gabriel Biren
f355d3c5ae Add android.hardware.wifi.supplicant-V1-ndk to VNDK list.
Bug: 196235436
Test: m
Change-Id: Ifc23ca36423de0a842e09120e783f6e8dfc807c3
2021-10-25 20:27:35 +00:00
Chih-Hung Hsieh
3bb934f0ad Do not add .tidy files as RBE link inputs
* RBE adds implicit dependent files as inputs
  and creates too long commands.
* Adds .tidy files as validation paths.
* Change type of tidyFiles to WritablePaths.

Bug: 203577539
Test: lunch aosp_cf_arm64_phone-userdebug; USE_RBE=true WITH_TIDY=1 make
Test: USE_RBE=true WITH_TIDY=1 mm in external/skia
Change-Id: I5fc9d6f8c9c58abcd3721ca9fbae1bc785e4e609
2021-10-25 12:24:30 -07:00
Yi Kong
85d7297318 Do not build tests with ThinLTO
There's not a great return on investment for spending additional
compilation/link time on tests that may only be run once or very few
times (as compared to actual library code that ships and is run orders
of magnitude more times).

Bug: 195134194
Bug: 203737712
Test: m GLOBAL_THINLTO=true dist device-tests platform_tests
Change-Id: I7149c4140f7c52b22bedbe322f1bf2c81f7ad66b
2021-10-24 17:01:43 +08:00
Treehugger Robot
1c6de4bdac Merge "Rewrite macOS SDK selection" 2021-10-20 22:24:46 +00:00
Liz Kammer
2dafba7da9 Merge "bp2build: Add support for cc_binary." 2021-10-20 14:02:39 +00:00
Dan Willemsen
7368d86a20 Rewrite macOS SDK selection
Modern Xcode versions only have a single macOS SDK installed anymore, so
we don't need to iterate through our supported versions, only check
whether the current version is supported.

This also makes it so that we can specify "11" (or soon, "12") to
specify all 11.x SDKs, instead of having to update our supported list
multiple times a year. This matches previous years that had multiple
patch releases on 10.14.y, 10.15.y, etc.

Bug: 203607969
Test: build on Mac, changing the supported SDK list
Change-Id: I42715f7e8dfec811de440a435927c14c742dede9
2021-10-19 21:43:41 -07:00
Christopher Parsons
c0ed1f653f Merge "Add OS to configuration key in mixed builds" 2021-10-19 20:57:47 +00:00
Chris Parsons
787fb36189 Add OS to configuration key in mixed builds
This also removes the special-case filegroup from mixed builds
buildroot; no special handling is required. Since we're currently
hardcoding linux_x86_64 as our host platform, it should be fine
to continue assumping that hardcoded host for now.

Test: USE_BAZEL_ANALYSIS=1 m adbd
Change-Id: I35509f4eb33ba7a243fab4c34b35958f6f2fceab
2021-10-19 16:55:52 -04:00
Liz Kammer
2ec92fc0a0 Merge "bp2build include generated hdrs in all src splits" 2021-10-19 20:51:00 +00:00
Christopher Parsons
a8b37dd7f1 Merge "Add x86_host vars to config.bzl" 2021-10-19 20:48:54 +00:00
Trevor Radcliffe
0dbe615ff4 Allow for the installation of binaries in xbin
su needs to be installed in xbin, and these changes modify
Soong to allow for this.

Fixes: 202405540
Test: Confirmed that binary was dropped into xbin
Change-Id: Ib664dc1255cd4d9049ac212f79cc53d5038cfcc7
2021-10-19 19:44:13 +00:00
Liz Kammer
2b8004b1ef bp2build: Add support for cc_binary.
Bug: 197920036
Test: build/bazel/ci/bp2build.sh
Change-Id: I2c4200967653af15a330ab8cbaf796b70d43f32d
2021-10-19 14:12:39 -04:00
Liz Kammer
ae3994ed4c bp2build include generated hdrs in all src splits
Currently generated headers are only included in the srcs split;
however, if c or assembly sources depend on the headers, the
dependendency is lacking and can cause non-deterministic failures.

Test: build/bazel/ci/bp2build.sh
Change-Id: Ic354c88300a5fb1b85241f68889e904c33a81488
2021-10-19 14:09:49 -04:00
Chris Parsons
3b1f83d076 Add x86_host vars to config.bzl
Test: USE_BAZEL_ANALYSIS=1 m adbd
Test: Manually verified config.bzl contains various x86_host flags after
bp2build.
Test: Unit tests

Change-Id: Ie9201ea2be4cd1c6659bea088a797cedbae37403
2021-10-19 12:18:13 -04:00
Ivan Lozano
e95b860598 Merge "rust: Package shared libraries with fuzzer zips" 2021-10-15 19:33:53 +00:00
Liz Kammer
51da93381c Merge "Update version_script to be handled as linkopt" 2021-10-15 14:22:27 +00:00
Treehugger Robot
adf2b3e68f Merge "Add android_sdk_repo_host to build platform-tools&build-tools" 2021-10-15 02:04:45 +00:00
Ivan Lozano
39b0bf0326 rust: Package shared libraries with fuzzer zips
Rust fuzzers were not packaging up their CC shared dependencies.
This would lead to fuzzers using the shared libraries included on
system, which may not be sanitized, leading to incorrect behavior.

This refactors the relevant code from CC and calls it from the Rust
build logic.

Bug: 202282599
Test: output rust fuzzer zip file includes shared dependencies.
Change-Id: I92196eb0141733797a67eae24f8e9aedea94c3bc
2021-10-14 15:31:47 -04:00
Stephen Hines
f7bc97ce7a Merge "Switch to clang-r433403b (13.0.3)" 2021-10-14 18:46:08 +00:00
Yi Kong
8ea56f9da9 Add Global ThinLTO option (2nd try)
Instead of making everything into ThinLTO variant by default (it works
but many Soong tests don't like this, and got bit rot due to lack of
active builder for this configuration), let the default option be
ThinLTO and no LTO be a special variant.

Test: m GLOBAL_THINLTO=true
Test: m
Bug: 195134194
Change-Id: I2fd98061ba55eba1fdfdd056fb2f8c2051fd2553
2021-10-14 17:34:13 +08:00
Stephen Hines
b7b0ae12be Switch to clang-r433403b (13.0.3)
Bug: http://b/202099787
Test: m
Change-Id: Id923948c56b0308842c94846edd6528fd26dbf72
2021-10-14 01:21:21 -07:00
Jiyong Park
ddf4ebae19 Merge "Remove use_apex_name_macro" 2021-10-14 02:32:43 +00:00
Jiyong Park
91f1b42226 Remove use_apex_name_macro
The property is no longer used.

Bug: 161926892
Test: m
Change-Id: I98948152d6d09bde2eeba4875c7ca01531a24930
2021-10-14 08:57:59 +09:00
Liz Kammer
d2871189b1 Update version_script to be handled as linkopt
This allows us to handle this consistently between cc_binary and
cc_library* types.

Test: build/bazel/ci/bp2build.sh
Change-Id: I996f42bbe591215217c3d561662e775925b871ff
2021-10-13 08:36:58 -04:00
Dan Willemsen
9fe1410213 Add android_sdk_repo_host to build platform-tools&build-tools
The Android SDK has been built with Make up until now, monolithically,
then split up into several sdk-repo zip files for different purposes.
The Mac and Windows SDKs really only need to contain the platform-tools
and build-tools pieces, but due to this monolithic sdk zip, we had to
build the whole SDK first.

This adds an `android_sdk_repo_host` module that can build these
platform-tools and build-tools zips.

Bug: 187222815
Change-Id: I55809e1d7447dd65e22461f921b2b8abb6d5f822
2021-10-13 01:25:02 -07:00
Yi Kong
a9e56f062d Merge "Re-enable unused-command-line-argument warning" 2021-10-13 04:12:12 +00:00