Commit graph

38698 commits

Author SHA1 Message Date
Ulyana Trafimovich
1b5262bd69 Merge "Remove unused variable SKIP_BOOT_JARS_CHECK." 2021-10-01 07:21:39 +00:00
Treehugger Robot
f7ff81ca95 Merge "rust modules respects the installable property" 2021-10-01 01:59:08 +00:00
Chris Parsons
b1f405e66d Temporarily disable libbase
This should unbreak the build and give me some time to investigate the
root cause.

Test: USE_BAZEL_ANALYSIS=1 m libandroidfw
Change-Id: Ia843ae5b92a70131b4989b4bdebc063866cb1075
2021-09-30 17:25:32 -04:00
Chris Parsons
a37e195182 Support building libcrypto via mixed builds
This required the following fixes to bp2build:
  - Correctly handle Bionic_* and Linux_* targets
  - Correctly handle cc_object's selects
  - Generate linker_script, stl, and system_dynamic_deps for cc_object in bp2build

Test: USE_BAZEL_ANALYSIS=1 m adbd
Change-Id: I753fd18df8ae551fb69df07e4174527c5388f289
2021-09-30 12:30:36 -04:00
Jiakai Zhang
dcc42b6f7e Merge changes I7876b077,Ib2e7d5e6,I7d2d2e02,Ibf5322f8
* changes:
  Generate prebuilt_systemserverclasspath_fragment.
  Add a new SDK member type java_systemserver_libs.
  Add exported_systemserverclasspath_fragments to prebuilt_apex rule.
  Add prebuilt_systemserverclasspath_fragment rule.
2021-09-30 15:13:45 +00:00
Treehugger Robot
4352a8e696 Merge "Add unit tests for cpp/assembly flags." 2021-09-30 15:12:57 +00:00
Liz Kammer
08572c6d45 Add unit tests for cpp/assembly flags.
Test: go test soong tests
Change-Id: Idd4b8d558b9bccf92b63c80abff19792ea3ff766
2021-09-30 10:11:04 -04:00
Ulya Trafimovich
fbe51fe0ec Remove unused variable SKIP_BOOT_JARS_CHECK.
The variable is no longer used after https://r.android.com/1737753.

Bug: 189298093
Test: m
Change-Id: I7f660fb205212d109f3e9ce2c805508ef481da24
2021-09-30 14:03:09 +01:00
Jiakai Zhang
a8d8660ab1 Generate prebuilt_systemserverclasspath_fragment.
Bug: 194150908
Test: m nothing
Test: manual - 1. Patch aosp/1835087.
  2. m out/soong/.intermediates/art/build/sdk/art-module-sdk/common_os/snapshot/Android.bp
  3. See prebuilt_systemserverclasspath_fragment modules and
     systemserverclasspath_fragments in an sdk_snapshot module.
Change-Id: I7876b077b0b4ed190f01dbfa9533de04ea32d524
2021-09-30 10:06:24 +00:00
Jiakai Zhang
ea18033f31 Add a new SDK member type java_systemserver_libs.
Similar to java_boot_libs, java_systemserver_libs only provide access
to their dex implementation jar for use by dexpreopting and do not
provide an actual implementation jar.

This is used in the subsequent CL.

Bug: 194150908
Test: m nothing
Change-Id: Ib2e7d5e6c002314a0231f46934a766f4a27e610a
2021-09-30 10:06:24 +00:00
Jiakai Zhang
774dd305f4 Add exported_systemserverclasspath_fragments to prebuilt_apex rule.
This is for exporting the contents of systemserverclasspath_fragment for
dexpreopting.

Bug: 194150908
Test: manual - 1. Patch aosp/1818020 and aosp/1834534
  2. m SOONG_CONFIG_art_module_source_build=false com.android.art
Change-Id: I7d2d2e02869d8a523f7c0efbbff81706672a95c5
2021-09-30 10:06:21 +00:00
Jiakai Zhang
c9864278da Add prebuilt_systemserverclasspath_fragment rule.
This is the prebuilt side of systemserverclasspath_fragment, currently
for used for dexpreopting.

The change to automactially generate
prebuilt_systemserverclasspath_fragment rules will be in a separate CL.

Bug: 194150908
Test: m nothing
Change-Id: Ibf5322f80f78ac3ca037489f4a279456fe38a23f
2021-09-30 10:05:58 +00:00
Treehugger Robot
a07b559571 Merge "Call InstallFile even when !installable" 2021-09-30 10:00:37 +00:00
Jiyong Park
2811e07868 rust modules respects the installable property
So far, the property wasn't respected.

Bug: N/A
Test: m
Change-Id: Ie3b011250595f02c3ab315efbac6694df3e181e7
2021-09-30 17:25:21 +09:00
Colin Cross
6f37dba455 Merge "Revert "Export SOONG_CC_API_XML to Make outside androidmk"" 2021-09-30 03:15:17 +00:00
Colin Cross
2cec05d37b Revert "Export SOONG_CC_API_XML to Make outside androidmk"
This reverts commit ebb32c486a.

Reason for revert: breaks coverage build (b/201600003)
Bug: 193819970
Bug: 201600003

Change-Id: I65969c4a62165c40dded2794b757469909bf8ca6
2021-09-30 03:14:40 +00:00
Colin Cross
1cd6d8e25e Merge "Export SOONG_CC_API_XML to Make outside androidmk" 2021-09-29 23:18:55 +00:00
Liz Kammer
0f3b7d2fc4 Add deps of protos to bp2build.
Update BazelOutPath to implement genPathProvider. This allows Bazel
outputs (incl filegroup) to be used as an input to generating a file
(e.g. proto).

Test: bp2build.sh
Test: mixed_build.sh
Bug: 200601772
Change-Id: I5ad67ade193025652100b214996b26ce9ca9bf83
2021-09-29 10:31:27 -04:00
Liz Kammer
55682fea4b Sort bp2build directory allowlist.
Test: bp2build.sh
Change-Id: I48157fd4e02fef3a6917f0a40418cc929168ffff
2021-09-29 10:30:35 -04:00
Colin Cross
ebb32c486a Export SOONG_CC_API_XML to Make outside androidmk
The SOONG_CC_API_XML values are needed for modules that are not
exported to Make, export them from a singleton that covers all
modules instead of an AndroidMkProvider that may not be called
for some modules.

Bug: 193819970
Test: manual
Change-Id: Ie0a945d879de4f99ce76d005aea8041719c244f7
2021-09-28 16:39:13 -07:00
Jingwen Chen
b59f6e2397 bp2build //system/core/libasyncio:libasyncio
Test: presubmits
Change-Id: Ie748d2017eaf9043392975ca0db8ae4f673ba059
2021-09-28 00:48:14 +00:00
Jingwen Chen
8385250f4f bp2build //external/lz4/lib:liblz4.
Fixes: 198241792
Test: presubmits
Test: USE_BAZEL_ANALYSIS=1 m adbd
Change-Id: Ifc0326805f39259f06348dcc0b1b4a7c86afc856
2021-09-28 00:05:20 +00:00
Jiyong Park
17ff2838fc Call InstallFile even when !installable
Not calling InstallFile when !installable prevents the module not only
from being installed to the partition, but also from being packaged for
a packaging_base. InstallFile already has a routine for not generating
the install rule when the module is not installable. So, the check for
can be safely omitted at the call site.

Bug: 199674764
Test: m com.android.virt. the virt apex has
com.android.runtime.64only.apex in system/apex

Change-Id: I0249f5916496ed136dbf1978e04e2971852de244
2021-09-28 00:02:54 +00:00
Romain Jobredeaux
6a779a4b50 Merge "remove redundant 'deps' section from template with 'exports' section." 2021-09-27 20:54:51 +00:00
Romain Jobredeaux
3bafa69336 Merge "Exclude WallpaperPicker app and pom2bp-generated BUILD files from bp2build." 2021-09-27 20:54:51 +00:00
Sasha Smundak
868c5e3ab2 Emit unconditional module load only when inherit/include is on the top level.
That is, when a makefile contains
```
ifneq (,$(foo))
  $(call inherit-product,module.mk)
endif
```

module.mk has to be present only if `foo` is set.

Fixes: 200163602
Test: internal
Change-Id: Ic5f10ce8d49d6b87162bfe77922bba5e2cce228b
2021-09-27 10:02:41 -07:00
Treehugger Robot
208d2962f0 Merge "Add more sepolicy variables to soong_config" 2021-09-27 11:05:19 +00:00
Jiakai Zhang
a14b18fb31 Merge "Remove updatable-bcp-packages.txt." 2021-09-26 03:34:28 +00:00
Paul Duffin
12a0a310a7 Add ramdisk image sdk trait to cc_library_headers
Allows an sdk to require that a cc_library_headers module provides a
ramdisk image variant for the prebuilt.

Previously, "ramdisk_available: true" would be set in the generated
prebuilt snapshot for any sdk member that specified
"ramdisk_available: true" in the source module. This change will only
add that setting to the snapshot if the ramdisk image variant trait
was explicitly requested for a member.

Bug: 195754365
Test: m nothing
Change-Id: I21e0dd02d380beabf228a72c463fcc603c77d87f
2021-09-25 10:17:31 +01:00
Paul Duffin
a02157a4b7 Merge "Add recovery image sdk trait to cc_library_headers" 2021-09-25 09:14:21 +00:00
Paul Duffin
99df906e34 Merge "Insert imageVariantSpecificInfo between arch and link info" 2021-09-25 09:13:14 +00:00
Paul Duffin
7af6b7062b Merge "Extract handling of image variations from target loop" 2021-09-25 09:11:44 +00:00
Christopher Ferris
d8fd124227 Merge "Add two new variables to Malloc_not_svelte." 2021-09-25 01:36:48 +00:00
Christopher Parsons
0bb4ac55d6 Merge "Add stl property support for bp2build" 2021-09-24 20:01:12 +00:00
Colin Cross
ffe2c918e9 Merge "Add phony name for robolectric tests" 2021-09-24 19:51:41 +00:00
Christopher Ferris
dea6617bc5 Add two new variables to Malloc_not_svelte.
Add the srcs and header_libs for the system/core/debuggerd
change to support removing scudo code on svelte configs.

Bug: 201007100

Test: Builds.
Change-Id: Iec083dc5cbfbc63334a72e2e77a53067786a85ca
2021-09-24 11:55:51 -07:00
Ivan Lozano
eabde18653 Merge "rust: Add require_root and vendor install base" 2021-09-24 18:39:47 +00:00
Chris Parsons
a967f253e6 Add stl property support for bp2build
Test: mixed_libc
Test: USE_BAZEL_ANALYSIS=1 m libbase
Change-Id: If56d4a728de3ae4022cc9dadadc9bf8b952f9eaf
2021-09-24 13:51:56 -04:00
Colin Cross
8304a1330e Add phony name for robolectric tests
Robolectric tests are installed by Soong, which means Make doesn't
know about the install location to create the phony rules.  Add
a phony rule in Soong for now until Soong's installation rules are
fleshed out.

Bug: 184946827
Test: m SettingsRoboTests
Change-Id: I60d76474949800e1a737714d86df84eff9a92214
2021-09-24 10:41:55 -07:00
Liz Kammer
46f8dbe06a Merge "Refactor code for partitions c srcs" 2021-09-24 17:35:16 +00:00
Paul Duffin
6369622f8d Add recovery image sdk trait to cc_library_headers
Allows an sdk to require that a cc_library_headers module provides a
recovery image variant for the prebuilt.

Previously, "recovery_available: true" would be set in the generated
prebuilt snapshot for any sdk member that specified
"recovery_available: true" in the source module. This change will only
add that setting to the snapshot if the recovery image variant trait
was explicitly requested for a member.

Bug: 195754365
Test: m nothing
Change-Id: I7d79ccdec843127f7852d82b4b163021e30a79a7
2021-09-24 17:44:37 +01:00
Paul Duffin
b42fa67a47 Insert imageVariantSpecificInfo between arch and link info
Previously, the archTypeSpecificInfo included an array of
*linkTypeSpecificInfo. This change replaces that array with an array of
*imageVariantSpecificInfo which themselves contain an array of
*linkTypeSpecificInfo.

That allows the sdk snapshot to handle image variants correctly, i.e.
collate their properties, optimize their properties and then detect if
there are any image variant specific properties for any image variant
other than the CoreImageVariant ("") and report it as an error.

The latter case is treated as an error because while Soong needs to
handle image specific variants there is currently no requirement to
handle generating a prebuilt with image specific properties. A follow
up change will test the error handling.

Image specific variants are needed because the "jni_headers"
cc_library_headers module provides a number of image variants (e.g.
recovery) that are used outside the ART module. Therefore, the sdk
snapshot needs to do the same.

At the moment image variants like the recovery variant are supported by
copying the property that creates the variant (e.g. recovery_available)
through to the prebuilt but that is not safe for a couple of reasons:
1. It ignores any differences between the recovery variant and the
   other variants which could cause compatibility issues in modules
   that build against the prebuilts.
2. It marks modules in the snapshot with recovery_available even when
   they do not need it.

This change will allow follow up changes to address both those issues.

Bug: 195754365
Test: m nothing
Change-Id: I1c187d814f44b2cb7607cd43a6b215134be0faad
2021-09-24 17:32:03 +01:00
Paul Duffin
b1f0f2aa80 Extract handling of image variations from target loop
This separates the selection of the image variations to depend upon
from the main target loop. Follow up changes will add additional
image variations.

Bug: 195754365
Test: m nothing
Change-Id: Ia1a61b1efbc96d92cb2faf1e2c4d1c5c752b8083
2021-09-24 17:15:40 +01:00
Liz Kammer
6244df2a24 Merge "bp2build: Add support for export_.*headers props" 2021-09-24 13:13:05 +00:00
Treehugger Robot
f3c6843b33 Merge "Adding jdk.internal.misc in the allowed packages" 2021-09-24 10:21:18 +00:00
Martin Stjernholm
cf6bf37d04 Merge changes I957f3df8,I68986dcc
* changes:
  Consolidate the code to resolve a deapexer module dependency.
  Propagate the dex jar path as an OptionalPath which is either valid or invalid with a message.
2021-09-24 09:32:24 +00:00
Jiakai Zhang
46eb0fd501 Remove updatable-bcp-packages.txt.
Historically, this file was used by the `--updatable-bcp-packages-file`
flag for dex2oat. The flag is no longer needed and is being deprecated.

Unfortunately, we cannot remove `permitted_packages` and all the code
related to it because we still need it for checking the module
compatibility with Q and R.

Bug: 200241946
Test: m nothing
Change-Id: Ie3be54fd47a847ba0caf627d12da76b415d99466
2021-09-24 03:19:05 +00:00
Treehugger Robot
e1bb74e724 Merge "For mixed build bazel actions, remove old outputs" 2021-09-23 22:38:12 +00:00
Liz Kammer
57e2e7a78f Refactor code for partitions c srcs
To support protos (and other srcs that generate sources), we need to
partition further. Separate out into a separate common function.

Bug: 200601772
Test: build/bazel/ci/bp2build.sh
Change-Id: I7bf4cd96fd9a9fca4ccb3c96f21a04303201f891
2021-09-23 18:28:24 -04:00
Joel Galenson
33e32f3ce5 Merge "Pass "--extern proc_macro" to rust_proc_macros." 2021-09-23 21:26:22 +00:00