Commit graph

22 commits

Author SHA1 Message Date
Kiyoung Kim
8487c0b876 Soong works with empty VNDK version
This change is to fix more misc issues to enable Soong without VNDK
version. This change contains

* Update properties in generated Android.mk
* Update VNDK APEX build to work without VNDK version

Bug: 316829758
Test: AOSP Cuttlefish build succeeded
Change-Id: I10f3c798299afe2d539ec3426b8e2b6068a158f6
2024-01-15 17:31:10 +09:00
Jooyung Han
06a8a1c384 apex: Remove 'zip' apex support
zip apex is no longer supported.

Bug: 279835185
Test: m
Change-Id: I651b0dc4e0efe766f61e97b1e5dd263e0ab74102
2023-08-23 14:01:13 +09:00
Alex Buynytskyy
655ad9a236 Merge "Ignore some prebuilt vndk libs for trunk-stable next" into main 2023-08-18 17:51:23 +00:00
Justin Yun
f14beafb7c Ignore some prebuilt vndk libs for trunk-stable next
Source tree may include prebuilt vndk snapshot libs that are newer
than or equal to the PLATFORM_VNDK_VERSION.
Ignore those prebuilt vndk snapshot libs.

Bug: 296488609
Test: lunch cf_x86_64_phone-next-userdebug; m nothing
Change-Id: I3adaf3b7636f53884f08540959d2ec2fddfb6921
2023-08-18 18:01:08 +09:00
Kiyoung Kim
a2d6deedab Relocate llndk.libraries.txt into system
llndk.libraries.txt file is currently located within the VNDK APEX.
However, this file is still required even if VNDK APEX is deprecated.
This change removes llndk.libraries.txt from VNDK APEX, so it can be
installed within the system image.

Bug: 290160925
Test: aosp_cf build succeeded with llndk.libraries.txt in the system
image

Change-Id: I09a0a43babaa58ff16fc04ea71ab41ab68b54b70
2023-08-16 10:03:16 +09:00
Prashanth Swaminathan
0344c024fd Enable VNDK when version matches platform VNDK
When evaluating whether to build the VNDK for the multi-target
configurations, we construct the API level based on the VNDK
version. When the VNDK version is 'current', we replace the
version name with the platform SDK version e.g. 'UpsideDownCake'.

For architectures that currently have a MinApiArch of FutureApiLevel
(i.e. 'current'), comparing 'UpsideDownCake' with 'current' will
assume 'current' is at a higher API level and skip building the
VNDK.

Before perofrming the API level comparison, we check that the VNDK
version does not match the platform VNDK version. If true, it is
necessary to disable the VNDK when it does not meet the minimum API
level for the architecture. If false, we skip this check and allow
the VNDK to be enabled, as this implies we are targeting the 'current'
VNDK version and should include the target platform VNDK.

Test: m (soong test) & boot
Change-Id: Iacc33d2858fef670ddfdff5bbde9d32b084979c9
2023-03-15 23:28:45 -07:00
Jooyung Han
2cd2f9ad89 VNDK APEX doesn't use "apex_name" property
VNDK APEX has been using "apex_name" property to set "name" field in
apex_manifest. But setting apex_name had a side-effect of emitting
duplicate rules for symbol files for VNDK APEX and its override_apex.
(Please see the removed comments for more details about error)

Not using "apex_name" fixes the duplicate errors.

There're a few more vendor apexes with the same issue, which I will
handle in follow-ups.

Bug: 267581665
Test: m (soong test) && boot
Change-Id: I00f617cef8af4d21880d4e8b9c0b9ab9322ba15c
2023-02-07 13:58:19 +09:00
Colin Cross
bb137a3956 Disable VNDK apexes for unsupported API levels
Disable VNDK apexes when their version is below the minimum
supported API level for the primary architecture.

Test: TestVndkApexCurrent
Change-Id: Ie72a5beb9da432660d3fec5c520402224326f961
2023-01-27 19:49:38 +00:00
Martin Stjernholm
0291abca62 Remove the compat symlinks to ART binaries.
App compact impact is hard to judge (see http://b/124106384#comment9
ff), so this tries it early in the dessert cycle.

This is also a workaround for b/209867137 where the symlink install
rules interact badly with the artifact_path_requirements.mk check.

Test: m installclean && m droid
  verify that $(PRODUCT_DIR)/system/bin doesn't have dalvikvm and
  dex2oat symlinks
Bug: 124106384
Bug: 209867137
Change-Id: I044fb40f656beeb7c6e61f1d418fa13f56714a70
2021-12-14 17:56:26 +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
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
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
Colin Cross
2807f0047b Remove global state from VNDK apexes
Use the name of the apex instead of a global map to find the right
VNDK apex for each VNDK version.

Bug: 181689854
Test: apex tests
Change-Id: If9f8fb10d09e125c9e7d44228e1aa746bf53c082
2021-03-02 12:23:16 -08:00
Martin Stjernholm
7f51107ee6 Rename ART release APEX to com.android.art.
Test: See https://r.android.com/1457217
Bug: 169639321
Change-Id: I6800c7a382486b4e50945cc8b789f4be16482fe6
Merged-In: I6800c7a382486b4e50945cc8b789f4be16482fe6
2020-10-21 15:41:02 +01:00
Dan Albert
c8060536e8 Replace ApiStrToNum uses with ApiLevel.
Test: treehugger
Bug: http://b/154667674
Change-Id: I2954bb21c1cfdeb305f25cfb6c8711c930f6ed50
2020-09-22 15:04:48 -07:00
Nicolas Geoffray
d2a61c8752 Fix dex2oat symlink now that we generate dex2oat32/dex2oat64.
Test: m
Bug: 155257660
Change-Id: I466feabc64c0fb77fcf652be81bc0c4944b84ac0
Merged-In: I466feabc64c0fb77fcf652be81bc0c4944b84ac0
(cherry picked from commit 101a7622fe)
2020-05-01 11:04:59 +01:00
Jooyung Han
055418a56a apex: remove compat symlinks to vndk apex
For R+, symlinks from /system/lib to VNDK APEX are not necessary. (Note
that, symlinks to older VNDK are still necessary because older vendor
may access old locations.)

Hence, do not make symlinks for R+ VNDK APEX.

Bug: 142911355
Test: m # check /system/lib[64]/ for symlinks
        # cf should contain 28/29 symlinks but no symlinks for R
Exempt-From-Owner-Approval: cp from internal
Merged-In: I852fad7edebed3e4edc03c374b3643da6b053fed
Change-Id: I852fad7edebed3e4edc03c374b3643da6b053fed
(cherry picked from commit 84026389e7)
2020-04-16 04:01:48 +00:00
Jooyung Han
73d20d086d Build VNDK APEX for VNDK-Lite
For VNDK-Lite devices, which doesn't define BOARD_VNDK_VERSION, VNDK
APEX is built with only VNDK-Sp libraries with core variants.

Bug: 141908078
Bug: 152353068
Bug: 151635128
Test: TH
Merged-In: I0d08d32473368fd158818d4c2c72fc4cfad68ce6
Change-Id: I0d08d32473368fd158818d4c2c72fc4cfad68ce6
(cherry picked from commit 65d8a6262c)

Exempt-From-Owner-Approval: cp from internal
Change-Id: I0d08d32473368fd158818d4c2c72fc4cfad68ce6
2020-04-09 23:27:25 +00:00
Jooyung Han
002ab687ac Add compat symlinks for prebuilt_apex
When prebuilt_apex overrides/replaces other apex, the same symlinks need
to be created as well.

Bug: 143192278
Test: 1. add prebuilt_apex with vndk apex
         with overrides set as ["com.android.vndk.current"]
      2. m <prebuilt apex>
      3. check if vndk symlinks are created

Change-Id: I8ee9c981ea9c7202ccf5143b3f43e6848773cd63
2020-01-08 01:57:58 +09:00
Jooyung Han
4791cb507b Move compat symlinks from makefile to soong
Two APEXes (i18n, art) requires compat symlinks and these symlinks are
created via ld.config.txt module's POST_INSTALL_CMDS.

  $ m installclean
  $ m ld.config.txt
  $ tree $OUT/system

.../system
├── bin
│   ├── dalvikvm -> /apex/com.android.art/bin/dalvikvm
│   └── dex2oat -> /apex/com.android.art/bin/dex2oat
├── etc
│   └── ld.config.txt
└── usr
    └── icu -> /apex/com.android.i18n/etc/icu

By the way, ld.config.txt is going to removed since linkerconfig
generates it on device.

So, we're moving symlink creation from ld.config.txt(rootdir/Android.mk)
to APEXes' POST_INSTALL_CMDS.

  $ m installclean
  $ m com.android.i18n
  $ tree $OUT/system

.../system
├── apex
│   └── com.android.i18n.apex
└── usr
    └── icu -> /apex/com.android.i18n/etc/icu

  $ m installclean
  $ m com.android.art
  $ tree $OUT/system

.../system
├── apex
│   └── com.android.art.debug.apex
├── bin
│   ├── dalvikvm -> /apex/com.android.art/bin/dalvikvm
│   └── dex2oat -> /apex/com.android.art/bin/dex2oat

Bug: 143192278
Test: m && boot (since these two apexes are bootstrap apexes)
Change-Id: Ib29ea9f9ac40e74f78cd530e7daef8c51292fd24
2019-12-24 14:00:47 +09:00
Jooyung Han
27151d93b6 Override package name for VNDK APEX
com.android.vndk.v<VER> is overridden with
com.google.android.vndk.v<VERE>.

Test: m com.android.vndk.current
    && aapt2 dump badging ../system/apex/com.android.vndk.current.apex
Change-Id: I623d7a144418d7198f0bbf09c5dc983ed1a631c6
Merged-In: I623d7a144418d7198f0bbf09c5dc983ed1a631c6
(cherry picked from commit 0ed1b1b169)
2019-12-17 15:22:21 +00:00
Jiyong Park
09d77522fe split apex.go
apex.go is too big. Separate the build rule and android.mk generation
logic into builder.go and androidmk.go, respectively. prebuilt_apex is
moved to prebuilt.go as well.

No refactoring has been made other than the splitting.

Test: m
Change-Id: I839ab0a1ba2b70ce82d98ac1fa8e3534808b5fd3
2019-11-18 16:37:06 +09:00