Commit Graph

3771 Commits

Author SHA1 Message Date
Paul Duffin
c05cbcebb5 Merge "Make all SdkMemberTypes support transitive member deps" am: dbb490359a am: e1fab6a30b am: 8d108bac17
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699188

Change-Id: I65568bd7614795269017f59c0e3e3f28ef9b91eb
2021-05-07 13:03:34 +00:00
Paul Duffin
5b4530d137 Merge "Make licenseModule SdkAware" am: e746f30a0b am: 11abc8f8d6 am: 65d891eb67
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699187

Change-Id: Id4d1d06b6b4d07a05e4b90f00ee2fc4a50f2f2b5
2021-05-07 13:03:29 +00:00
Paul Duffin
44ee86df45 Merge "Make sdk tests more realistic" am: e0fc8725f3 am: bef3a5ce3e am: 7b8d04b3b8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699186

Change-Id: I51c669acca0a0870e784f2831aad095c70a99468
2021-05-07 13:03:23 +00:00
Paul Duffin
dbb490359a Merge "Make all SdkMemberTypes support transitive member deps" 2021-05-07 12:31:15 +00:00
Paul Duffin
e746f30a0b Merge "Make licenseModule SdkAware" 2021-05-07 12:31:03 +00:00
Paul Duffin
e0fc8725f3 Merge "Make sdk tests more realistic" 2021-05-07 12:16:25 +00:00
Colin Cross
d472940919 Merge "Support blueprint_go_binary in PathForModuleSrc" am: 57892ceafb am: c24869d391 am: 81866c119c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1694192

Change-Id: I99b7d53ac449a040aa76e2c331e66b8751ea2f2d
2021-05-07 00:22:08 +00:00
Colin Cross
57892ceafb Merge "Support blueprint_go_binary in PathForModuleSrc" 2021-05-06 23:29:22 +00:00
Paul Duffin
2d3da31d41 Make all SdkMemberTypes support transitive member deps
Previously, only those SdkMemberTypes which had specific need to
automatically add some of their dependencies as sdk members would cause
the sdk to visit their transitive dependencies. However, as any module
can have dependencies on license modules and license modules need to be
included in the sdk then it needs to visit transitive dependencies of
all members.

So, this change removes the support for allowing an SdkMemberType to
control whether its transitive dependencies are visited and just visits
them all.

This does not have any effect on sdk snapshots as in order for a
dependency to be added to an sdk it needs to be added with a tag that
implements SdkMemberTypeDependencyTag and the only tags that implement
this are used by SdkMemberTypes that had enabled transitive members.

Bug: 181569894
Test: m art-module-sdk art-module-host-exports art-module-test-exports
      - verify that this change has no effect on the generated snapshots
Change-Id: If0293af0237aa7e39335e5b8383a41c023ff5853
2021-05-06 23:13:06 +01:00
Paul Duffin
b9e7a3ca7a Make licenseModule SdkAware
Making licenseModule SdkAware caused two breakages in the build. The
breakages were both caused by having an SdkAware module that was
depended upon by a versioned sdk snapshot but which was not itself
versioned and so did not have the member_name property set.

That occured because some default licenses have been added to the
packages containing prebuilts, e.g. prebuilts_runtime_license in
prebuilts/runtime/Android.bp. They apply to both the versioned and
unversioned members.

Once license support has been added to the sdk most of those will be
removed and replaced with properly versioned license modules. However,
in the meantime it is necessary to support that.

This change avoids the issue by checking to see whether the module is
itself versioned before relying on the member_name property. It also
improves the error message when a panic is recovered to make it easier
to identify where it originates.

Bug: 181569894
Test: m nothing
Change-Id: I0e7da2e0c4a30a6f814c2faab821b185aaed2135
2021-05-06 23:13:06 +01:00
Paul Duffin
525a590565 Make sdk tests more realistic
The tests use <sdk>_<module>_<version> as the format for a versioned
sdk member name but the format should be <sdk>_<module>@<version>. This
change corrects it and also fixes a similar issue in an error message.

Bug: 181569894
Test: m nothing
Change-Id: I8be0db4bcd0b6f4d6fbdf9e402ef7257fae8e18b
2021-05-06 23:13:06 +01:00
Colin Cross
4102666b99 Remove registerOverrideMutator
registerOverrideMutator is no longer necessary, the new dependency is
returned in overrideModuleDepsMutator and can be immediately acted
upon.

Test: TestOverrideAndroidApp
Change-Id: I82237bad88ccb1d9564e17512c948e770581823f
2021-05-06 11:59:38 -07:00
Lukacs T. Berki
c72820ab33 Refactor how bp2build gets arch-specific props. am: 598dd00236 am: a2f68505af am: 94175d42b9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1697045

Change-Id: If3bbdae1561f1835ffacfe0271ecd7b5e03fc7d9
2021-05-05 10:19:58 +00:00
Lukacs T. Berki
598dd00236 Refactor how bp2build gets arch-specific props.
Then plumb them to LabelAttribute.

This refactoring is required because the previous implementation did not
handle properties in shards other than the first one (e.g.
version_script) well. In addition, it also makes the code paths between
bp2build and analysis more similar.

Bug: 186650430
Test: Presubmits.
Change-Id: Ic4393e8ae47f4e88816bf45c89399efd61494d22
2021-05-05 09:00:01 +02:00
Treehugger Robot
7308ea3915 Merge "bp2build: build static version of libstdc++." am: ee4e7fe76f am: 5603f8daac am: 6ea1ef4dde
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1693386

Change-Id: Ib6f3b7778ab8c3dab23f5ccaa61a456af4545644
2021-05-04 09:50:55 +00:00
Treehugger Robot
ee4e7fe76f Merge "bp2build: build static version of libstdc++." 2021-05-04 08:46:37 +00:00
Jingwen Chen
179856a69d bp2build: build static version of libstdc++.
This CL adds the ability to filter cc_library modules to only generate
their static variant of their shared variant isn't ready.

For example, the libstdc++ library is buildable as a static library,
which libc depends on. However, the shared variant of libstdc++ depends
on libc, which has to come later.

This CL introduces that abstraction to break up bp2build conversion into
more atomic steps to help with conversion.

Test: TH (bazel build //bionic/... incl. libstdc++'s static variant)
Bug: 186489250
Bug: 186822597

Change-Id: I3e2fe748e4e3d3b656760da4807f342d67c8f45f
2021-05-04 02:06:41 +00:00
Colin Cross
0e446159bc Support blueprint_go_binary in PathForModuleSrc
Allow blueprint_go_binary to be used as test data by supporting it in
PathForModuleSrc.

Also make python use GetDirectDepsWithTag instead of VisitDirectDeps
so it doesn't fail on the dependency to a Blueprint (non-Android)
module.

Fixes: 186528269
Test: manual
Change-Id: Ibc1d7caf7bf1fa5db805c3b885a95df4baee0ecf
2021-05-03 13:35:32 -07:00
Treehugger Robot
3f935125c0 Merge "Add fmtlib_ndk back to the deny list because it fails in mixed builds postsubmit." am: 1ea9624f9a am: 4949451e65 am: fc29dcc7a5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1693785

Change-Id: I38dbb967274b77e8061b26315742d9b0dceae916
2021-05-03 17:41:45 +00:00
Rupert Shuttleworth
52e6672613 Add fmtlib_ndk back to the deny list because it fails in mixed builds postsubmit.
But add it to the mixed builds deny list instead of the bp2build deny list.

Test: Waiting for another postsubmit to run.
Change-Id: Ief51356758304b3f13c95df401e310d4f5e236f7
2021-05-03 10:05:55 -04:00
Rupert Shuttleworth
6b1d39363e Update info on some deny-list entries. am: fb955387db am: 67d91646f1 am: e681f6a4a4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1693465

Change-Id: Id2a056e96859b2ef3ce6c6fa157afaf2c12a7fb5
2021-05-03 11:30:26 +00:00
Rupert Shuttleworth
fb955387db Update info on some deny-list entries.
(Some info has been relocated to blockers in Buganizer)

Also remove libjemalloc5 and fmtlib_ndk from the deny list as they don't seem to need to be there at the moment.

Test: bazel build //bionic/...
Test: build/bazel/scripts/run_presubmits.sh

Change-Id: I87e9dd3d4a83291efbcc15d6b99187b57d45ad18
2021-05-03 04:47:03 -04:00
Treehugger Robot
9549a3b092 Merge "Add debug ramdisk variant." am: cbaef6ff0f am: 33edfca5da am: 919995fc96
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690925

Change-Id: I9f8f5d7d65fb842879a63fcd084c1c392c806e36
2021-05-03 00:55:50 +00:00
Treehugger Robot
cbaef6ff0f Merge "Add debug ramdisk variant." 2021-05-02 23:54:40 +00:00
Chris Parsons
d41ece601b Support multilib properties in bp2build am: c424b76f76 am: 5b710bf057 am: eadbd4334d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1691268

Change-Id: I4c577e82886ef5cc60d074c7ccb638611625ad0f
2021-04-30 18:20:07 +00:00
Chris Parsons
c424b76f76 Support multilib properties in bp2build
This combines properties among "multilib" and "arch" stanzas in selects
generated by bp2build.

With this fix, libc_gdtoa may be removed from the denylist.

This change also refactors a portion of arch.go, specifically bp2build's
arch mutator, adding a number of comments along the way, to hopefully
make this code clearer for future readers.

Test: mixed_libc.sh
Change-Id: If2beea672957cfb1af6760406ba507181ec38f77
2021-04-30 13:21:36 -04:00
Lukács T. Berki
9dd3c62bd1 Merge "Handle the version_script property." am: dac1db044b am: 8e9c7d9212 am: 30b77b329e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690878

Change-Id: Ie1f640f7e1be2f99bdd9b1a7ae9aa6c472e16559
2021-04-30 15:14:32 +00:00
Lukács T. Berki
dac1db044b Merge "Handle the version_script property." 2021-04-30 14:50:19 +00:00
Lukacs T. Berki
1353e59690 Handle the version_script property.
Doesn't work when depends on arch/target/etc., but good enough for
libdl_android.

Bug: 186650430
Test: Presubmits.
Change-Id: Ib0facb41a89454717c74663e5e078aedd33d1b9c
2021-04-30 16:46:41 +02:00
Jingwen Chen
f541c62b33 Merge "bp2build: add bugs and update bp2build denylist." am: bb546aaea0 am: 2a205101c3 am: 6d722f14de
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690928

Change-Id: Ia2fdafb1753b5b77426b35e53afa8241fbf3f029
2021-04-30 13:57:38 +00:00
Rupert Shuttleworth
9efa7c96ce Update reasons for modules being on the deny list (and add bug links). am: 47aa58420b am: 2168230e8c am: ebd79bcb13
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1692285

Change-Id: I794f1ab75b2b3cc9a946ffc9bfb2df20d5876969
2021-04-30 09:46:13 +00:00
Jingwen Chen
790324e69c bp2build: add bugs and update bp2build denylist.
This CL updates the error messages and reorganizes the bottom half of
the bp2build denylist.

Test: TH
Change-Id: Ib15d019ba9cd006a78474477af34c66b5e418348
2021-04-30 09:43:20 +00:00
Rupert Shuttleworth
47aa58420b Update reasons for modules being on the deny list (and add bug links).
Test: bp2build; bazel build //bionic/...
Test: build/bazel/scripts/run_presubmits.sh

Change-Id: I852146b9df57689c022cb4e6c5b9e4a764866822
2021-04-30 04:28:49 -04:00
Jingwen Chen
27fcb666b6 Group some modules together under a single bug for tracking purposes. am: d01da05860 am: baf10be386 am: 3fd3d76d9c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690927

Change-Id: I7a7c64fa34bad7ff7e635f5cd52b1036b2649fbb
2021-04-30 06:07:24 +00:00
Jingwen Chen
d01da05860 Group some modules together under a single bug for tracking purposes.
Test: TH
Change-Id: I3f75bbd5c1455ab42d589d884a705bf09ef0b825
2021-04-30 03:33:15 +00:00
Inseob Kim
08758f08e9 Add debug ramdisk variant.
A module will be installed to /debug_ramdisk if debug_ramdisk is set to
true.

This is a reland of f84e9c05e2, with a fix
that removes /first_stage_ramdisk.

Bug: 184004542
Test: soong test
Change-Id: I739de63cfec6b0fec5a90f7c4741fc4d884d209c
2021-04-29 22:58:17 +09:00
Jingwen Chen
dced5fe04d Merge "bp2build: make libdl build." am: a4a930feef am: b5267deaf2 am: 5ada02a02f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1688296

Change-Id: I477374e839bde37981135e123dc6919cd563a9a2
2021-04-29 11:23:19 +00:00
Jingwen Chen
53681ef590 bp2build: make libdl build.
This CL adds support for the static and shared props, forwarding
whole_static_libs and srcs to the underlying shared library's
static_deps and static library's srcs respectively.

Test: TH
Fixes: 186609667
Change-Id: I84f838361c7758b256b2a163af894c502de03109
2021-04-29 08:59:02 +00:00
Treehugger Robot
345a0158dd Merge "bp2build: convert //external/arm-optimized-routines/..." am: af44591fbe am: 56a2ac8cd7 am: 237cf8208a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689686

Change-Id: I65057814376ebf243cfa5ace839da2fc21c24341
2021-04-29 07:08:33 +00:00
Jingwen Chen
282881683f bp2build: convert //external/arm-optimized-routines/...
Also update modules in denylist that depend on arm-optimized-routines libraries.

Bug: 186388919
Test: bazel build //external/arm-optimized-routines/...
Test: TH
Change-Id: If449b30288a4f852e5fcf31d923eda6cec1eb043
2021-04-28 22:11:44 +00:00
Steven Moreland
3a0bab5aae Merge "more no include_dir" am: 1cc8f451d1 am: 641a88278e am: 6b519e391e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1688777

Change-Id: I377d90c9c0b3188e1de380abbce698ac4185534f
2021-04-28 20:28:04 +00:00
Treehugger Robot
2e4f8b9612 Merge "Add GetEmbeddedPrebuilt and IsModulePrebuilt" am: 6065b0666a am: d6dcaa9cfd am: 3aa5cc2d5b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689388

Change-Id: I9a26bccb457bdba5a426ff4403d6181f41aa0e2c
2021-04-28 20:24:38 +00:00
Treehugger Robot
9c35175aec Merge "Update bp2build allow/denylisting for system" am: 12bcc130ea am: 109f42b6c8 am: 802550e18a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1688980

Change-Id: I66f55f73e7bdc40c3273ca8fbe1b20a25964a087
2021-04-28 20:23:23 +00:00
Steven Moreland
1cc8f451d1 Merge "more no include_dir" 2021-04-28 17:24:38 +00:00
Treehugger Robot
6065b0666a Merge "Add GetEmbeddedPrebuilt and IsModulePrebuilt" 2021-04-28 15:58:04 +00:00
Treehugger Robot
12bcc130ea Merge "Update bp2build allow/denylisting for system" 2021-04-28 15:53:42 +00:00
Lukács T. Berki
30a033a8b8 Merge "Remove libc_syscalls from the denylist." am: 331917a4c6 am: 92f0519e68 am: 20ea4926f6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689386

Change-Id: I5977fb4a815aecb4f845fa30344420862031348f
2021-04-28 14:20:50 +00:00
Paul Duffin
388c7abb3f Merge "Extract IsModuleInVersionedSdk" am: 8d817b70e6 am: 6c101d7be6 am: 9e21db0381
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689387

Change-Id: I5db0695a6e4ff05a39d6d158aa58b3cdab539d3e
2021-04-28 14:20:34 +00:00
Lukács T. Berki
331917a4c6 Merge "Remove libc_syscalls from the denylist." 2021-04-28 13:38:45 +00:00
Liz Kammer
b52cb2a3cf Merge "Make GetDirectDep implementation match comment" am: 8e72286b68 am: 2d52b2a03a am: 79f0a972fd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1688768

Change-Id: I0f3de6f5649da08739ae2e79e29016855ccc80f0
2021-04-28 13:35:20 +00:00