Commit Graph

3227 Commits

Author SHA1 Message Date
Paul Duffin ec0836af3a Switch Effective_license_text from []string to Paths
Effective_license_text contains paths to files that are copied from
one module to another and so need to be converted to Paths within the
context of the owning module as the paths are relative to the owning
module's directory.

The previous code did convert the license_text property to paths but
converted it back to strings again which was confusing and does not
follow the normal pattern.

Bug: 181569894
Test: m nothing
Change-Id: Iea09ee7f3de1187a2c3e41455ca83b0233d904b2
2021-05-11 08:24:59 +01:00
Paul Duffin df5a90502d Move license module processing to GenerateAndroidBuildActions
Previously, the processing of the license module was done in the
licensesPropertyFlattener method which is called for all modules before
their GenerateAndroidBuildActions method is called. This change moves
the processing into the license module's GenerateAndroidBuildActions
method which was previously empty to match the normal practice.

Bug: 181569894
Test: m nothing
Change-Id: I3736879bfa4b4d1f4e2b35770852a02d09b3db83
2021-05-11 08:24:59 +01:00
Paul Duffin e96108d797 Add baseline test for license with sdk
This change adds a test that includes license modules that are used by
modules which are part of an sdk but which does not yet copy the
license module into the snapshot. It includes the refactoring changes
needed to allow license modules to be used in an sdk test and provides
a baseline against which future changes can be compared.

Bug: 181569894
Test: m nothing
Change-Id: I60722f43cc9cc8375d97f46eb4c281e6c38987cd
2021-05-11 08:24:59 +01:00
Jooyung Han df09d173ca Generate linker config with packaged items.
Previously, we gather all deps without checking if a dep is actually one
of packaged items (CopyDepsToZip contents)

For example, following items shouldn't be listed.

provideLibs: "platform-mainline-sdk_libartpalette-system@current.so"
provideLibs: "platform-mainline-sdk_liblog@current.so"
provideLibs: "runtime-module-sdk_libc@current.so"
provideLibs: "runtime-module-sdk_libdl@current.so"
provideLibs: "runtime-module-sdk_libdl_android@current.so"
provideLibs: "runtime-module-sdk_libm@current.so"

Now, we gather only those modules contributing CopyDepsToZip to generate
linker config for android_system_image.

Test: m nothing
Test: m microdroid
Test: conv_linker_config print -s
    .../microdroid/android_common/root/system/etc/linker.config.pb
    shouldn't list sdk members.
Change-Id: Ife5d2193ab59970367d10e196aaaa922c6582862
2021-05-11 11:56:54 +09:00
Paul Duffin 0df49686b3 Add support for name-less modules and property comments
Bug: 181569894
Test: m nothing
Change-Id: Ia4da1d2a55a924db82ae999da455adedbaca47c0
2021-05-11 01:00:12 +01:00
Paul Duffin 1308205638 Allow an sdk member type not to provide a bp property
Bug: 181569894
Test: m nothing
Change-Id: I7e98f14cb377683457fba32fd05d6c614f78ffeb
2021-05-11 01:00:06 +01:00
Paul Duffin 0d4ed0ac56 Allow sdk snapshot to contain source module type
Bug: 181569894
Test: m nothing
Change-Id: I30513dd22e2719099a1a1ef63cacc98336d02e9f
2021-05-11 00:59:56 +01:00
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
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
Paul Duffin f7c99f5983 Add GetEmbeddedPrebuilt and IsModulePrebuilt
Dedups the many repetitions of the code to obtain a *Prebuilt from a
module.

Bug: 177892522
Test: m nothing
Change-Id: I1ededbe9ee79e89ea6dd8882dfee4be0bf0b51b7
2021-04-28 14:02:04 +01:00
Liz Kammer a3b5dcf9f2 Update bp2build allow/denylisting for system
Test: build/bazel/ci/bp2build.sh
Test: build/bazel/ci/mixed_libc.sh
Change-Id: I21b3e32f7a9b9235ea87d68cff425077c8a46ff9
2021-04-28 09:01:50 -04:00
Paul Duffin 8d817b70e6 Merge "Extract IsModuleInVersionedSdk" 2021-04-28 12:58:43 +00:00
Liz Kammer 8e72286b68 Merge "Make GetDirectDep implementation match comment" 2021-04-28 12:34:40 +00:00
Lukács T. Berki 6f753d00f0 Merge "Allowlist libpropertyinfoparser." am: f28abd1097 am: 637febe208 am: c869891471
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686214

Change-Id: Id4a6ee1fae33d4cf087a245c9a22dfaeb263d81c
2021-04-28 10:25:12 +00:00
Lukacs T. Berki 667bb27363 Remove libc_syscalls from the denylist.
It looks like eakammer@'s aosp/1684105 fixed it.

Test: Presubmits.
Change-Id: I166344bbf82ec4e4273cf30b7bb369dcb8ec4442
2021-04-28 11:54:46 +02:00
Lukács T. Berki f28abd1097 Merge "Allowlist libpropertyinfoparser." 2021-04-28 09:32:11 +00:00
Paul Duffin 8cc2b616c1 Merge "Pass module to SdkMemberTypeDependencyTag.SdkMemberType" am: 6a77e77cf9 am: a4e28eb6ef am: ef45d2ce43
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689067

Change-Id: If9d5acbb4aadab4d1b63693a919f1fdce754413b
2021-04-28 08:07:37 +00:00
Paul Duffin 6a77e77cf9 Merge "Pass module to SdkMemberTypeDependencyTag.SdkMemberType" 2021-04-28 06:56:59 +00:00
Lukacs T. Berki 497f17d227 Allowlist libpropertyinfoparser.
Or at least as much of it as needed for Bionic.

Bug: 186388932
Test: Presubmits.
Change-Id: Ic984f50a4869244cbdb6946dd9cca4d9e08445b7
2021-04-28 08:21:37 +02:00
Treehugger Robot 28a8e5c5fe Merge "Remove libdl_static from the deny list in light of http://aosp/1688405" am: 7001848182 am: f2357893b6 am: 9b449b201f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1688465

Change-Id: I7869c93a95a915f72ebf38fcf25063a98b9a2aea
2021-04-28 04:22:15 +00:00
Rupert Shuttleworth 6036497a3c Remove libdl_static from the deny list in light of http://aosp/1688405
Unfortunately libdl has to stay on the deny list due to an unrelated clang error in CI.

Test: bazel build //bionic/... now works with libdl and libdl_static both removed from the deny list.

Test: ./build/bazel/ci/bp2build.sh passes locally

Change-Id: I1b3c3dd01bc535c73c2e88c81b7998fa7906b4c5
2021-04-27 20:25:21 -04:00
Christopher Parsons a0cff02c76 Merge "Mixed builds: propagate includes from cc_* targets" am: 1c4621af62 am: bbd6afc3fd am: fc295efce3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1688945

Change-Id: I91e7a4243a34eab20acef77e87b2ee35b74e9261
2021-04-28 00:22:18 +00:00
Paul Duffin 0c2e08312c Extract IsModuleInVersionedSdk
Bug: 177892522
Test: m nothing
Change-Id: I348d380a0d29abdd6a84420be52cc1b674f2a7ab
2021-04-28 00:39:52 +01:00
Christopher Parsons 1c4621af62 Merge "Mixed builds: propagate includes from cc_* targets" 2021-04-27 23:10:33 +00:00
Roman Kiryanov 23cb57b717 Merge "Remove libqemu_pipe from minSdkVersionAllowlist" am: 5796db599f am: 9d03d58442 am: 4a52aea8f1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1688970

Change-Id: I7990e59eb3662c3b09aeac23e3827024486519a2
2021-04-27 23:03:55 +00:00
Paul Duffin eee466e439 Pass module to SdkMemberTypeDependencyTag.SdkMemberType
This change allows an SdkMemberTypeDependencyTag to select the
SdkMemberType to use to add a dependency based on the module.

Bug: 177892522
Test: m nothing
Change-Id: I2d6e51b615636dc7cd41da65808ef851dd8ae6ac
2021-04-27 23:23:20 +01:00
Roman Kiryanov 5796db599f Merge "Remove libqemu_pipe from minSdkVersionAllowlist" 2021-04-27 21:54:58 +00:00
Roman Kiryanov fc48433640 Remove libqemu_pipe from minSdkVersionAllowlist
libqemu_pipe was retired.

Bug: 175046060
Test: presubmit
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: I4ac17966ad2a7609a9d71b8884351d70b5996b9d
2021-04-27 13:05:48 -07:00
Liz Kammer 2b50ce669c Make GetDirectDep implementation match comment
The comment on the interface of GetDirectDep states if there are
multiple deps with different tags, the first will be returned; however,
the current behavior is to panic if there are multiple deps. The
behavior now:
* a single dep, return the module and tag
* a single module with different tags: return module with first tag
* multiple modules: panic
* no module: return nil, nil

Bug: 186488405
Test: ~/aosp/build/bazel/ci/bp2build.sh
Test: m nothing
Change-Id: Id1e7315e7874b4a683ad7357ed2793822315821f
2021-04-27 15:53:51 -04:00
Chris Parsons f60ecf081e Mixed builds: propagate includes from cc_* targets
This allows us to remove libasync_safe from the mixed builds denylist.

Test: mixed_libc.sh CI script
Change-Id: Ibafd231284864078bf30340f919d39e5098843ce
2021-04-27 15:04:37 -04:00
Steven Moreland f36a3ac8b8 more no include_dir
Add a few more paths.

Bug: N/A
Test: N/A
Change-Id: Ib9503c2c792c4e93e30be631406e7e8314e6af31
2021-04-27 18:03:55 +00:00
Steven Moreland ae5453f6ad Merge "start eating include_dirs from both ends" am: ac9dc817b8 am: 294019346e am: 0cac14f204
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1687472

Change-Id: Id6a353e4e697c2ed783b0b83e8361ee34a263e9a
2021-04-27 17:42:41 +00:00
Steven Moreland ac9dc817b8 Merge "start eating include_dirs from both ends" 2021-04-27 16:34:24 +00:00
Lukács T. Berki bd018b4e34 Merge "Reorganize and cull cc_library_static denylist." am: c860588763 am: 39997be8de am: 752fd9545b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1687871

Change-Id: I94200ce2a4cd8439fda2bc1260a0b07ff93ef581
2021-04-27 15:43:28 +00:00
Lukács T. Berki c860588763 Merge "Reorganize and cull cc_library_static denylist." 2021-04-27 14:42:00 +00:00
Treehugger Robot ddff27cde6 Merge "bp2build: fix exclude_srcs in subpackages." am: 6de44e74c8 am: cc2142c684 am: 5132601632
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1687510

Change-Id: Ic93ffff60b9522c4163e0a76942e089655653cfb
2021-04-27 14:39:16 +00:00
Treehugger Robot 6de44e74c8 Merge "bp2build: fix exclude_srcs in subpackages." 2021-04-27 13:48:46 +00:00
Jingwen Chen 2ac07ef533 bp2build: arch-specific exclude_srcs and srcs. am: e32e9e07d7 am: ced8f4de70 am: e502413a8e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1684590

Change-Id: Iefff3fe126f3f434f123a7ef6be157a2df863f73
2021-04-27 13:45:19 +00:00
Lukacs T. Berki b5ac5af618 Reorganize and cull cc_library_static denylist.
Take two: this time, put libasync_safe on the mixed build denylist
because it seems to break things.

Test: Presubmits + testing the offending action using a Ninja
invocation. "m droid dist" also running.

Change-Id: I7912b6670980776d981d874dab157b0268693ab2
2021-04-27 15:00:45 +02:00
Jingwen Chen e32e9e07d7 bp2build: arch-specific exclude_srcs and srcs.
OS-specific exclude_srcs and srcs will be done in a follow-up, due to
complexities from merging multiple select statements together.

Test: TH
Bug: 186153868
Change-Id: I01b881e9a5a7cd41b4a507f8be7e9e65eab37bdc
2021-04-27 11:02:07 +00:00
Jingwen Chen 4ecc67d3c5 bp2build: fix exclude_srcs in subpackages.
In a non-top level Android.bp file, exclude_srcs was not working at all
due to a bug in expandSrcsForBazel. GlobFiles was expanding a glob
relative to root, but the expandedExcludes list was relative to the
module dir, causing the glob function to not consider the
expandedExcludes list at all.

Add tests to demonstrate that this is working now.

Test: TH
Bug: 186388919
Change-Id: Ice8254231d085b39126e91b823a09ec328ee0ae0
2021-04-27 09:51:08 +00:00
Steven Moreland 8fc8dbf70c start eating include_dirs from both ends
Further restrictions on a restricting build configuration. Before, we
restricted certain paths from being included. Now, we restrict certain
paths from including.

This adds system/libfmq for now, but I'm planning to add more in the
future, as they are cleaned up.

Bug: 35624006
Test: m nothing
Change-Id: I913f190f93ab63059ee0372d342daa8f5584806b
2021-04-27 02:56:03 +00:00
Treehugger Robot 47b2cba405 Merge "Revert "Reorganize and cull cc_library_static denylist."" am: 1f8a7f06d9 am: 429d1d9d5b am: 93dc5cee68
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1687146

Change-Id: I191e8b8b38d20813b90b2d34ab13caa3133d34d9
2021-04-27 01:03:13 +00:00
Liz Kammer cc86ac88a8 Revert "Reorganize and cull cc_library_static denylist."
This reverts commit cba7b0c43c.

Reason for revert: mixed_droid failing: libbacktrace fails due to libasync_safe, linkerconfig (and others) due to duplicate symbols

Change-Id: Ib6dd6bbb6f76048a7abd0970d457cf75921beae6
2021-04-26 22:17:48 +00:00
Lukács T. Berki 7e01a8376c Merge "Reorganize and cull cc_library_static denylist." am: 2567d80414 am: a373cd60e6 am: 6571ae1704
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683872

Change-Id: Id45e549f498bf87be9891969a89d3bcd44cc7916
2021-04-26 20:28:29 +00:00
Lukacs T. Berki cba7b0c43c Reorganize and cull cc_library_static denylist.
Test: Presubmits.
Change-Id: Ia82d5b6975fe53888798db0378635ec36b43603e
2021-04-26 18:54:28 +02:00
Paul Duffin ff79fcac84 Allow exporting of sdk members to be done per tag am: a720811c38 am: 68dc0a1210 am: 7cfcf56b07
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686073

Change-Id: Iaf2d2f7776ab4873ae290023ce5c783fe50eb1b6
2021-04-25 09:22:18 +00:00
Paul Duffin a720811c38 Allow exporting of sdk members to be done per tag
Previously, every module added to an sdk directly through one of the
SdkMemberType specific properties, e.g. java_libs, was exported and
every module added automatically via a transitive dependencies was not
exported. This change allows that behavior to be customized per tag.

Bug: 186290299
Test: m art-module-sdk
      - verify that this change does not affect its contents.
Change-Id: I563b5bcd823e61c23cdb706cfcbb13337963d550
2021-04-24 22:30:26 +01:00
Treehugger Robot a7a7781907 Merge "Incorporate cc_library_headers into mixed builds" am: 459c532e44 am: f3a8a7aeaf am: fc49cc7de6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1673770

Change-Id: I2234c40a8b091e82da7417de483f92624870d6f1
2021-04-23 16:05:18 +00:00
Treehugger Robot 459c532e44 Merge "Incorporate cc_library_headers into mixed builds" 2021-04-23 15:14:55 +00:00
Treehugger Robot bc2cb768b5 Merge "Revert^3 "Add debug ramdisk variant"" am: 39e03144a0 am: f842949de1 am: af0fb26f44
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1684312

Change-Id: I3eed155076e03d06e190e0262e80522fefdaea3b
2021-04-23 14:02:48 +00:00
Liz Kammer 9bd823c0cb Merge "Add bp2build arch-specific paths mutator" am: dbe1ef2149 am: c85cd7cf01 am: 59470e22ad
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1684105

Change-Id: I1ffabc7223b93436703ee966a6534f0ea9aefe76
2021-04-23 14:01:40 +00:00
Liz Kammer b6a55bf065 Incorporate cc_library_headers into mixed builds
Test: go soong tests
Test: bp2build generate & sync; mixed build libc; mixed build su (su is
      an Android.mk target that relies on converted a cc_library_headers)
Bug: 181552740
Change-Id: I9efd587970551fd41f642a208f0aa0a80e8694e0
2021-04-23 09:37:33 -04:00