Commit Graph

3227 Commits

Author SHA1 Message Date
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
Treehugger Robot 39e03144a0 Merge "Revert^3 "Add debug ramdisk variant"" 2021-04-23 13:09:24 +00:00
Liz Kammer dbe1ef2149 Merge "Add bp2build arch-specific paths mutator" 2021-04-23 12:50:05 +00:00
Lukacs T. Berki d5295f6601 Update error messages. am: f8645b93b4 am: 50f6687c85 am: 6aa1336255
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683879

Change-Id: I6f1633cd162645e2eaed5b948e2abfa8c486a7d0
2021-04-23 10:25:12 +00:00
Lukacs T. Berki f8645b93b4 Update error messages.
For libm and libseccomp_policy in particular.

Test: Presubmits.
Change-Id: I778a466b7736e25aa4486335976847e8c5cf645f
2021-04-23 09:07:28 +02:00
Inseob Kim aeb6bad073 Revert^3 "Add debug ramdisk variant"
836a8f3d61

Change-Id: If59529238e26a197bc33b10245b88f538f280ed0
2021-04-22 23:14:58 +00:00
Rupert Shuttleworth ec6e80f563 Merge "Add libc_openbsd to mixed builds deny list." am: be1c47b216 am: 5150ab815d am: 369f329c44
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1684906

Change-Id: I437a288a7da625831bc790c1414098f8e7a975d7
2021-04-22 19:29:50 +00:00
Rupert Shuttleworth be1c47b216 Merge "Add libc_openbsd to mixed builds deny list." 2021-04-22 17:46:33 +00:00
Rupert Shuttleworth 5baca302df Add libc_openbsd to mixed builds deny list.
Test: USE_BAZEL_ANALYSIS=1 m linkerconfig
Change-Id: I59386d7d70a9a3c0cabe1b641284dfbd131d532d
2021-04-22 13:41:37 -04:00
Treehugger Robot f72ba1cb46 Merge "Support paths for vintf_fragments from Soong." am: 1552c7b178 am: 193651c2ae am: 0b77156774
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1677041

Change-Id: Ibfed6d59dba34481a0f263aadff065fa178d5f5c
2021-04-22 17:22:51 +00:00
Florian Mayer 602af75c16 Merge "Revert^2 "Add debug ramdisk variant"" am: 4d48aa5255 am: 723ac288a4 am: 17c91a2916
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683875

Change-Id: I9486725cf4cd1b49f58af62f54a4d3749d5933e9
2021-04-22 17:22:19 +00:00
Rupert Shuttleworth 8ec072b794 Merge "Allow more cc_library_static targets to build." am: 80c2377089 am: 39cec3c1dd am: 40a47c28da
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1677125

Change-Id: I5953d7af26f7bcd7bcc77c8b767d9f69397f8ca3
2021-04-22 17:22:08 +00:00
Treehugger Robot 1552c7b178 Merge "Support paths for vintf_fragments from Soong." 2021-04-22 17:03:31 +00:00
Florian Mayer 4d48aa5255 Merge "Revert^2 "Add debug ramdisk variant"" 2021-04-22 16:40:24 +00:00
Florian Mayer 836a8f3d61 Revert^2 "Add debug ramdisk variant"
78ea2f5eac

Change-Id: I6a6a2ee82e2807045364bab105ec03a1934b411f
2021-04-22 16:38:47 +00:00
Treehugger Robot 0b3271220f Merge "Revert "Add debug ramdisk variant"" am: f9c6744e28 am: ae210266fd am: e6bdf43b20
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1684345

Change-Id: Ic652022b750d9aad6f88f2feb742e0b84426cf9e
2021-04-22 16:18:05 +00:00
Rupert Shuttleworth 80c2377089 Merge "Allow more cc_library_static targets to build." 2021-04-22 16:07:20 +00:00
Treehugger Robot f9c6744e28 Merge "Revert "Add debug ramdisk variant"" 2021-04-22 15:28:06 +00:00
Anton Hansson 67e20e2ff8 Merge "Add new stub_only_static_libs attr for sdk_library" am: 24eac476d4 am: ec47b30e0e am: 05ecab28a3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682097

Change-Id: Ie716a56bd455bead4ee1bad88203cb7d24d10512
2021-04-22 13:39:57 +00:00
Anton Hansson 24eac476d4 Merge "Add new stub_only_static_libs attr for sdk_library" 2021-04-22 12:41:46 +00:00
Anton Hansson dae54cd84f Add new stub_only_static_libs attr for sdk_library
Allow java_sdk_libraries to include libraries statically into their
stubs. The immediate use-case of this is to embed libcore notice files
into their stubs.

Also extend the java_sdk_library tests for impl/stub-only-libs, plus
some not assert utils.

Bug: 173186484
Bug: 184839599
Test: soong tests
Change-Id: I1ebf2f35c048eab5cec5125482a0304fe660f188
2021-04-22 10:20:13 +01:00
Rupert Shuttleworth e5c719e124 Allow more cc_library_static targets to build.
- libc_openbsd_large_stack
- libc_openbsd

Also update the lib_dns comment as it makes more progress now (still fails).

Test: bp2build; bazel build //bionic/...
Test: USE_BAZEL_ANALYSIS=1 m libc

Change-Id: I54f104d359779420d181f195ecbfc9e1269e30be
2021-04-22 01:46:06 -04:00
Rupert Shuttleworth 51fbe9023c Merge "Add various test files as testSrcs, so that they run on CI." am: dac451715b am: 950c2381dd am: bd7a5537b8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683265

Change-Id: I689bd1e06c0ddf6166d8ff01496898095df72c97
2021-04-22 04:17:02 +00:00
Rupert Shuttleworth dac451715b Merge "Add various test files as testSrcs, so that they run on CI." 2021-04-22 03:08:21 +00:00
Bowgo Tsai 78ea2f5eac Revert "Add debug ramdisk variant"
This reverts commit f84e9c05e2.

Because this breaks the usage of boot-debug.img and
vendor_boot-debug.img

Bug: 185970130
Bug: 185990198
Test: make bootimage_debug
Change-Id: I7886c971982faae1d5bc34688643de8d94d6e201
2021-04-22 09:49:24 +08:00
Treehugger Robot 5c1084e2dd Merge changes I9a08bbc0,I049d1bb9 am: 752d63cd83 am: e8bfb5a3a0 am: 13fc2fa05c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682583

Change-Id: I482e37b3d8832ac9393d869932ce7e2a29d49117
2021-04-22 00:31:32 +00:00
Treehugger Robot 752d63cd83 Merge changes I9a08bbc0,I049d1bb9
* changes:
  Add validations to RuleBuilderCommand
  Fix bug in RuleBuilderCommand.OrderOnlys
2021-04-21 23:06:33 +00:00
Liz Kammer 4562a3b218 Add bp2build arch-specific paths mutator
Adds deps for properties tagged `android:"path"` within arch, multilib,
and target properties.

Test: build/bazel/ci/bp2build.sh
Test: m nothing
Bug: 185217298
Change-Id: I0230da399d2c4e984b837f69523fa09eadba3ff1
2021-04-21 18:21:50 -04:00
Colin Cross ae89abe381 Add validations to RuleBuilderCommand
Add RuleBuilderCommand.Validation and RuleBuilderCommand.Validations
that propagate to BuildParams.Validations.

Test: TestRuleBuilder_build, TestRuleBuilder
Change-Id: I9a08bbc073a432fd0b53b87d8948ac0f6afcf637
2021-04-21 11:46:50 -07:00
Colin Cross da6401b770 Fix bug in RuleBuilderCommand.OrderOnlys
Order only dependencies that were added to a RuleBuilderCommand were
only propagated to the rule that was created for a missing dependencies
error.  Set them on the main rule instead.

Test: TestRuleBuilder_build
Change-Id: I049d1bb921778d18d678439d236f69081927dc70
2021-04-21 11:46:49 -07:00
Paul Duffin d6661071f9 Merge "Add PrepareForDebug_DO_NOT_SUBMIT" am: 893b2fda41 am: fead82b508 am: 1ac08937bc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682088

Change-Id: Ic74b873b70a085b7c055bbd8bfd505bb4edd0073
2021-04-21 18:25:36 +00:00
Paul Duffin 893b2fda41 Merge "Add PrepareForDebug_DO_NOT_SUBMIT" 2021-04-21 17:10:40 +00:00
Rupert Shuttleworth ef5164dda7 Merge "Generate BUILD files for every directory that has an Android.bp file." am: 4949557d50 am: de3feaefd4 am: cc48cb4651
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1677620

Change-Id: Ib836d0ec5ff97e0354119259c3ca2f9de538723b
2021-04-21 15:47:11 +00:00
Treehugger Robot fbf91b5f09 Merge "Fix bazel_handler_test.go" am: 6ac2955537 am: 5257ba0d95 am: c53391924e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682689

Change-Id: Idcfcdd44a2d9665229b795e457bab412f6923f94
2021-04-21 15:47:05 +00:00
Rupert Shuttleworth b7e30760af Add various test files as testSrcs, so that they run on CI.
Test: go test
Test: TH (now that these are hooked up to TH)

Change-Id: Ia199794ef1a64074f3f9159f8c160ba3e45fd181
2021-04-21 11:23:57 -04:00
Rupert Shuttleworth 4949557d50 Merge "Generate BUILD files for every directory that has an Android.bp file." 2021-04-21 14:51:28 +00:00
Liz Kammer 7b3dc8a259 Support paths for vintf_fragments from Soong.
The property vintf_fragments accepts paths and references to other
modules; however, none of that is passed onto make, resulting in errors
if a non-local path is used.

Test: m
Bug: 184567830
Change-Id: If3b56ea8eec3b95b3a310b58bffd045cedd8ee52
2021-04-21 09:11:32 -04:00
Liz Kammer 286c9fafa6 Fix bazel_handler_test.go
Test: go test soong tests
Bug: 185963707
Change-Id: I738fead29c7054e9deaf03fd3e37d6862309885e
2021-04-21 08:46:34 -04:00
Rupert Shuttleworth 2a4fc3ecdc Generate BUILD files for every directory that has an Android.bp file.
Test: Added an integration test
Test: bazel build --package_path=out/soong/workspace //bionic/...

Change-Id: Ie34bd23ab3c5428e6c9c9919e5fb6fcb4e709adc
2021-04-21 07:15:50 -04:00
Paul Duffin 64715ba9a4 Add PrepareForDebug_DO_NOT_SUBMIT
Simplifies the process of debugging failing tests by making it easy for
the test fixture to produce debug output on a case by case basis.

Bug: 181070625
Test: m nothing
Change-Id: I22620a1bfb1737cffd017bdf7bbbfb609b60468c
2021-04-21 10:16:31 +01:00
Jingwen Chen 8a2ce56dd3 Merge "Rename Label.Bp_text to OriginalModuleName." am: eff37d79bd am: d6d30b2e43 am: ad581e3a8a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1679065

Change-Id: I76623998eb1fbcd4d57424bc75722d9c5ce89f0a
2021-04-20 22:40:37 +00:00
Jingwen Chen eff37d79bd Merge "Rename Label.Bp_text to OriginalModuleName." 2021-04-20 21:45:18 +00:00
Treehugger Robot e64e7c6a5c Merge "Incorporate filegroups into mixed builds." am: 61d83e90b1 am: 6067592100 am: 8c41aa78f6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1679689

Change-Id: I06373f9d542359430fa2042ecbf8fc04d29e4592
2021-04-20 21:22:37 +00:00
Treehugger Robot 61d83e90b1 Merge "Incorporate filegroups into mixed builds." 2021-04-20 18:53:03 +00:00
Lukács T. Berki c39b2572d9 Merge "Call mixed mode Bazel in the symlink forest." am: b8ea9f3cc8 am: e0496ed844 am: 71e3b0894b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1679774

Change-Id: I2486faa4698694eb5e28ed34f086b7da688cdb7d
2021-04-20 17:14:35 +00:00
Lukacs T. Berki d6cd813abc Call mixed mode Bazel in the symlink forest.
Test: Presubmits + manual execution.
Change-Id: Idef2d821222ccbf9385d0ea3fc92178b3206df0a
2021-04-20 17:43:02 +02:00
Jingwen Chen 38e6264fff Rename Label.Bp_text to OriginalModuleName.
OriginalModuleName is a clearer name for what the field represents.

Also document it.

Follow-up from aosp/1675466.

Test: TH
Change-Id: Ie1152b5ae63f388164582be70e193a91ef96c89c
2021-04-20 05:29:48 +00:00
Chris Parsons 5db4828abb Add a denylist for specifically mixed builds am: bab4d7e3bc am: 2678212a0f am: cd40ec4e44
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1677624

Change-Id: Ie9b5de425df4cc868fb851b49fefa0039900f50c
2021-04-19 20:12:36 +00:00
Liz Kammer 5bde22ff15 Incorporate filegroups into mixed builds.
Test: bp2build generate & sync; mixed build droid
Bug: 185812083
Change-Id: I09d4203ec52acaacb11f371a6ae03b12214938f7
2021-04-19 15:50:20 -04:00
Chris Parsons bab4d7e3bc Add a denylist for specifically mixed builds
This allows us to, for certain modules, enable bp2build, but disable
mixed builds.
This facilitates easier iteration on these two features, as modules can
be incrementally "fixed" for bp2build, even if they are not ready for
mixed builds integration.

Test: USE_BAZEL_ANALYSIS=1 m libc
Test: Manually verified that note_* modules exist in bionic/libc/BUILD
Test: bazel build //bionic/....
Change-Id: I3462c8398680140cfc953443d96196143b8ad0a3
2021-04-19 12:30:02 -04:00
Treehugger Robot ad3b9d177b Merge "ApiLevel of "" and "core_platform" is FutureApiLevel" am: d419826d8b am: 220dc9917d am: bdfc233f99
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1675769

Change-Id: I725aca7f1e1912463fb96266d17956914809cef2
2021-04-17 00:52:15 +00:00
Treehugger Robot d419826d8b Merge "ApiLevel of "" and "core_platform" is FutureApiLevel" 2021-04-16 23:35:42 +00:00
Liz Kammer 69f3234fb9 Merge "Split bazel -path functions and clarify docs" am: ebf17ee04a am: 6b5e3487cb am: 42aa12fa01
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1676035

Change-Id: Id3a4324443a95ce662a485698eccc1e38c4e0f55
2021-04-16 21:40:52 +00:00
Treehugger Robot 24b6c3f2c1 Merge "Denylist two targets that fail for non-x86_64" am: 744fb40e5f am: caf9189c67 am: d011f466fb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1677968

Change-Id: I0e1b96f0582bf4c0983c873261fff5bbce73836c
2021-04-16 21:09:29 +00:00
Liz Kammer ebf17ee04a Merge "Split bazel -path functions and clarify docs" 2021-04-16 20:38:43 +00:00
Liz Kammer cefa3c75be Denylist two targets that fail for non-x86_64
Test: demo.sh full
Fixes: 185582610

Change-Id: I620029eaaa7dc46d2434c382867b08eacbd9eb91
2021-04-16 11:51:06 -04:00
Treehugger Robot d8c1882e91 Merge "Clean up package names." am: 3eb2312db6 am: a8ec3f4240 am: 6d17f977ef
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1677326

Change-Id: I6af2e7047a5bb4dda24782656a745db72d76547b
2021-04-16 15:12:19 +00:00
Treehugger Robot 3eb2312db6 Merge "Clean up package names." 2021-04-16 13:46:22 +00:00
Treehugger Robot 414193ebb7 Merge "Fix discordance between marshall/unmarshall for ArchType" am: 53932eca91 am: 55a7beb213 am: 48225e34ed
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1675471

Change-Id: I70aa9e03cf4788afdfa2a967a78fb3379168f7bb
2021-04-16 04:47:40 +00:00
Treehugger Robot 53932eca91 Merge "Fix discordance between marshall/unmarshall for ArchType" 2021-04-16 03:36:29 +00:00
Jiyong Park cc7628c5fa Merge changes Ib07d4410,I0b306292 am: 7b4fb51919 am: 24f37728ee am: 08956ce9b5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1675766

Change-Id: If2a5d89e4e51b6a8813daf082a910f2dea91f604
2021-04-16 00:27:39 +00:00
Treehugger Robot 2619faa441 Merge "Remove draft API support." am: 7548b1ad05 am: 0ccb169046 am: c1499a90e2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1674968

Change-Id: I281cb957b9214fdd9d90c6ec6e95c5c69a4f5c96
2021-04-16 00:27:22 +00:00
Jiyong Park 7b4fb51919 Merge changes Ib07d4410,I0b306292
* changes:
  ApexInfo doesn't pass MinSdkVersion as string, but as ApiLevel
  Remove nativeApiLevelFromUserWithDefault
2021-04-15 23:21:55 +00:00
Treehugger Robot 7548b1ad05 Merge "Remove draft API support." 2021-04-15 22:58:15 +00:00
Bob Badour 414719e915 Clean up package names.
Use license name unless package name is given.

Change the package name for the default android license to Android.

Test: m all
Change-Id: I0049b08fc4955a838e33c8bcfed104dbbf8ec7b1
2021-04-15 12:43:39 -07:00
Liz Kammer 620dea6720 Split bazel -path functions and clarify docs
Test: go test
Change-Id: I62f58998fc7d52c67ed5acfdb8230d404b2a5472
2021-04-15 13:00:42 -04:00
Lukács T. Berki 5c39599d43 Merge "Make bp2build be more correct." am: a52ae26e91 am: 82dfffcc54 am: 7a6a4b44c4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1675519

Change-Id: I5abe9e542fae02493788274774ba2d7fc3fe6a11
2021-04-15 15:19:31 +00:00
Lukacs T. Berki d518e1a407 Make bp2build be more correct.
It now handles adding .bp files and changing globs.

In order to do this, depfiles are now written separately from RunBlueprint.

This is necessary due to the confluence of a number of seemingly
unrelated factors:

1. The glob filelist dependencies are discovered in globSingleton
2. Singletons need to be registered because otherwise singleton module
   types panic
3. Singletons don't work because they require mutators bp2build does not
   run

Due to (1), we would need to run the glob singleton. However, due to (2)
and (3), we can't run singletons and have to run Blueprint with
StopBeforeGeneratingBuildActions, which is when the build actions
writing glob files would be generated. So what happens is:

1. When bp2build is run, the glob singleton is disabled
2. At the end of bp2build, the list of glob files is artifically added
   to the depfile of the workspace marker file
3. When build.ninja is generated, the Ninja file containing the glob
   list file is written by the now-active glob singleton

Test: Presubmits.
Change-Id: I3c5898d8c57c554a93520276c64a952afc912dbe
2021-04-15 13:06:16 +02:00
Jiyong Park c702204306 ApiLevel of "" and "core_platform" is FutureApiLevel
If sdk_version is set to "", it means the module is built with the
in-development version of the platform APIs. "core_platform" means the
in-development version of the core Java APIs. In both cases, the API
level (i.e. which version to use) is the in-development version.

Bug:  1663140
Test: m

Change-Id: Ia184190341223e9ac12710a8bb3a25004fd4f539
2021-04-15 16:53:23 +09:00
Treehugger Robot 8c7ceeccdd Merge "Transform paths to headers in include dirs to take package boundaries into account." am: b06a4bd400 am: 42599cfc57 am: 36c57bdfb3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1673638

Change-Id: I8a1ec7755fdafe6c8eb71ccb3765bb9e44c8fd72
2021-04-15 07:20:30 +00:00
Treehugger Robot 3c58641466 Merge changes from topic "userdebug_plat_sepolicy.cil_Android.bp" am: 638830a5a0 am: d8a1386fba am: 7d5dc83e3b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1674328

Change-Id: Ic6146823d24ddbfcc7706d33ee2d17bad9471325
2021-04-15 07:20:23 +00:00
Inseob Kim 1e9e06373e Add path tests for ramdisk am: d9580b84a2 am: df6f8f8fa8 am: 5271dce3dd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1674327

Change-Id: I9b199042d08b0e6022c7e2a281e622ec2b87b420
2021-04-15 07:20:19 +00:00
Jiyong Park 4eab21d5a2 ApexInfo doesn't pass MinSdkVersion as string, but as ApiLevel
ApexInfo is not part of the properties struct. It can handle structs
having private fields.

Bug: 1663140
Test: m
Change-Id: Ib07d4410f0ce187c9de347da34b84b814b2eb537
2021-04-15 15:17:54 +09:00
Treehugger Robot 507c35d88f Merge "Fix evaluation order of (Cfi|Memtag) exclude paths." am: d820c37425 am: 6ff0d4084e am: 4182f482f4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1672705

Change-Id: I4c10f9ccf8cbaae2dc0e3b953e7c4db0368f073a
2021-04-15 05:50:56 +00:00
Inseob Kim df6f8f8fa8 Add path tests for ramdisk am: d9580b84a2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1674327

Change-Id: I128281177de9109e7e47fb78689377296134b860
2021-04-15 05:44:25 +00:00
Treehugger Robot b06a4bd400 Merge "Transform paths to headers in include dirs to take package boundaries into account." 2021-04-15 05:42:40 +00:00
Treehugger Robot 638830a5a0 Merge changes from topic "userdebug_plat_sepolicy.cil_Android.bp"
* changes:
  Add debug ramdisk variant
  Add path tests for ramdisk
2021-04-15 05:22:35 +00:00
LuK1337 955d0e72f2 Make sure prebuilt modules are exported before attempting to use them am: fb545bf2f3 am: fa52ea69bf am: 2e434b4f70
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1545468

Change-Id: Ic4ecbedbe6c11992232ea3981b002de4d988bf2b
2021-04-15 04:21:00 +00:00
Treehugger Robot d820c37425 Merge "Fix evaluation order of (Cfi|Memtag) exclude paths." 2021-04-15 03:49:38 +00:00
Inseob Kim f84e9c05e2 Add debug ramdisk variant
A module will be installed to debug_ramdisk (or
debug_ramdisk/first_stage_ramdisk if recovery as boot is true) if
debug_ramdisk is set to true.

Bug: 184004542
Test: soong test
Change-Id: Ic5a4d27407e506fffa462de2149e0785f11b2ac7
2021-04-15 00:56:30 +00:00
Jeongik Cha bec4d038bb Fix discordance between marshall/unmarshall for ArchType
Test: m nothing
Bug: 158843648
Change-Id: Id9901d49b368c2730830e1c95447b596d9e52042
2021-04-15 08:55:38 +09:00
Rupert Shuttleworth c143cc50dd Transform paths to headers in include dirs to take package boundaries into account.
This allows the following cc_library_static targets to build with bp2build:

- libc_freebsd
- libc_freebsd_large_stack
- libc_openbsd_ndk
- libc_gdtoa  (* but still fails for mixed builds)
- libc_aeabi
- libc_static_dispatch
- libc_dynamic_dispatch

This also allows a number of other cc_library_static targets to progress further in their builds.

Test: Added unit test
Test: bp2build-sync.py write; bazel build //bionic/...

Change-Id: I71742565c16594448a41a6428a5c993171ec4cb4
2021-04-14 17:05:36 -04:00
LuK1337 fb545bf2f3 Make sure prebuilt modules are exported before attempting to use them
Fixes an issue where prebuilt module under unexported soong
namespace overrides source modules when flag `prefer` was set.

Test: Create two modules under the same name, use cc_library_shared
      for first one and cc_prebuilt_library_shared with `prefer` set
      to true.
      Then put the prebuilt module under `soong_namespace {}` and
      attempt to compile it without appending the namespace path to
      product namespaces.
      Without this change it should fail to resolve the
      cc_library_shared module even if it should be available.

Change-Id: I506641218e6af94a0b5f048e09e06d83602e50f5
2021-04-14 22:55:22 +02:00
Jiyong Park f398995a64 Merge "SdkSpec is fully using ApiLevel" 2021-04-14 13:27:05 +00:00
Inseob Kim d9580b84a2 Add path tests for ramdisk
Ramdisk path tests existed once, but have been removed for whatever
reason. This change revives the tests.

Test: soong test
Change-Id: Ibade91fbe3e044f772a50df15f448b04aa12d807
2021-04-14 12:24:45 +00:00
Lukács T. Berki c0d7a15cdf Merge "Delete android/env.go ." am: c11f269933 am: 69f44aadfc am: 3855dad781
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1672098

Change-Id: I4913d5d6630f2933f7726cc1bfe1899db8597d50
2021-04-14 08:01:32 +00:00
Lukács T. Berki c11f269933 Merge "Delete android/env.go ." 2021-04-14 05:47:58 +00:00
Dan Albert d05ba00415 Remove draft API support.
This is unused and doesn't work with our current API review process
anyway (un-drafting an API won't be flagged for API council review).

Test: treehugger
Bug: None
Change-Id: I6d8fcc9885b82dac5ada7772d9e3fb9101524ece
2021-04-13 15:55:47 -07:00
Treehugger Robot 44a782d019 Merge "Add tests for request_type ParseResult functions." am: 6bd0a19b9d am: e41f177874 am: e236eb6394
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1672428

Change-Id: I519f147c9db2e60582a7e3537b724d2f39131900
2021-04-13 21:12:59 +00:00
Liz Kammer 3c05ed947b Merge "Consolidate cc-specific cqueries." am: 41cca851d9 am: b50de53589 am: 3b3c5a1a12
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1672347

Change-Id: Ice69a3d4523b9cdc0cbc17cb59e6c27791d51dd1
2021-04-13 19:12:15 +00:00
Colin Cross 4e2f69de15 Merge "Follow blueprint change to return GlobResult from Glob" am: 66d154e436 am: 02fd994651 am: 6b31915982
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1668888

Change-Id: I7375aa1886000d2bb274e33c40a506acfc620618
2021-04-13 19:12:06 +00:00
Treehugger Robot 6bd0a19b9d Merge "Add tests for request_type ParseResult functions." 2021-04-13 19:08:11 +00:00
Evgenii Stepanov 779b64ec5d Fix evaluation order of (Cfi|Memtag) exclude paths.
Before this change, exclude paths disabled sanitization of targets that
would otherwise be enabled by SanitizeDevice product variable (aka
SANITIZE_TARGET).

With this change, in addition to the above logic, exclude path disables
sanitization of targets that would otherwise be enabled by the
corresponding include path.

Effectively, this change disables sanitization of targets that are
covered by *both* include and exclude paths.

Test: build/soong/cc/cc_test.go
Bug: b/184976817
Change-Id: I96f1e2a808d88b352b92b7490fa1df5c010314c3
2021-04-13 10:29:15 -07:00
Liz Kammer 41cca851d9 Merge "Consolidate cc-specific cqueries." 2021-04-13 17:11:34 +00:00
Colin Cross 66d154e436 Merge "Follow blueprint change to return GlobResult from Glob" 2021-04-13 17:01:39 +00:00
Treehugger Robot e08fa05b4f Merge "Add reasons for cc_library_static modules to be on the deny list." am: c8ae73e678 am: 671df43625 am: 11a16dbf08
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1674525

Change-Id: I079755c2368dbf111b480c6211b6e16b25f7ff8a
2021-04-13 17:00:38 +00:00
Liz Kammer 33db9e49e7 Merge "Add tests for bazel_handler" am: 4f3e58c031 am: 3e66c23ea0 am: f521e33023
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1670166

Change-Id: Idd0d96be1e3f095881e02f5d6c47b1554e9b3a23
2021-04-13 16:59:41 +00:00
Treehugger Robot c8ae73e678 Merge "Add reasons for cc_library_static modules to be on the deny list." 2021-04-13 15:06:10 +00:00
Rupert Shuttleworth 43b04926b2 Add reasons for cc_library_static modules to be on the deny list.
Test: bp2build-sync.py write; bazel build //bionic/...
Change-Id: I8fc7036136adbcf16dc31d9691a8d18b99e3c3ae
2021-04-13 08:54:20 -04:00
Jiyong Park 3db6f99780 Merge "SdkSpec is fully using ApiLevel" into sc-dev 2021-04-13 11:02:38 +00:00
Lukacs T. Berki 53b2f36bd6 Delete android/env.go .
Properly plumb the available environment to the configuration instead of
going through the global variable originalEnv.

Test: Presubmit.
Change-Id: Ia1ea753d5e72c02a0dcaa4c0b43bd6e24fc47cec
2021-04-13 08:10:01 +02:00