Commit Graph

1208 Commits

Author SHA1 Message Date
Treehugger Robot
a548a1c1c5 Merge changes I08ec0b44,I79b5a1fc,I469d6558 am: 6abfb33784 am: 3bcefabfeb am: dc2accaba0 am: a0b46c1d06
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1907862

Change-Id: I0ffda740f28a4f1309fae0be43f40904ef4f2168
2021-12-09 00:03:32 +00:00
Dan Willemsen
ce69757379 Merge "Add Darwin x86_64+arm64 universal binary support" 2021-12-08 21:08:43 +00:00
satayev
ad99149a62 Add MinSdkVersion(ctx) method to ModuleWithMinSdkVersionCheck interface.
Bug: 205923322
Test: presubmit
Change-Id: I469d655823e12a14bc0abaeb544a5dd2a6d3622f
2021-12-08 11:36:31 +00:00
Jingwen Chen
b07c901e0d bp2build: Fix apex.binaries to be a LabelListAttribute.
apex.binaries accepts a list of module names, which should be resolved to
their fully qualified labels. Bazel treats string_list and label_list
attributes differently, most notably with the latter adding dependency edges.

Test: apex_conversion_test.go
Bug: 209743852
Change-Id: Iafdc5c728e8658cce0e99d42f32e7bb6fe2f3168
2021-12-08 10:10:19 +00:00
sophiez
2965f45751 Java APIs used by Mainline modules.
Add scripts to generate java APIs used by Mainline modules. This is
aosp/1879177 with fixed build error that caused by dexdeps analyzing
resource only APKs which doesn't contains any .dex files. Now skip the
error generates in that case in gen_java_usedby_apex.sh

Test: TARGET_BUILD_APPS=com.android.adbd m dist apps_only
Change-Id: Id539cbe1b7306ace69c047f95ffc02265a467511
Merged-In: Id539cbe1b7306ace69c047f95ffc02265a467511
2021-12-08 07:35:37 +00:00
Dan Willemsen
4745007bb1 Add Darwin x86_64+arm64 universal binary support
This is configured from Make by setting up Darwin+Arm64 as a HOST_CROSS
target (which is largely true, as binaries can't be executed on X86_64
machines). On the Soong side, it's a bit blurier, as we don't current
have any other users that are the same OS but not natively executable
(Linux/musl is executable, Windows/x86 is a different OS).

Instead of requiring cc_binary/etc to become multi-architecture-aware
and using something like common_first/MultiTarget, this defaults all
non-multi-architecture-aware modules to be built with both
architectures. It then adds a dependency with the
DarwinUniversalVariantTag so that supporting modules can get the outputs
of the other variant.

Cc uses that dependency tag to run lipo on shared libraries and binaries
so that the output of the x86_64 variant is actually a fat binary
including both architectures.

Bug: 203607969
Test: build sdk-repo targets on a Mac
Change-Id: Icbddb0a177c0ba19d3e0d11f8cf568e0d1ea3245
2021-12-07 22:01:25 -08:00
Jiakai Zhang
204d111865 Merge "Add ART boot image profile to the ART APEX." am: e6f63be764 am: 255734a03a am: c0adf3ba1c am: 5195a30de9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1904290

Change-Id: I9ceaeca0de9f290a41ba416eb862b7be147cb874
2021-12-07 16:29:34 +00:00
Jiakai Zhang
e6f63be764 Merge "Add ART boot image profile to the ART APEX." 2021-12-07 15:22:37 +00:00
Artur Satayev
6e8071d17a Merge "Add ModuleWithMinSdkVersionCheck type." am: a4fc08d204 am: 25f5783263 am: fe55ffd190 am: 44d0ef55da
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1907860

Change-Id: I147da371d445f09ca2f131df1be91545eba37772
2021-12-06 18:09:34 +00:00
satayev
b3fd411465 Add ModuleWithMinSdkVersionCheck type.
This is to help following refactor for individual modules to have their
own version of checking where needed.

For example, apk in apex may want to enforce it's own version of
CheckMinSdkVersion.

Bug: 205923322
Test: presubmit
Change-Id: Ia2fad6c52af39e21f65385bcb283f1e3adab5548
2021-12-06 12:05:48 +00:00
Jiyong Park
a119a182bd Merge "Add future_updatable to the apex module" am: 103d511117 am: 88589cf238 am: 82a851b155 am: d0ce5a0925
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1904291

Change-Id: I83e1efce2f1464a30eb3bad406ce4d96dd419630
2021-12-06 10:58:43 +00:00
Jiyong Park
f402058d2c Add future_updatable to the apex module
The new property is used to mimic some of the build behaviors that
currently are applied only when an APEX is `updatable: true`. This
property is helpful to minimize the sudden impact (e.g. change in size)
when an APEX becomes updatable.

Currently, the behavior that this property mimics is the disabling of
the size optimization.

Bug: 207336449
Test: m
Change-Id: I500306afa1221625fda3e89a8d12d5d341791a1f
2021-12-06 02:18:13 +00:00
Jiakai Zhang
49b1eb6b04 Add ART boot image profile to the ART APEX.
We will need the profile when we generate the primary boot image on
device.

Bug: 203492478
Test: Run `banchan com.android.art x86_64 && m` and see
  `$ANDROID_PRODUCT_OUT/apex/com.android.art/etc/boot-image.prof`.
Test: Run `lunch aosp_cf_x86_64_phone-userdebug && m` and see both
  `$ANDROID_PRODUCT_OUT/apex/com.android.art/etc/boot-image.prof` and
  `$ANDROID_PRODUCT_OUT/system/etc/boot-image.prof`, in different
  sizes.
Test: Start Cuttlefish with the built image and see both
  `/apex/com.android.art/etc/boot-image.prof` and
  `/system/etc/boot-image.prof` on device.
Change-Id: Id879dc49b234133dfbb9563814328661a1f4a6c0
2021-12-03 20:02:10 +00:00
Daniel Norman
6879cf5c53 Merge "Forbid updatable: true on vendor APEXes." am: 7260025670 am: c046926ac5 am: ab360daa03 am: 917cdf20b3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1908986

Change-Id: Ic4df53e320891a24c5798f897ce10db8caec778a
2021-12-03 19:07:56 +00:00
Daniel Norman
6910911c64 Forbid updatable: true on vendor APEXes.
Vendor APEXes do not formally support updates outside of the main OTA
process. We should clarify this at build time.

Test: set vendor apex to updatable, observe failure
Test: apex_test.go
Change-Id: Ife8d242a42415ebf00d7dced72c07cda1fde1839
2021-12-02 12:53:12 -08:00
Liz Kammer
01cebf606b Merge "Support empty strings in bp2build" am: a9351ef6e6 am: 7cb87525ef am: 3044f94f32 am: 8ac1619830
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1907331

Change-Id: I510c1b3e833a4d279fea7e2a34d125b6c5e6842d
2021-12-02 17:27:12 +00:00
Liz Kammer
a9351ef6e6 Merge "Support empty strings in bp2build" 2021-12-02 15:35:10 +00:00
Treehugger Robot
1e168fece0 Merge "Add Sh_binaries property" am: abd43ec406 am: eea12c1be9 am: e5d333f7e1 am: 9839c0cf56
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1899131

Change-Id: Iff3cdfe7c26af27ddb46adbacdc73f0fc82e6b90
2021-12-02 02:18:03 +00:00
Treehugger Robot
abd43ec406 Merge "Add Sh_binaries property" 2021-12-02 00:52:23 +00:00
Benjamin Brittain
aedf01bd62 Merge "Add support for Rust JNI Libraries" am: 7c721018bb am: 9915e2dfc6 am: f842076481 am: 66ddbf9e23
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1906713

Change-Id: I399a929010ecc54ea62542f5d64c2d279aec2dc9
2021-12-01 15:36:45 +00:00
Liz Kammer
46fb7aba4d Support empty strings in bp2build
Previously, could not set an empty string as a value of an attribute;
however, this is necessary in some cases. To not unnecessarily create an
empty string, use string pointers for attributes rather than strings.

Test: go test bp2build tests
Change-Id: I03b3a3567452d455246d22d81f86c317d06b7c39
2021-12-01 10:14:49 -05:00
Benjamin Brittain
9edc375a06 Add support for Rust JNI Libraries
Test: Verified Rust JNI lib is in apex

Change-Id: Icb013d7b2f4c5d8ec009ea4937185689cc0cac16
2021-11-30 13:38:15 -05:00
Sundong Ahn
80c04891de Add Sh_binaries property
The sh_binary module is not supported the vendor variant. So, even if
there is "vendor: true" in sh_binary module, the image variant is
"image:" instead of "image:vendor.Tiramisu".
But the vendor APEX has vendor variant, so vendor APEX module and
sh_binary module have different variants and the sh_binary cannot be
added to vendor apex.
So the Sh_binaries property is added, and the image variant is removed
at DepsMutator.

Bug: 205065320
Test: make -j40 && sh_binary is added to vendor APEX && install check
Change-Id: I30e2d96a73b45e7b06eff24550542cb010008c41
2021-11-25 03:43:57 +00:00
Jooyung Han
09925634f5 Remove libsync from apex_available allowlist am: 9876c5eaab am: 6f323db66b am: 57440917f1 am: 7fb5afdd2a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1899132

Change-Id: I3b0ae777ef2584d2fe7b8f07bd94b5da3cca9536
2021-11-23 04:51:12 +00:00
Jooyung Han
9876c5eaab Remove libsync from apex_available allowlist
As libsync is NDK/LLNDK, it doesn't need to be aded to allowlist as
apex_available.

Bug: n/a
Test: m
Change-Id: I16cfb258a24bde4def428f1e6277f5d3c95c228c
2021-11-23 11:06:16 +09:00
Colin Cross
cf96429713 Merge "Move apex module installation into Soong" am: ab6db81276 am: a0c4b45669 am: e5046710c6 am: 4431bebf1f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1897972

Change-Id: Ib5501953f604920391965150fe0f67d1c6fa4502
2021-11-22 18:29:50 +00:00
Colin Cross
de6cbce98f Merge "Revert "Move apex module installation into Soong"" am: 500bba1b20 am: d4ce0c64f5 am: 85d3c93a85 am: 834649db81
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1897971

Change-Id: I9551b9160616b509f7a3b609f3bf7f9530f13d94
2021-11-20 02:45:58 +00:00
Colin Cross
377f028841 Merge "Move apex module installation into Soong" am: 50f6f869a2 am: a3675380c6 am: 0cc52a39ba am: 0118e502de
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1896051

Change-Id: I312ee4233409590097b4461ded2cc6846fb15d03
2021-11-20 02:44:38 +00:00
Colin Cross
6340ea50d4 Move apex module installation into Soong
Move apex module installation rules into Soong by overriding
InstallBypassMake.

Soong installs don't support post install commands, so move the
symlinks into separate rules and add dependencies on them.

This relands If65d283abc86f18ad266da0bf16fe95971a0bf9c with fixes
to install files into $OUT/apex and I606286e971b55d9d1fc4dcd0fbd476962de5fa79
with a fix for reversed logic.

Bug: 204136549
Test: m checkbuild
Change-Id: Ie65c53ebc7911efacdb8e11ba49059448f03c658
2021-11-19 13:37:36 -08:00
Colin Cross
555c52491d Revert "Move apex module installation into Soong"
This reverts commit 246e3eed67.

Reason for revert: broke aosp_bonito-userdebug build

Change-Id: Ib613f8f22532fe4588d3ec96aa001de869f8a633
2021-11-19 21:32:54 +00:00
Colin Cross
246e3eed67 Move apex module installation into Soong
Move apex module installation rules into Soong by overriding
InstallBypassMake.

Soong installs don't support post install commands, so move the
symlinks into separate rules and add dependencies on them.

This relands If65d283abc86f18ad266da0bf16fe95971a0bf9c with fixes
to install files into $OUT/apex.

Bug: 204136549
Test: m checkbuild
Change-Id: I606286e971b55d9d1fc4dcd0fbd476962de5fa79
2021-11-18 13:13:44 -08:00
Daniel Norman
aabdbd31e1 Revert "Revert "Adds multi_install_skip_symbol_files field (defa..." am: 6cfb37af56 am: 33f4a18254 am: 79454a7405 am: a4aab6c90d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1894202

Change-Id: Ief8ef8b15dbb3d3c97b60c98bfddb2053bb803c2
2021-11-17 23:04:25 +00:00
Daniel Norman
6cfb37af56 Revert "Revert "Adds multi_install_skip_symbol_files field (defa..."
Revert submission 1893459-revert-1869814-vapex-multi-config-VKODFOVCWY

Reason for revert: Fix-forward in https://r.android.com/1894088
Reverted Changes:
I087bfe0dc:Revert "Adds a new prop context for choosing betwe...
I27a498506:Revert "Load persist props before starting apexd."...
Ib5344edc0:Revert "Allow users to choose between multi-instal...
If09bf590e:Revert "Adds multi_install_skip_symbol_files field...
I905dac14c:Revert "Demonstrate multi-installed APEXes."

Change-Id: I33210c8d3199338f9c898d719ed1797b629317af
2021-11-17 19:12:21 +00:00
Oriol Prieto Gasco
2c4a96375a Make 'Compressible' an overridable property
This is needed to allow the Android Go versions of modules
(com.google.android.go.*) to select a different compression toggle than
their non-Go (com.google.android.*) conterparts. go/go-updatability

Bug: 203024418
Test: Preloaded go variants on wembley, booted Android.
Change-Id: Ic96aff5fafb65fbd08e8a69d47c994532e27819e
2021-11-16 21:49:02 +00:00
Owen Kim
d96921eb6f Merge "Revert "Adds multi_install_skip_symbol_files field (default fals..."" am: a10ebe60ab am: dcf7a82e43 am: 4c51ab52a6 am: eda61e7ead
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1893457

Change-Id: Ia3c97cd817f7b3fc171d9602614d50cbe60d6f25
2021-11-16 09:50:55 +00:00
Owen Kim
a10ebe60ab Merge "Revert "Adds multi_install_skip_symbol_files field (default fals..."" 2021-11-16 08:39:27 +00:00
Owen Kim
065fbeb146 Revert "Adds multi_install_skip_symbol_files field (default fals..."
Revert submission 1869814-vapex-multi-config

Bug: 206551398
Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/tests/view?invocationId=I55600009996329947&testResultId=TR93527797572038984, bug b/206551398
Reverted Changes:
I0cd9d748d:Adds multi_install_skip_symbol_files field (defaul...
I5912a18e3:Demonstrate multi-installed APEXes.
I0e6881e3a:Load persist props before starting apexd.
I932442ade:Adds a new prop context for choosing between multi...
I754ecc3f7:Allow users to choose between multi-installed vend...

Change-Id: If09bf590e3ad93e14fbf89299f80d497c9604a78
2021-11-16 07:08:15 +00:00
Daniel Norman
ab5d708f3f Merge "Adds multi_install_skip_symbol_files field (default false) to apex." am: f012790f32 am: 6ddcbb7b26 am: 3e1d66958d am: 1417a11d82
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1874413

Change-Id: Ia60d798366671bca001ae70ba93f8163fdae5239
2021-11-16 01:44:45 +00:00
Daniel Norman
f012790f32 Merge "Adds multi_install_skip_symbol_files field (default false) to apex." 2021-11-16 00:45:32 +00:00
Sophie Zheng
8e0dadadba Merge "Java APIs used by Mainline modules." am: 7b5fa4277f am: 2a27e47fbd am: 587dbb8553 am: a31ea43aaa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1887228

Change-Id: I1d3842b422b1de4faa5d0fd7b3b3035006f0d75d
2021-11-15 07:37:18 +00:00
sophiez
0234737f30 Java APIs used by Mainline modules.
Add scripts to generate java APIs used by Mainline modules. This is
aosp/1879177 with fixed build error that caused by dexdeps analyzing
resource only APKs which doesn't contains any .dex files. Now skip the
error generates in that case in gen_java_usedby_apex.sh

Forrest run:https://android-build.googleplex.com/builds/abtd/run/L38900000951898586

Test: TARGET_BUILD_APPS=com.android.adbd m dist apps_only
Change-Id: Id539cbe1b7306ace69c047f95ffc02265a467511
2021-11-12 23:39:35 +00:00
Daniel Norman
e19437e8f7 Adds multi_install_skip_symbol_files field (default false) to apex.
Multi-installed APEXes share the same apex_name and are installed
at the same time.

Should be set to true for all multi-installed APEXes except the singular
default version within the multi-installed group.
Only the default version can install symbol files in $(PRODUCT_OUT}/apex,
or else conflicting build rules may be created.

Bug: 199290365
Test: see https://r.android.com/1872018
Change-Id: I0cd9d748d7be3a2de40ed14f13bad71912457ddc
2021-11-12 20:45:50 +00:00
Colin Cross
32b9cd0fc2 Merge "Revert "Move apex module installation into Soong"" am: 152911f807 am: 35ee47dcbf am: ca03de2828 am: 21d7f625c3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1890806

Change-Id: I2647b410bb76f237367d127490193249ce04324d
2021-11-12 20:08:22 +00:00
Colin Cross
ccba23db44 Revert "Move apex module installation into Soong"
This reverts commit e3d156a622.

Reason for revert: b/206119621

Bug: 204136549
Change-Id: I380223b86660c27bea8f5dcc2d61f32df2704c02
Fixes: 206119621
2021-11-12 19:01:29 +00:00
Colin Cross
66f1ef1e46 Merge "Move apex module installation into Soong" am: 4e278e5f68 am: 8dfdabc4c9 am: f24e7a7f4e am: 2098ff63f4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1880605

Change-Id: I63132d59c3dc63e78b9cca1cb075bedc106b793b
2021-11-12 18:13:03 +00:00
Colin Cross
e3d156a622 Move apex module installation into Soong
Move apex module installation rules into Soong by overriding
InstallBypassMake.

Soong installs don't support post install commands, so move the
symlinks into separate rules and add dependencies on them.

Bug: 204136549
Test: m checkbuild
Change-Id: If65d283abc86f18ad266da0bf16fe95971a0bf9c
2021-11-11 17:44:42 -08:00
Laura Tsai
89c5e3a402 Merge "Revert "Add scripts to generate java APIs used by Mainline modules."" am: 33b60e4983 am: 463f87c7c5 am: fb1e24c1c7 am: 2883262457 am: 5f49af419f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1885670

Change-Id: Ib9e95d6a0ce32be7d059a09a863cc1bb6edb70dc
2021-11-10 08:13:51 +00:00
Laura Tsai
be3c7eacfe Revert "Add scripts to generate java APIs used by Mainline modules."
This reverts commit c92380f001.

Reason for revert:
DroidMonitor:

DroidMonitor-triggered revert due to breakage
https://android-build.googleplex.com/builds/quarterdeck?branch=git_master&target=mainline_modules_arm64-userdebug&lkgb=7898389&lkbb=7900541&fkbb=7898474,
bug 205746850

Change-Id: Ibd84dfe68dfe150b7e05b4287364d1946375bf72
2021-11-10 06:59:37 +00:00
Spandan Das
efd3f2b7f3 Merge "Add android.safetycenter to permission module permitted_packges" 2021-11-09 19:44:16 +00:00
Spandan Das
79e332c02d Add android.safetycenter to permission module permitted_packges
Currently the permitted_packages check is per apex and not per jar.
Adding android.safetycenter to the allowlist to unblock ag/16182563

Bug: 205289292
Test: TH
Change-Id: I9fc315a987af937a527872f24bf73263d2c9c9f2
2021-11-09 18:01:42 +00:00