Commit graph

3078 commits

Author SHA1 Message Date
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
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
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
cbaef6ff0f Merge "Add debug ramdisk variant." 2021-05-02 23:54:40 +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
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
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
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
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
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
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
331917a4c6 Merge "Remove libc_syscalls from the denylist." 2021-04-28 13:38:45 +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
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
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
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
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
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
ac9dc817b8 Merge "start eating include_dirs from both ends" 2021-04-27 16:34:24 +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
6de44e74c8 Merge "bp2build: fix exclude_srcs in subpackages." 2021-04-27 13:48:46 +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
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
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
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
459c532e44 Merge "Incorporate cc_library_headers into mixed builds" 2021-04-23 15:14:55 +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
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
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
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
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
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
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
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
893b2fda41 Merge "Add PrepareForDebug_DO_NOT_SUBMIT" 2021-04-21 17:10:40 +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
eff37d79bd Merge "Rename Label.Bp_text to OriginalModuleName." 2021-04-20 21:45:18 +00:00
Treehugger Robot
61d83e90b1 Merge "Incorporate filegroups into mixed builds." 2021-04-20 18:53:03 +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
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
d419826d8b Merge "ApiLevel of "" and "core_platform" is FutureApiLevel" 2021-04-16 23:35:42 +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
3eb2312db6 Merge "Clean up package names." 2021-04-16 13:46:22 +00:00
Treehugger Robot
53932eca91 Merge "Fix discordance between marshall/unmarshall for ArchType" 2021-04-16 03:36:29 +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
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
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
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
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
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
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
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
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
Liz Kammer
fe23bf3eb0 Add tests for request_type ParseResult functions.
Test: go test request_type_test
Test: bp2build generate & sync; mixed build libc
Change-Id: Id0b813e9de4d02d8625e42549999659ccb005c6d
2021-04-12 16:23:53 -04:00
Liz Kammer
b71794d8e6 Consolidate cc-specific cqueries.
There is little overlap at this point, but we expect these to converge
more over time, to handle exported includes, libs, etc., this will allow
those changes to be handled in one place and allow more consolidation of
code.

Test: bp2build generate & sync; mixed build libc
Change-Id: I51685dad9f4fc11a634965a3c9e84f4a0e279ecb
2021-04-12 15:59:08 -04:00
Liz Kammer
8d62a4f725 Add tests for bazel_handler
Test: go test
Test: m nothing
Test: bp2build generate && sync; mixed build libc
Change-Id: Id4307a9e735b50221a8effb963325aaa57c3c7d0
2021-04-12 15:59:06 -04:00
Jaewoong Jung
8e1c08cda6 Merge "Fix min_sdk_version err msg in apex." 2021-04-12 19:41:35 +00:00
Liz Kammer
bda284bb19 Merge "Support paths for init_rc from Soong." 2021-04-12 19:05:27 +00:00
Jaewoong Jung
86bcf70b3e Fix min_sdk_version err msg in apex.
It should suggest adding min_sdk_version to the child module, not the
apex one.

Test: Manually
Change-Id: Ibde94677a966dafd5912e566bb038783f03c20c9
2021-04-12 16:45:25 +00:00
Treehugger Robot
c1c2352d95 Merge "Make MockBazelContext more specific to cquerys" 2021-04-12 13:25:38 +00:00
Jingwen Chen
0a92ed74ad bp2build/mixed builds denylist note_memtag_heap_async and sync temporarily.
This adds the two modules to the bp2build/mixed builds denylist while we
investigate b/185079815.

Test: TH
Change-Id: I6d67c5c24502ac48bdc90a005ddef86c46eab0b7
2021-04-12 05:37:42 +00:00
Jingwen Chen
a42c707572 Merge "bp2build: cc_library converter for //bionic/libdl:libdl_android" 2021-04-12 04:30:27 +00:00
Colin Cross
82ea3fb273 Follow blueprint change to return GlobResult from Glob
Follow I2159cc9d85f388073198eac7456e5bf43e813096 that makes Glob
return a GlobResult.

Bug: 159845846
Test: glob_test.go
Change-Id: Ia771bdbdf1eb668623c4b3f00bf65e0e1e3a55c0
2021-04-09 09:46:18 -07:00
Liz Kammer
a92e844d16 Make MockBazelContext more specific to cquerys
Rather than having a single storage container, make multiple so that it
is easier to unit test building modules with bazel with MockBazelContext

Test: go test genrule_test
Change-Id: I1da85d28f096d5102ad889b9518fdda6914342b1
2021-04-09 11:49:48 -04:00
Treehugger Robot
76579e0e9a Merge "Handle simple prebuilt static libraries from bazel" 2021-04-09 13:38:59 +00:00
Jingwen Chen
6393098ecf bp2build: cc_library converter for //bionic/libdl:libdl_android
This CL contains the converter for libdl_android, a cc_library that
expands into a cc_shared_library and a regular cc_library.

Test: TH
Test: bp2build; bazel test //build/bazel/tests/...

Change-Id: If70641a538211b0d6b2aac0e4d0d06912318304d
2021-04-09 09:42:53 +00:00
Treehugger Robot
929cac7433 Merge "Add a variable that indicates build-time debugfs restrictions" 2021-04-09 00:12:02 +00:00
Treehugger Robot
fd233d9078 Merge "Move cquery RequestType interface to bazel_handler" 2021-04-08 19:28:29 +00:00
Jiyong Park
9231537fe2 SdkSpec is fully using ApiLevel
Previously, SdkSpec was constructed only from the user string. It didn't
make use of the Config struct where information about the latest stable
SDK version, etc. is recorded. As a result, the build system couldn't
check if the sdk version "current" is referring to the in-development
(i.e.  not-yet-frozen) SDK version or the latest stable version.
"current" was always assumed to be in-development (IsPreview() returns
true) even when Platform_sdk_final == true.

As the first step for fixing that, this change requires
android.EarlyModuleContext to be passed when constructing SdkSpec from
the user string.

In the following changes, "current" will be mapped to either
FutureApiLevel (10000) or one of the FinalApiLevels() depending on
whether the platform SDK was finalized or not.

Bug: 175678607
Test: m
Change-Id: Ifea12ebf147ecccf12e7266dd382819806571543
2021-04-08 11:27:24 +09:00
Liz Kammer
0c4f71cd96 Support paths for init_rc from Soong.
The property init_rc 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: Idbbf9de66c5182784d055e1cd64bcef34a7dbd79
2021-04-07 16:26:55 -04:00
Liz Kammer
3f9e155f83 Handle simple prebuilt static libraries from bazel
Test: generate & sync BUILD files via bp2build && mixed build droid
Bug: 184192619
Change-Id: I27f0d76c88cbff25f3c7a805f3dfbb1eeaf8e771
2021-04-07 11:07:36 -04:00
Liz Kammer
f29df7cc52 Move cquery RequestType interface to bazel_handler
go idiom is to define the interface where it is used rather than where
it is defined. This makes it obvious that ParseResult is not a used part
of the interface, removing the need to return an interface{} and cast
results.

Test: go test soong tests
Test: generate & sync bp2build; mixed build libc
Change-Id: I0d8d99c1d8d0125588522cc86502286b83c91bf7
2021-04-07 10:56:22 -04:00
Paul Duffin
56dc66e2ea Stop deapexer module type from being treated as a prebuilt
Previously, the private deapexer module type was treated as a prebuilt
as that was the quickest way to implement it. However, there is no
reason why it should be as there is no corresponding source module type
which it might replace.

This change removes the prebuilt support to simplify the module type in
preparation for future work. As part of that it extracts the logic for
retrieving a single path from a PrebuiltSrcsSupplier to ensure
consistent behavior.

Bug: 181267622
Test: m droid
Change-Id: I1b2bb49601c13a3fff99a0026c235eaa70d2e612
2021-04-07 10:09:58 +01:00
Paul Duffin
de21202bd2 Merge changes I45274836,I47268b81
* changes:
  Add PrebuiltNameFromSource
  Add IsModulePreferred
2021-04-07 09:04:18 +00:00
Jingwen Chen
d7d72398d5 Merge "Export OsTypeList through a function." 2021-04-07 05:38:05 +00:00
Paul Duffin
864116ce3f Add PrebuiltNameFromSource
Bug: 177892522
Test: m nothing
Change-Id: I45274836d59adbd6b2a2a848705b189398f1e766
2021-04-06 21:20:58 +01:00
Rupert Shuttleworth
b809bcf331 Merge "Fix syntax error in bazel_handler.go." 2021-04-06 20:19:11 +00:00
Paul Duffin
e1d3837645 Add IsModulePreferred
Bug: 177892522
Test: m nothing
Change-Id: I47268b81359d6fceb60e899a730b3b6034e09814
2021-04-06 21:18:34 +01:00
Christopher Parsons
b7c6a7ef36 Merge "Fix note_memtag bionic libraries in mixed builds" 2021-04-06 17:57:59 +00:00
Rupert Shuttleworth
a29903fb22 Fix syntax error in bazel_handler.go.
Test: go fmt no longer complains.
Change-Id: I725fb1d13f0f88a94e44b1fdbe9080590af2347a
2021-04-06 16:17:33 +00:00
Treehugger Robot
e09691ce78 Merge "Only include used requests in cquery starlark" 2021-04-06 16:05:20 +00:00
Treehugger Robot
06a466256d Merge "Remove unused constants for cquery requests" 2021-04-06 15:55:17 +00:00
Treehugger Robot
8c56183fb7 Merge changes Id33bf640,I4d67b9b9
* changes:
  Don't use incorrect version names like VER or BOARD even in tests
  SdkSpec = Scope + ApiLevel
2021-04-06 03:18:16 +00:00
Chris Parsons
eefc9e6a62 Fix note_memtag bionic libraries in mixed builds
Required fixes:
  - Set MakeLinkType for libraries, even in mixed build mode.
  - Set snapshot header information to empty list, which passes
        validation logic for depending modules

Fixing these libraries also requires a Starlark change to
cc_library_static.bzl, which will be submitted separately.

Additionally, this adds better error messaging in the event that
output files are missing from a mixed-build library.

Test: USE_BAZEL_ANALYSIS=1 m libc
Test: USE_BAZEL_ANALYSIS=1 m runtime-module-sdk
Change-Id: Iad2c4d46359986fb0a43263292a15ed45fabbac7
2021-04-05 15:27:55 -04:00
Christopher Parsons
012ae1f4e0 Merge "Use correct includes for mixed build gen headers" 2021-04-05 19:03:47 +00:00
Liz Kammer
66ffdb74ee Only include used requests in cquery starlark
Test: go test soong tests
Test: generate & sync bp2build, mixed build libc
Change-Id: I1fbf854cf31f40b7721788956d0f08da3bda2cba
2021-04-05 10:41:05 -04:00
Liz Kammer
0202caa0fd Remove unused constants for cquery requests
Test: go test soong tests
Change-Id: I63bfff2b1fb2efecf0811b842ffcad874c83fc50
2021-04-05 08:47:43 -04:00
Jingwen Chen
2f6a21e957 Export OsTypeList through a function.
This is a cleanup CL to make the OsTypeList accessor consistent with
ArchTypeList by creating a function that creates a copy of the
underlying slice.

Test: TH
Change-Id: I346c5c3937bbdb8a373e4d7135b896a5274cc1f1
2021-04-05 07:35:06 +00:00
Jingwen Chen
1a6bbbd990 Merge "Add os/target configurable selects for label list attributes." 2021-04-05 07:09:48 +00:00
Jiyong Park
54105c48f4 SdkSpec = Scope + ApiLevel
SdkSpec.Version was an int type. Now it becomes ApiLevel type which
is a better abstraction of the version (or api level).

Bug: 1655587
Test: m

Change-Id: I4d67b9b9eae45f653b6af4f5b73da9e091b3dfab
2021-04-05 09:32:06 +09:00
Hridya Valsaraju
5a5c7d58df Add a variable that indicates build-time debugfs restrictions
This patch adds a variable to indicate to check if the target has the
flag PRODUCT_SET_DEBUGFS_RESTRICTIONS enabled.

Bug: 184381659
Test: make with/without PRODUCT_SET_DEBUGFS_RESTRICTIONS set
Change-Id: Ic14a3759b155ed4e16048d62fcd990f4ba7c906a
2021-04-02 16:45:24 -07:00
Jiyong Park
f1691d2a2c Move java.sdkSpec to the android package
... in preparation for making the handling of sdk versions consistent
across java and cc modules.

Bug: 175678607
Test: m
Change-Id: I598f0454bce9b7320621022115412fbe97403945
2021-04-03 08:25:12 +09:00
Chris Parsons
e59af4e1c0 Use correct includes for mixed build gen headers
Previously, genrules which were used as generated_headers only
propagated the old Soong gen directory as an include path, even if the
genrule was managed by Bazel. With this chance, the gen directory of the
Baze output files are used in mixed-build mode.

Test: USE_BAZEL_ANALYSIS=1 m libc
Test: m libc
Change-Id: I3913c4e5b0354421ba1fe43d1f6ef4d1e729a058
2021-04-02 18:27:21 -04:00
Liz Kammer
5ad66aaf41 Merge "Add depfile handling for bazel_handler." 2021-04-02 17:06:07 +00:00
Jaewoong Jung
d0afefa4b1 Merge "Revert "Revert "Add min_sdk_version to java_import.""" 2021-04-02 15:49:58 +00:00
Jingwen Chen
91220d7334 Add os/target configurable selects for label list attributes.
This CL is pretty large, so I recommend starting with reading the newly
added tests for the expected behavior.

This change works in conjunction with the linked CLs in the Gerrit topic.
Those CLs add support for new platform() definitions for OS targets
specified in Soong's arch.go, which are configurable through
Android.bp's `target {}` property. It works similary to previous CLs
adding support for the `arch {}` property.

These configurable props are keyed by the OS: android, linux_bionic,
windows, and so on. They map to `select` statements in label list
attributes, which this CL enables for cc_library_headers' header_libs
and export_header_lib_headers props.

This enables //bionic/libc:libc_headers to be generated correctly, from:

    cc_library_headers {
        name: "libc_headers",
        target: {
            android: {
                header_libs: ["libc_headers_arch"],
                export_header_lib_headers: ["libc_headers_arch"],
            },
            linux_bionic: {
                header_libs: ["libc_headers_arch"],
                export_header_lib_headers: ["libc_headers_arch"],
            },
        },
        // omitted props
    }

to:

    cc_library_headers(
        name = "libc_headers",
        deps = [] + select({
            "//build/bazel/platforms/os:android": [
                ":libc_headers_arch",
            ],
            "//build/bazel/platforms/os:linux_bionic": [
                ":libc_headers_arch",
            ],
            "//conditions:default": [],
        }),
    )

Test: TH
Test: Verify generated //bionic/libc:libc_headers
Fixes: 183597786

Change-Id: I01016cc2cc9a71449f02300d747f01decebf3f6e
2021-04-02 08:17:34 +00:00
Jaewoong Jung
56e12dbbaf Revert "Revert "Add min_sdk_version to java_import.""
This reverts commit 5ab6508008.

Reason for revert: Resubmitting Ie255f74d40432f4bdd0092d618705a7d17235e58 after fixing the broken targets.

Bug: 183695497
Test: https://android-build.googleplex.com/builds/forrest/run/L58600000849810513
Change-Id: I5f072f396002ca3a45bd530ad9be987efa732833
2021-04-02 04:55:27 +00:00
Jaewoong Jung
37a5d5ebd8 Merge "Revert "Add min_sdk_version to java_import."" 2021-04-02 00:34:06 +00:00
Jaewoong Jung
5ab6508008 Revert "Add min_sdk_version to java_import."
This reverts commit 6d15d63556.

Reason for revert: Broke git_sc-mainline-prod on test_suites_x86_64

Fixes: 184305592
Change-Id: I4b2e2675e0dd9e2e84966f545a52f45d5b731bab
2021-04-02 00:17:59 +00:00
Jaewoong Jung
51a0d85ebc Merge "Add min_sdk_version to java_import." 2021-04-01 19:45:53 +00:00
Paul Duffin
79abe57f53 Remove FixturePreparer.Extend()
Use GroupFixturePreparers instead.

Bug: 182885307
Test: m nothing
Change-Id: Idc01d3cc5a57576a4cf417e9105d1ab851126e10
2021-04-01 10:33:20 +01:00
Paul Duffin
4814bb814a Remove FixtureFactory
Bug: 182885307
Test: m nothing
Change-Id: I644db99cc6905f544d3e7479b435be26dbf6c59b
2021-04-01 10:33:02 +01:00
Rupert Shuttleworth
760fb185be Annotate bp2buildModuleDoNotConvertList with reasons for modules being blocked.
Test: bp2build write; bazel build //bionic/...
Change-Id: I6065c945dbb8747c85aa554eefb355afe58d2078
2021-04-01 04:38:08 +00:00
Jaewoong Jung
6d15d63556 Add min_sdk_version to java_import.
Fixes: 183695497
Test: apex_test.go
Change-Id: Ie255f74d40432f4bdd0092d618705a7d17235e58
2021-03-31 16:50:42 -07:00
Paul Duffin
b00c7ed2e8 Merge "Convert TestApexPermittedPackagesRules to use test fixtures" 2021-03-31 21:40:09 +00:00
Liz Kammer
acacbc1166 Merge "Handle product_variable asflag for cc_object." 2021-03-31 18:43:55 +00:00
Liz Kammer
7dfaa3a732 Merge "Don't use custom mixed build logic for cc_object" 2021-03-31 18:43:55 +00:00
Paul Duffin
301099e451 Merge "Remove varargs from Fixture(t *testing.T)" 2021-03-31 17:18:58 +00:00
Paul Duffin
5086512524 Merge "Remove varargs from RunTest(t *testing.T)" 2021-03-31 17:18:14 +00:00
Chris Parsons
b164b381b2 Register bp2build module types even outside generation
Without this fix, mixed builds are silently disabled, as a recent change
disabled mixed builds for all module types which are not listed in this
map. This map should be populated for both bp2build generation and for
mixed builds.

Test: lunch aosp_flame && USE_BAZEL_ANALYSIS=1 m libc
Change-Id: Ib2a3fb2de2e7a5204ef01355522ae569e0424dc7
2021-03-31 12:26:01 -04:00
Paul Duffin
45338f05e3 Convert TestApexPermittedPackagesRules to use test fixtures
Adds PrepareForTestWithNeverallowRules to make it easy to test
neverallow rules. Avoid exporting any unnecessary neverallow related
methods from the android package.

Bug: 181070625
Test: m nothing
Change-Id: Idfc6955cb23f1a4d1790be7879388154b03f3980
2021-03-31 16:16:18 +01:00
Paul Duffin
34a7fff9e0 Remove varargs from Fixture(t *testing.T)
Bug: 182885307
Test: m nothing
Change-Id: I71c3cf47ba1dc8d29d1533789c4c991cb825bd88
2021-03-31 16:04:07 +01:00
Paul Duffin
55e740e9a6 Remove varargs from RunTest(t *testing.T)
Use GroupFixturePreparers instead.

Bug: 182885307
Test: m nothing
Change-Id: Iaedb0ddc9d6a704f4d41363e705f3025a1291dc8
2021-03-31 16:03:59 +01:00
Paul Duffin
32eccae1ac Merge "Rename OptionalPath.RelativeToPath -> RelativeToTop" 2021-03-31 08:57:43 +00:00
Paul Duffin
dff50dffbc Merge "Remove extraneous calls to TestingBuildParams.RelativeToTop()" 2021-03-30 23:09:52 +00:00
Rupert Shuttleworth
02adc14203 Merge "Store the bp2build module opt-out list as a list instead of a map." 2021-03-30 22:04:21 +00:00
Christopher Parsons
209feec9e3 Merge "Refactor cquery processing to generalize transitions" 2021-03-30 21:52:13 +00:00
Liz Kammer
de116856fb Add depfile handling for bazel_handler.
Test: go test soong tests
Test: TODO mixed build change header, mixed build
Change-Id: I7c51faf2d5b1a8717cbab6bb0b3eb75c307fcd85
2021-03-30 15:55:02 -04:00
Liz Kammer
a060c4521e Handle product_variable asflag for cc_object.
cc_object crtbrand sets product_variable.platform_sdk_version.asflag
and will not compile correctly within mixed builds without it.

Only handles product_variables that expand product variables.

Bug: 181794963
Test: ~/aosp/build/bazel/scripts/milestone-2/demo.sh full
Change-Id: I293fcb18032aa51f63bb7b3de94abd6d1ec38180
2021-03-30 15:16:43 -04:00
Paul Duffin
afdd4061ee Rename OptionalPath.RelativeToPath -> RelativeToTop
Bug: 183650682
Test: m nothing
Change-Id: I95239c2273e715e8c4c15a4a02967e01f6913234
2021-03-30 20:06:22 +01:00
Paul Duffin
a71a67a4f5 Remove extraneous calls to TestingBuildParams.RelativeToTop()
Deprecated the method to try and prevent any other uses being added.

Bug: 183650682
Test: m nothing
Change-Id: Ia6f43851e5a00c9d96af780e3bd21e03175e1a2f
2021-03-30 20:03:22 +01:00
Paul Duffin
e8366da1f6 Automatically call TestingBuildParams.RelativeToTop()
Fixes the few tests that break due to this and which cannot easily be
separated into their own changes.

Bug: 183650682
Test: m nothing
Change-Id: Ia2f31213a1f114a78e66a81d89279ecde9f4c465
2021-03-30 19:35:35 +01:00
Paul Duffin
b2786a3fdc Merge "Add TestingModule.Outputs" 2021-03-30 16:55:41 +00:00
Paul Duffin
03d56c7743 Merge "Add StringsRelativeToTop" 2021-03-30 16:43:35 +00:00
Paul Duffin
544c368d2e Merge "Add OptionalPath.RelativeToTop" 2021-03-30 16:43:23 +00:00
Paul Duffin
35b7e1cf23 Merge "Add StringRelativeToTop" 2021-03-30 16:29:34 +00:00
Treehugger Robot
afd4c68106 Merge "queryview: fix depfile and incrementality." 2021-03-30 16:19:56 +00:00
Rupert Shuttleworth
4f43fe96bd Store the bp2build module opt-out list as a list instead of a map.
Test: bp2build-sync.py write; bazel build //bionic/...
Change-Id: I3f68f4c62446841aa795bb84161d1fa82510ae9d
2021-03-30 14:13:16 +00:00
Jingwen Chen
0702791a99 bp2build: arch-configurable selects for label list attrs.
This CL adds the configurable LabelListAttribute support to bp2build.

Test: go test
Change-Id: I2ef9e385d9cf1b1845988128eca1d8cda1ecb5e8
2021-03-30 13:22:48 +00:00
Jingwen Chen
e8a8296bc6 queryview: fix depfile and incrementality.
A previous change caused the depfile construction to be incorrect.

Test: run m queryview twice, second run is a no-op.
Fixes: 184026544

Change-Id: Ibaaa97d6a09956e1ca9c48643b0ffad75e44f051
2021-03-30 12:22:12 +00:00
Martin Stjernholm
38e9f0b82f Merge changes Iaa6411b5,I2118b8a2,Ibbdd3cbd,I2d1bbda2
* changes:
  Make test_for arch variant.
  Don't use APEX stubs between internal libs in the same APEX when building test_for modules.
  Add FilterListPred.
  Don't panic on "go test" invocations from the command line.
2021-03-30 09:26:36 +00:00
Chris Parsons
ad0b5ba42c Refactor cquery processing to generalize transitions
This is a step in the right direction to allow generalized specification
of variant information in the form of configuration transitions, such
that not all transitions must be specified manually. This allows for
much more reasonable addition of new variations in mixed builds.

Test: lunch aosp_flame && USE_BAZEL_ANALYSIS=1 m libc
Change-Id: I95898da06af6d0e3e1f7c073aaf8ec0ebe26c951
2021-03-29 21:14:57 -04:00
Paul Duffin
962783a660 Add TestingModule.Outputs
Needed for some follow up changes.

Bug: 183650682
Test: m nothing
Change-Id: I326e6be6d397f3300be68c1fe069fc72aa736cee
2021-03-29 17:29:30 +01:00
Paul Duffin
0aafcbfd2d Add StringsRelativeToTop
Needed for some follow up changes.

Bug: 183650682
Test: m nothing
Change-Id: Ic14cb4f4592d887dd897989482d540e12065c0fe
2021-03-29 17:29:30 +01:00
Paul Duffin
a5b8135bdf Add OptionalPath.RelativeToTop
Needed for some follow up changes.

Bug: 183650682
Test: m nothing
Change-Id: If38dfe8e919094a7365bcee6cb71bfd0409f4454
2021-03-29 17:29:30 +01:00
Paul Duffin
f53555da2f Add StringRelativeToTop
Needed for some follow up changes.

Bug: 182885307
Test: m nothing
Change-Id: I15992cc11e9c4c0e07af879192220ef1848dd09c
2021-03-29 17:29:30 +01:00
Paul Duffin
cf7f2e0a9e Merge "Make TestingBuildParams.RelativeToTop() modify (Writable)Path(s)" 2021-03-28 22:00:05 +00:00
Martin Stjernholm
4e6c269de5 Don't use APEX stubs between internal libs in the same APEX when
building test_for modules.

This extends the current approach where test modules always depend on
the platform variants of the APEX libs, and only skips the stubs on
them. It still has the limitation that the internal libs must have the
exact same apex_available lists.

Also some improvement of the test accuracy in TestTestFor.

Test: m libartagent-target
  with http://r.android.com/q/topic:libdexfile-noext applied
Bug: 183217299
Change-Id: I2118b8a22c887077867a3ddbbe73437b4a29a6ad
2021-03-28 22:06:34 +01:00
Martin Stjernholm
1461c4dbca Add FilterListPred.
Test: cd build/soong; go test ./android
Change-Id: Ibbdd3cbdb822bd2e843096a22cdd08c827b70526
2021-03-28 22:06:33 +01:00
Martin Stjernholm
32312eb75a Don't panic on "go test" invocations from the command line.
Test: cd build/soong; go test ./android
Bug: 183650682
Change-Id: I2d1bbda21cb262eafc7f7d329206720809399985
2021-03-28 22:06:33 +01:00
Rupert Shuttleworth
b33f9d87c4 Remove lib_dns from bp2build converter denylist (module name typo, should be libc_dns).
Test: TH.
Change-Id: I636b7d6d09e96f6e25525ca48783281892a1eb02
2021-03-25 22:23:00 +00:00
Rupert Shuttleworth
a9e182440d Don't convert libc_dns using the cc_library_static bp2build converter.
Test: Manually ran bp2build-incremental presubmit in a new AOSP checkout.
Change-Id: I063f6f244c34c4456af77fb25579f95d724e8893
2021-03-25 21:56:15 +00:00
Colin Cross
d91c9b1c04 Merge "Use interface for $(location) values in genrules" 2021-03-25 21:06:55 +00:00
Colin Cross
ba5fff85a7 Merge changes Ie8721dcd,If1827b9d,Iec250a2d,I3f46f611,Idf136919, ...
* changes:
  Replace ANDROID_SDK_HOME with ANDROID_PREFS_ROOT for metalava
  Simplify lint rules using improved RuleBuilder rsp support
  Support multiple rsp files in RuleBuilder
  Pass rsp files into sbox and rewrapper
  Add test for sbox input sandboxing
  Support multiple rsp files in REParams
  Move response file handling to a separate package
2021-03-25 20:55:56 +00:00