Commit graph

3129 commits

Author SHA1 Message Date
Jingwen Chen
916322541a Allow //external/bazel-skylib to use existing BUILD files
Bug: 190605804
Test: bp2build-incremental
Change-Id: Ida765465532c0e98d035eef4c703d13fbf554538
2021-08-11 12:19:17 +00:00
Christopher Parsons
9f7c388337 Merge "Support rtti in bp2build" 2021-08-10 20:05:44 +00:00
Romain Jobredeaux
d9eb0f0aa6 Merge "Exempt prebuilts/jdk and build/bazel/examples/java BUILD files from bp2build overwriting" 2021-08-10 16:29:35 +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
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
Romain Jobredeaux
748652e350 Exempt prebuilts/jdk and build/bazel/examples/java BUILD files from bp2build overwriting
Test: b build prebuilts/jdk/...
Test: b build build/bazel/examples/java/...
Change-Id: I6f82e4984ab2d8ec4c21edbf2dcba5f37b515fc9
Bug: 195786195
2021-08-06 22:09:36 +00:00
Christian Wailes
99bc67a548 Merge "Conditionally apply rustdoc flags to third party crates" 2021-08-03 19:39:17 +00:00
Romain Jobredeaux
596a78949c Merge "Add prebuilts/r8 to the bp2build BUILD file overwriting exception list." 2021-08-03 16:07:16 +00: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
Romain Jobredeaux
8c98c25f07 Add prebuilts/r8 to the bp2build BUILD file overwriting exception list.
Change-Id: I241d5e9a1bf1269a033d1f7c58e851610105c7fa
Test: b build prebuilts/r8:r8_jar_import
Bug: 194103854
2021-08-02 17:53:24 +00:00
Liz Kammer
93f51a3cff Merge "Set mixed builds use product-config based target" 2021-08-02 16:38:29 +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
f42f01b49d Merge "Upgrade to golang protobuf api v2" 2021-07-29 18:29:26 +00:00
Jingwen Chen
739d01e5ef Add tzdata packages to bp2build allowlist.
Test: bp2build CI

Test: Build tzdata APEX with Bazel

Bug: 194644492
Change-Id: I05854f5f7dceeb197c1b7d8e746eb6fc07d93581
2021-07-28 15:26:20 +00:00
Jooyung Han
1c534d3c73 Merge "TransitivePackagingSpecs should follow "installable" deps" 2021-07-28 00:35:16 +00:00
Jooyung Han
8707cd74bf TransitivePackagingSpecs should follow "installable" deps
Gathering packaging items from "SkipInstall" deps doesn't make sense.

Bug: 194403710
Test: soong test
Test: m microdroid # microdroid shouldn't have libandroidicu
Change-Id: If6c3ee82d588e2742c85cef7244c090c93f38b8e
2021-07-27 19:26:10 +09:00
Rupert Shuttleworth
6e4950a061 Add some more properties to the bp2build APEX converter (second try)
In particular:

- AndroidManifest
- file_contexts
- key
- certificate
- min_sdk_version
- updatable
- installable
- native_shared_libs
- binaries

Test: Updated unit test

Change-Id: I1c6e8c4b6b24ce487f64e5d37bd594dbb000fe6f
2021-07-27 05:02:50 -04:00
Rupert Shuttleworth
d0e6ad1ab3 Merge "Revert "Add some more properties to the bp2build APEX converter."" 2021-07-27 02:56:56 +00:00
Rupert Shuttleworth
0358478150 Revert "Add some more properties to the bp2build APEX converter."
This reverts commit 69bf4c0d60.

Reason for revert: Possibly broke CI (https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master-bazel&target=bp2build-incremental&lkgb=7266256&fkbb=7237028), rolling back just in case...

Change-Id: I14ebac4f47576a73285d1f724ae4499036e8e678
2021-07-27 02:37:32 +00:00
Treehugger Robot
57dd3c40e8 Merge "Add some more properties to the bp2build APEX converter." 2021-07-27 02:17:51 +00:00
Liz Kammer
c0c6609ef6 Set mixed builds use product-config based target
Rather than specifying a specific arch/os, use the android_target
platform that incorporates arch/os based on product config.

Test: build/bazel/ci/mixed_libc.sh
Change-Id: I2b30cfb9778444acbfd7648af2d331303cab416a
2021-07-26 17:41:49 -04:00
satayev
4102c0cc47 Merge "Rename UpdatableBootJars to ApexBootJars." 2021-07-26 17:59:36 +00:00
Rupert Shuttleworth
69bf4c0d60 Add some more properties to the bp2build APEX converter.
In particular:

- AndroidManifest
- file_contexts
- key
- certificate
- min_sdk_version
- updatable
- installable
- native_shared_libs
- binaries

Test: Updated unit test

Change-Id: I9ea13f021d63ec0f75006b3b0b23ec8178c7e9da
2021-07-26 07:32:36 -04:00
Jingwen Chen
b643c7a085 bp2build BUILD files for build/bazel/examples/apex.
The previous build/bazel recursive glob is too aggressive. Not all
directories should be ignored by bp2build.

Test: bp2build-incremental builds //bionic/... and everything it depends on in //build/bazel/...
Bug: 193658718
Change-Id: Icb48fd687f0fe6be144caa5b8c9a4f01d15b6c20
2021-07-26 06:26:36 +00:00
Yi-Yo Chiang
4fcfb53f7b android/androidmk.go: Calls *RequiredModuleNames() to get required modules
Instead of writing commonProperties.*Required as
LOCAL_*REQUIRED_MODULES, call android.Module.*RequiredModuleNames() to
retrieve list of required, so that the required modules can be modified
by overriding the interface method.

Bug: 191369319
Test: Presubmit
Change-Id: I61fcb82496dcc06831fb42f5af1b53f01999a8d1
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
Dan Willemsen
4591b6496d Upgrade to golang protobuf api v2
Major operations:
 * Fix the go_package entries to be consistent, as the new tool
   complains when it doesn't have a '/'.
 * Regenerate with the new protoc-gen-go tool.
 * github.com/golang/protobuf -> google.golang.org/protobuf
 * proto.[Un]MarshalText -> prototext.[Un]Marshal

Change-Id: Ie1147bd2457fafb66ba555461b3bf14f0561a25d
2021-07-23 11:12:05 -07:00
Chris Parsons
a66c0b5900 Skip unnecessary repeititon in validation
Test: Unit tests
Change-Id: I492d3157b1dee358871924071b26a73e8b83a9a5
2021-07-23 17:23:29 +00: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
Treehugger Robot
65eb794a5a Merge "Reland "Add TestArchProperties"" 2021-07-23 12:42:15 +00:00
Colin Cross
4e87990cf2 Reland "Add TestArchProperties"
Add a test that verifies appropriate arch properties are squashed
into each variant.

This relands I4a5044f3b2b3ca0a51dc457dec7157411ebad7e3 with a fix for the darwin test.

Test: TestArchProperties
Change-Id: I7e71eb839856c7121c60713c480df09f30f3cd7c
2021-07-23 00:21:00 +00:00
Colin Cross
f8c466633f Merge "Revert "Add TestArchProperties"" 2021-07-23 00:18:28 +00:00
Colin Cross
239de0ac22 Revert "Add TestArchProperties"
This reverts commit 34c32fabea.

Reason for revert: broke mac build

Change-Id: Ibe9d854f65e5ae109ba690e878946e212016434f
2021-07-23 00:17:54 +00:00
Colin Cross
4e1d5dd083 Merge "Add TestArchProperties" 2021-07-23 00:07:14 +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
satayev
d604b210c4 Rename UpdatableBootJars to ApexBootJars.
Note that ART apex boot jars and core-icu4j are exceptions here as they
are not part of ApexBootJars. ART apex boot jars are defined in their
own variable, while core-icu4j is treated as a regular non-updatable
boot jar.

Bug: 191127295
Test: atest CtsClasspathsTestCases
Change-Id: I3cea3d82ef521655a1a5ffa8cae2258ab9d08bfc
2021-07-22 17:35:42 +01: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
Colin Cross
34c32fabea Add TestArchProperties
Add a test that verifies appropriate arch properties are squashed
into each variant.

Test: TestArchProperties
Change-Id: I4a5044f3b2b3ca0a51dc457dec7157411ebad7e3
2021-07-20 16:46:30 -07:00
Damian Patel
8b22219066 AOSP Music to bazel: path added to bazel.go
In order to reconcile the mixed builds between
Soong and Bazel, the path for the AOSP Music
BUILD file must be added to the bp2buildKeepExistingBuildFile
map.

Change-Id: Ib895d0f4a09502da2d33fc673026d91269b4d086
2021-07-20 20:41:14 +00:00
Colin Cross
0c66bc615b Replace android.BuildOs with Config.BuildOS
Replace the android.BuildOs constant with Config.BuildOS so that it
can vary based on the product config.

Bug: 190084016
Test: all Soong tests
Change-Id: Ia67f872d8b2ab788747a22e3a9659dc21c9775cd
2021-07-20 12:46:48 -07:00
Kiyoung Kim
ae11c233b5 Update prebuilt_etc available for snapshot
Make prebuilt_etc module available for the snapshot. This change
includes implementing snapshot interface for the prebuilt_etc module so
it can be added to the snapshot from the fake snapshot, or when the
module is specified in the list.

Bug: 192430376
Test: m nothing passed
Test: Checked if the module is included in the snapshot properly
Change-Id: I3574d2a1b8f8f4e5f083f3913e8768f5088d0c46
2021-07-20 11:24:03 +09:00
Liz Kammer
2d8056929e Merge "Handle target.bionic in bp2build." 2021-07-19 18:10:24 +00:00