Commit graph

45470 commits

Author SHA1 Message Date
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
Jiakai Zhang
5b24f721fd Preopt APEX system server jars for java_import.
Similar to aosp/1821985, but for java_import.

Bug: 194150908
Test: See the next CL.
Change-Id: Ied1cfb1a7e1c2eea502b74b0d6e2344bcd02155e
2021-09-30 13:31:28 +00: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
Treehugger Robot
84de371ad9 Merge "Call InstallFile even when !installable" am: a07b559571
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1836921

Change-Id: I9c18959a7733877c1b3adddd8251bd0539205913
2021-09-30 10:15:12 +00: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
59f957abbf Merge "Revert "Export SOONG_CC_API_XML to Make outside androidmk"" am: 6f37dba455
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1841188

Change-Id: I84b0b1e723313f4749e6d37a989b1e3c88b140d8
2021-09-30 03:39:08 +00: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
7dddc5adb5 Merge "Export SOONG_CC_API_XML to Make outside androidmk" am: 1cd6d8e25e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1838396

Change-Id: Id1d458966726c4fda22f0558bb54e9f07738aab1
2021-09-29 23:30:29 +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
4b8b9b7e52 Add deps of protos to bp2build. am: 0f3b7d2fc4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1838060

Change-Id: I9b9735e5396cedbb027187a054515e783901ef9a
2021-09-29 16:55:55 +00:00
Liz Kammer
87517e2637 Sort bp2build directory allowlist. am: 55682fea4b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1838059

Change-Id: I8e5591d7c6e19309eab7234ea98ac1148fb69138
2021-09-29 16:55:52 +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
8d1e0849fa bp2build //system/core/libasyncio:libasyncio am: b59f6e2397
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1838474

Change-Id: I9e3acde8ba150d51717b595952a8576cdf0d2eca
2021-09-28 23:26:34 +00:00
Jingwen Chen
3b99edfa96 bp2build //external/lz4/lib:liblz4. am: 8385250f4f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1838473

Change-Id: I7869e7f6d8ab661a25dbedc98550f1b4a040fd90
2021-09-28 23:26:30 +00: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
Colin Cross
c8caa06a36 Add data_bins property
data_bins is similar to data_libs but copies helper binaries alongside
the test.

Bug: 200872604
Test: atest CtsBionicTestCases
Change-Id: I4f9df5f82816cfd30a0a19808fda220cf77c50a7
2021-09-27 15:56:26 -07:00
Colin Cross
cfb0f5e102 Support per-testcase directories in all test suites
There are cases where two modules try to install the same test data
into CTS, which results in collisions when CTS puts the data for all
tests in the same directory.  Add a flag that allows enabling a
per-testcase directory for an individual test for all test suites.

Bug: 193168159
Test: cts-tradefed run commandAndExit CtsBionicTestCases
Change-Id: If034723e8fe937ca71d3e2d39b7d46702e41bc8c
2021-09-27 15:56:26 -07:00
Colin Cross
f3bfd02aa9 Add environment variables to cc_genrule commands
Pass the architecture, mulitlib type and native bridge state to
each variant of a cc_genrule rule as environment variables.

Bug: 200872604
Test: TestCmdPrefix
Change-Id: I39c4c2d5bbd4f4cc72a4777715db1df049345b37
2021-09-27 15:56:23 -07:00
Romain Jobredeaux
4fd093f787 Merge "remove redundant 'deps' section from template with 'exports' section." am: 6a779a4b50
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1832978

Change-Id: Iceb981aa52b67b17ef73d483f76c5c9b25a123de
2021-09-27 21:06:53 +00:00
Romain Jobredeaux
572a87d1e4 Merge "Exclude WallpaperPicker app and pom2bp-generated BUILD files from bp2build." am: 3bafa69336
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1832976

Change-Id: I5cc98dae403f67999798ae25a1ac4c8af6bfb414
2021-09-27 21:06:50 +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
eae2336050 Emit unconditional module load only when inherit/include is on the top level. am: 868c5e3ab2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1835894

Change-Id: Ie70c5ab5d919878ea9a971934caf403bf6cefb15
2021-09-27 19:07:32 +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
Sorin Basca
87f33ea80b OpenJDK 11: Adding jdk.internal.reflect to allowed package list
As part of the migration to OpenJDK 11, sun.reflect has moved to
jdk.internal.reflect. For now we'll have both packages available
as new code uses the jdk.internal version.

Test: m
Bug: 188889082
Bug: 190791083
Change-Id: Ib03c9c8c346daebd7d97387817b506095f5ec693
2021-09-27 15:39:06 +00:00
Treehugger Robot
68e36bfa00 Merge "Add more sepolicy variables to soong_config" am: 208d2962f0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826065

Change-Id: I25a8e93236a4bc76ea5654d7e999561b477d7fc9
2021-09-27 11:20:39 +00:00
Treehugger Robot
208d2962f0 Merge "Add more sepolicy variables to soong_config" 2021-09-27 11:05:19 +00:00
Jiakai Zhang
b9e3166b14 Merge "Remove updatable-bcp-packages.txt." am: a14b18fb31
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1832483

Change-Id: If17f9cb0d0cef77ea2d2fc3f0ddac177f449daca
2021-09-26 03:47:03 +00:00
Jiakai Zhang
a14b18fb31 Merge "Remove updatable-bcp-packages.txt." 2021-09-26 03:34:28 +00:00
Paul Duffin
4bf3db6c1f Add ramdisk image sdk trait to cc_library_headers am: 12a0a310a7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1834876

Change-Id: I722497159725cd4e8b913357aed161ea69357a28
2021-09-25 09:30:55 +00:00
Paul Duffin
e0778ba120 Merge "Add recovery image sdk trait to cc_library_headers" am: a02157a4b7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1834875

Change-Id: I60e4ae35cd9807501abd2a0a009a5efc9de62211
2021-09-25 09:30:06 +00:00
Paul Duffin
5e253253ff Merge "Insert imageVariantSpecificInfo between arch and link info" am: 99df906e34
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1834874

Change-Id: If7af6edbc91844e96d8132384cf98fbd926a83a7
2021-09-25 09:29:58 +00:00
Paul Duffin
fbca36d0c6 Merge "Extract handling of image variations from target loop" am: 7af6b7062b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1834873

Change-Id: Ic16405a43a524784ff29e23c45567faaadc6cedd
2021-09-25 09:29:45 +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
51beb6b7c8 Merge "Add two new variables to Malloc_not_svelte." am: d8fd124227
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1836134

Change-Id: Ib816cc29bcc07920dca08736c301ad9429d9b84a
2021-09-25 01:54:53 +00:00
Christopher Ferris
d8fd124227 Merge "Add two new variables to Malloc_not_svelte." 2021-09-25 01:36:48 +00:00
Christopher Parsons
a64586fb74 Merge "Add stl property support for bp2build" am: 0bb4ac55d6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1834858

Change-Id: I9c45eab96c5e62667bd78d0fa48601ab140357a0
2021-09-24 20:08:41 +00:00