Commit graph

2886 commits

Author SHA1 Message Date
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