Commit graph

5522 commits

Author SHA1 Message Date
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
0d99045b69 Lift BazelHandler interface into android/
Because it's commonly useful and not cc/ specific
Also export GenerateBazelBuildActions and update uses

Test: Existing tests pass
Change-Id: Ibc6858bb1129afba181a7686dda432defe33b00d
2021-08-11 18:19:40 +00:00
Colin Cross
88c5391dbe Merge "Remove libjemalloc5 from default musl libraries" 2021-08-11 14:14:48 +00:00
Christopher Parsons
9f7c388337 Merge "Support rtti in bp2build" 2021-08-10 20:05:44 +00:00
Yabin Cui
39ff202748 Merge "Revert^2 "Switch to clang r428724 13.0.1."" 2021-08-10 19:22:15 +00:00
Treehugger Robot
6fd3047115 Merge "Support exporting device arch toolchain info" 2021-08-10 16:11:52 +00:00
Chris Parsons
2c7883941e Support rtti in bp2build
Rtti was already handled by bazel macros, so this change simply
propagates the rtti bit to these macros.

Test: Run bp2build, build //external/libcxxabi:all
Change-Id: I63296db2db868202874c8bd0b1de6310f7bb85c7
2021-08-10 11:58:07 -04:00
Yabin Cui
10bf3b8c00 Revert^2 "Switch to clang r428724 13.0.1."
786c1d41ef

Change-Id: Ic143d1b3375c8258e0e4274339524380de391676
2021-08-10 15:42:10 +00:00
Christopher Parsons
67d6ccecfc Merge "bp2build: handle system_shared_libs" 2021-08-09 19:11:00 +00:00
Chris Parsons
51f8c39261 bp2build: handle system_shared_libs
- If no system_shared_libs is specified, bp2build writes no attribute
value. In this case, the bazel library macros determine the correct
default behavior.
- If any system_shared_libs is specified for any variant, then bp2build
writes the value verbatim. This includes if an empty list is specified,
as this should override defaulting behavior.

Note this defaulting behavior is incomplete and will be incorrect in
corner cases. For example, if, in an Android.bp, system_shared_libs is
specified for os.linux_bionic but not for os.android, then the bazel
default for os.android will be incorrect. However, there are no current
modules in AOSP which fit this case.

As a related fix, supports static struct for cc_library_static.

Also, removes some elements from the bp2build denylist.

Test: mixed_droid CI
Change-Id: Iee5feeaaf05e8e7209c7a90c913173832ad7bf91
2021-08-09 11:41:09 -04:00
Yabin Cui
01cad0cddc Merge "Revert "Switch to clang r428724 13.0.1."" 2021-08-08 21:02:29 +00:00
Yabin Cui
786c1d41ef Revert "Switch to clang r428724 13.0.1."
Revert submission 1743633-switch-to-clang-r428724

Reason for revert: fix build
Reverted Changes:
I824f3bc1c:Update bazel's clang version to clang-r428724
I6c4c26267:Adjust test for compiler update.
I94ab1f2dc:Switch to clang r428724 13.0.1.

Change-Id: I846e904b6e868d4e2be1bd8260ed59fc5464ef68
2021-08-08 20:59:59 +00:00
Yabin Cui
baeca672c1 Merge "Switch to clang r428724 13.0.1." 2021-08-08 18:20:22 +00:00
Yabin Cui
e87329c4c5 Switch to clang r428724 13.0.1.
Bug: http://b/190099451
Test: build and boot devices

Change-Id: I94ab1f2dc194ffcec5681708b558af26ced30aae
2021-08-06 18:28:08 +00:00
Stephen Hines
fe3bab726d Merge "Revert "Make DWARF v5 the default debug information format."" 2021-08-06 17:04:41 +00:00
Stephen Hines
bb1a17aecb Revert "Make DWARF v5 the default debug information format."
This reverts commit 5e13f86fc8.

libabigail isn't quite ready for DWARF v5 yet, so let's revert this
temporarily.

Bug: http://b/182004844
Bug: http://b/195152239
Bug: http://b/195698910
Test: Builds
Change-Id: I4b1dd8f9e64d19f37c90b8a2433cbb302c7d5105
2021-08-05 17:05:01 -07:00
Colin Cross
90a8b3abd5 Remove libjemalloc5 from default musl libraries
The musl allocator works now, remove libjemalloc5 from the default
libraries.

Bug: 190084016
Test: prebuilts/build-tools/build-prebuilts.sh --musl
Change-Id: I12ef8112af99f90e10e8a247ddc2eddfd4cd98a0
2021-08-02 13:17:13 -07:00
Liz Kammer
82ad8ccca2 Support exporting device arch toolchain info
Test: bp2build.sh
Bug: 187084665
Change-Id: I49e75f603accab519784dbaf25d85db0010587a3
2021-08-02 14:54:10 -04:00
Chris Wailes
b2703adce4 Conditionally apply rustdoc flags to third party crates
This CL changes the logic in rust/builder.go so that some rustdoc flags
are only applied to external crates.  This will allow us to since
warnings and deal with soft-failures in external crates while allowing
us to be more strict with our internal Rust code.

Bug: 195136952
Test: m rustdoc
Change-Id: Icdde304bbbb323cae9657e8f842f58ae79e811ce
2021-08-02 11:50:34 -07:00
Liz Kammer
067b889762 Correct isThirdParty check
Previously, isThirdParty check was over-selecting for third-party-ness,
the only non-third-party paths were those explicitly excluded from
typically third party directories, results in ~all code being considered
third party.

Updated test to ensure bionic is not considered third party, which fails
without this change.

Test: go soong tests
Change-Id: Id371aaad2ceef2b3163384fa84712397877cbe90
2021-08-02 11:50:34 -07:00
Yuntao Xu
1b05df5fd4 Merge "remove target from every intermediate depFile" 2021-08-02 16:28:27 +00:00
Dan Willemsen
db45fb250d Merge "Bump minimum MacOS version to 10.13" 2021-07-30 17:22:56 +00:00
Yuntao Xu
56cc658b93 remove target from every intermediate depFile
1. The current logic in the rsCppCmdLine only removes the target from the
first intermediated depFile, which is different from the logic in Make, see
https://source.corp.google.com/android/build/make/core/definitions.mk;l=1078
2. The expected logic, as that in Make, is to remove the target from every
intermediate depFile, if there are many, before the concatenation;
3. This bug would cause dependency cycle error, please check the bug number
below for more details;
4. The fix is to make sure the logic here is the same as that in Make.

Bug: 195036632
Test: m CtsRsCppTestCases with the converted Android.bp file (run more than
once to make sure no error occurs)
Test: manually checked the gen/rs/rs.stamp.d file to make sure there
is only one target on the top (the same as that built with the former
Android.mk file)
Test: TreeHugger

Change-Id: If79e3e5e7bc18a6fddcf56c0168daea93726afc6
2021-07-30 09:47:07 -07:00
Justin Yun
27b9572433 Rewrite snapshot dependencies for vndk-ext
VNDK-ext libraries have dependency on VNDK libraries. When building
against snapshots, the dependency must be rewritten with the
snapshots.

Bug: 194864314
Test: m nothing
Change-Id: I1244c6a6590e89b344ab39514bb5142d36b04268
2021-07-30 10:49:02 +00:00
Yi-Yo Chiang
d7b95f94a1 Merge changes from topic "variational-required"
* changes:
  cc/cc.go: Support per-image-variation "required"
  android/androidmk.go: Calls *RequiredModuleNames() to get required modules
2021-07-30 10:09:40 +00:00
Dan Willemsen
3dc4326ce7 Bump minimum MacOS version to 10.13
We've removed all of our buildbots running 10.10, and Android Studio
requires 10.14+, so our oldest users are now the 10.13 buildbots.

Bug: 191879468
Change-Id: Ie9fdb59f12bb672c5f2448cb558f54a2e10039fb
2021-07-29 12:18:29 -07:00
Yi Kong
c14f088a5f Merge "Fix build on older Macs with universal binary Clang" 2021-07-28 11:05:00 +00:00
Jiyong Park
6ede93608b Add more *-ndk libraries to VndkMustUseVendorVariantList
Some libraries were missing in aosp/1777786.

Bug: 161456198
Bug: 194743866
Test: m on full-eng

Merged-In: I7c7aa1025a876e45fc4779378825d91098164e84
Change-Id: I3cb4dfcf490ddb6b4bd3915232399cebf5e467d5
2021-07-27 02:56:43 +00:00
Jiyong Park
44a13ac401 *-ndk.so libraries are added to VndkMustUseVendorVariantList
We will replace the ndk_platform backend with the ndk backend. The
former hasn't been deleted yet because there already are references to
it. When the existing references are all replaced with the ndk backend,
we will remove the ndk_platform backend and the corresponding libraries
will be removed from this list.

Bug: 161456198
Test: m

Merged-In: I7c7aa1025a876e45fc4779378825d91098164e84
Change-Id: I7c7aa1025a876e45fc4779378825d91098164e84
(cherry picked from commit b58719c156)
2021-07-26 13:22:49 +09:00
Jiyong Park
a592b6f8e0 Reland: Add more target-specific properties
Following properties are added:

* vendor.header_libs
* platform.cflags
* platform.header_libs
* platform.exclude_shared_libs

These are used in the *-ndk libraries generated from the aidl_interface
modules, so that we can build the platform variants of the libraries
just like the *-ndk_platform libraries. Eventually, we will remove the
*-ndk_platform libraries.

Bug: 161456198
Test: m
Merged-In: I126e272cd29eb1e03662c54bfa8bd64e704adc74
Change-Id: I126e272cd29eb1e03662c54bfa8bd64e704adc74
(cherry picked from commit bb14481408)
2021-07-26 11:19:35 +09:00
Yi-Yo Chiang
c7e044f531 cc/cc.go: Support per-image-variation "required"
Support "core" and "recovery" variants for now. Might add more image
types if needed.

Bug: 191369319
Test: Presubmit
Test: Inspect out/soong/Android-*.mk
Change-Id: Iebab29ed5d6d8fe9c66b6d6e56e00246d10c36b3
2021-07-24 22:44:36 +08:00
Colin Cross
528d67e523 Reland "Split the x86 host toolchain into glibc and musl variants"
Split the x86 host toolchain into glibc and musl variants

Create new musl toolchains that are based on the existing glibc
toolchains, and add the necessary flags for musl compiles.

This relands Ifc02f9e5afa61ff758be98b0c962f3a4b53d0546 with changes
for I46672e3a096b6ea94ff4c10e1c31e8fd010a163c.

Bug: 190084016
Change-Id: Iaa9f7a50ff601155ecd73acc5701a2c226be66dc
Test: TestArchMutator
2021-07-23 22:25:36 +00:00
Colin Cross
c5647ca16e Merge "Revert "Split the x86 host toolchain into glibc and musl variants"" 2021-07-23 22:22:11 +00:00
Colin Cross
5d6904e1cf Revert "Split the x86 host toolchain into glibc and musl variants"
This reverts commit 4fb4ef2242.

Reason for revert: crossed with aosp/1775072

Change-Id: Ied922850b810d82627ba4f9ee42f672cfe286c91
2021-07-23 22:20:29 +00:00
Colin Cross
7628e933b6 Merge changes Idbeb4819,Ifc02f9e5
* changes:
  Add dynamic_list property
  Split the x86 host toolchain into glibc and musl variants
2021-07-23 22:08:19 +00:00
Treehugger Robot
2231f8a21c Merge "Remove default_shared_libs" 2021-07-23 21:18:51 +00:00
Kalesh Singh
295ae69b04 Merge "Update VndkMustUseVendorVariantList" 2021-07-23 17:16:28 +00:00
Colin Cross
5942238966 Add dynamic_list property
Add a dynamic_list property that is similar to version_script but uses
a -Wl,--dynamic-list flag instead of -Wl,--version-script.

Bug: 190084016
Test: TestLibraryDynamicList
Change-Id: Idbeb4819ce4d92e50c4e9b27ec8f150d566d380a
2021-07-23 10:15:13 -07:00
Colin Cross
4fb4ef2242 Split the x86 host toolchain into glibc and musl variants
Create new musl toolchains that are based on the existing glibc
toolchains, and add the necessary flags for musl compiles.

Bug: 190084016
Test: TestArchMutator
Change-Id: Ifc02f9e5afa61ff758be98b0c962f3a4b53d0546
2021-07-23 08:57:17 -07:00
Christopher Parsons
2f1102fe58 Merge "Remove bp2build deps mutator" 2021-07-23 14:55:40 +00:00
Colin Cross
b8d69871a8 Merge "Remove Fuchsia support from Soong" 2021-07-23 14:54:49 +00:00
Yi Kong
f8e53703f0 Fix build on older Macs with universal binary Clang
Our Clang is not built to handle old linkers by default, so if we do not
configure this explicitly it may attempt to use flags that are not
supported by the version of the Darwin linker installed on the build
machine.

Bug: 191276541
Test: build rs on 10.13
Change-Id: Ia40170b6aeba11fb6997021ec3f73e911e0b057c
2021-07-23 07:54:01 +00:00
Colin Cross
78fd15f7d6 Merge "Replace android.BuildOs with Config.BuildOS" 2021-07-23 00:07:01 +00:00
Chris Parsons
5a34ffb350 Remove bp2build deps mutator
Refactor bp2build to retrieve modules directly by name, instead of via
DirectDeps. This functions properly as bp2build has no need for variant
information of the blueprint graph.

Test: USE_BAZEL_ANALYSIS=1 m fmtlib
Change-Id: Ief4b67bc56f24929871af772f3a742f07085bf8c
2021-07-22 18:09:34 -04:00
Colin Cross
6b8f4253eb Remove default_shared_libs
system_shared_libs has been modified to have the same behavior as
the newly added default_shared_libs, remove default_shared_libs in
favor of system_shared_libs.

This reverts Ia2349d84c70e503916f90a5d2702e135248f73df and renames
the default_shared_libs property in cc_object (which never had
system_shared_libs) to system_shared_libs.

Bug: 193559105
Test: m checkbuild
Change-Id: I46672e3a096b6ea94ff4c10e1c31e8fd010a163c
2021-07-22 12:10:11 -07:00
Treehugger Robot
2e4c0eb90e Merge "Apply system_shared_libs to all variants" 2021-07-22 17:44:32 +00:00
Kalesh Singh
ada357aeb4 Update VndkMustUseVendorVariantList
Add android.system.suspend-V1-ndk_platform

Bug: 170260236
Test: m
Change-Id: I93b84112e0fcdd3593ca196308338945376acc1a
2021-07-22 06:34:13 +00:00
Colin Cross
cb0ac95bde Remove Fuchsia support from Soong
Bug: 194215932
Test: m checkbuild
Change-Id: Id7d3964d9417f8b0938af9b168bb4c00cebe9390
2021-07-21 20:37:46 -07:00
Kiyoung Kim
5d96f64d04 Merge changes I3574d2a1,Ifb69fb3d
* changes:
  Update prebuilt_etc available for snapshot
  Separate snapshot definition
2021-07-22 00:57:39 +00:00
Liz Kammer
561923e10d Add deps for system_shared_libs for all axes
This is the same hack we have currently, but applying it to the various
axes to unblock a Soong/bionic refactoring CL.

Test: bp2build.sh
Change-Id: Ie068461201bb3c18b9f385026e96cca2c7fe6b97
2021-07-21 10:15:56 -04:00
Hsin-Yi Chen
1f019f945d Merge "Specify working directory and OUT_DIR to ABI tools" 2021-07-21 07:19:13 +00:00