summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Stjernholm <mast@google.com>2022-04-04 10:31:47 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-04-04 10:31:47 +0000
commit4567e11ef60187bb6f156529a9fdd5ed3e28084f (patch)
tree867e48e4e220e249657a96919e066ce47bca4f83
parent8dcd43be129b411c2b15f295b9a3a8c68b7983ba (diff)
parentf3178288b26571c3950dbfb6d084b265e557b7bd (diff)
downloadruntime-4567e11ef60187bb6f156529a9fdd5ed3e28084f.tar.gz
Merge "Update prebuilt drop script for new CI build locations." am: c941ccf2eb am: 32dd3efa7b am: ca823acf96 am: 87e93cc09b am: f3178288b2
Original change: https://android-review.googlesource.com/c/platform/prebuilts/runtime/+/2050774 Change-Id: Id78f7118c9a83df0cc4ced4ccc885890d81731ce Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--mainline/README.md17
-rwxr-xr-xmainline/update.py131
2 files changed, 82 insertions, 66 deletions
diff --git a/mainline/README.md b/mainline/README.md
index ea856767..62c00793 100644
--- a/mainline/README.md
+++ b/mainline/README.md
@@ -1,11 +1,18 @@
Prebuilts of APIs from platform and other Mainline modules that the ART Module
needs.
+These prebuilts should reflect the APIs in Android 12 (version 31), which is the
+earliest release that may take an update of the ART Module. Hence updating the
+prebuilts to newer versions needs to be done with care. Prebuilts that are part
+of the NDK are generally safe since they are annotated to provide a version 31
+compatible ABI.
+
To update:
1. Submit the changes that need to go into the prebuilt.
-2. Wait for a new build on branch `aosp-master`, target `mainline_modules`.
+2. Wait for new builds on branch `aosp-master`, target
+ `mainline_modules_sdks-userdebug`.
3. Run:
@@ -15,5 +22,9 @@ To update:
where `<build id>` is the ID of the build in step #2.
-4. Upload and submit the CL created in `prebuilts/runtime`. Please do not make
- any file changes locally.
+ The `update-py` script has code to download and unpack all prebuilts, but
+ most of them are commented out (see the `PREBUILT_INSTALL_MODULES` list).
+ Hence you may need to tweak the script to download the prebuilts you need.
+
+4. Try to minimize the updates in the CL created in `prebuilts/runtime`, and
+ ensure they are safe. mast@google.com is happy to help with review.
diff --git a/mainline/update.py b/mainline/update.py
index 06ffeeed..42448550 100755
--- a/mainline/update.py
+++ b/mainline/update.py
@@ -25,99 +25,104 @@ sys.path.append(THIS_DIR + '/../common/python')
import update_prebuilts as update
PREBUILT_DESCRIPTION = 'mainline'
-TARGET = 'mainline_modules'
+MODULE_TARGET = 'mainline_modules-userdebug'
+SDK_TARGET = "mainline_modules_sdks-userdebug"
-COMMIT_MESSAGE_NOTE_TEMPLATE = """\
-CL prepared by prebuilts/runtime/mainline/update.py with the following
-targets: {}
+COMMIT_MESSAGE_NOTE = """\
+CL prepared by prebuilts/runtime/mainline/update.py.
See prebuilts/runtime/mainline/README.md for update instructions.
Test: Presubmits
"""
-def InstallApexEntries(apex_name, install_dir):
+def InstallApexEntries(apex_base_name, install_dir):
res = []
for arch in ['arm', 'arm64', 'x86', 'x86_64']:
res.append(update.InstallEntry(
- TARGET,
- arch + '/' + apex_name + '.apex',
- install_dir + '/' + apex_name + '-' + arch + '.apex',
+ MODULE_TARGET,
+ os.path.join('mainline_modules_' + arch,
+ 'com.android.' + apex_base_name + '.apex'),
+ os.path.join(install_dir,
+ 'com.android.' + apex_base_name + '-' + arch + '.apex'),
install_unzipped=False))
return res
+def InstallUnbundledSdkEntries(apex_base_name, sdk_type):
+ return [update.InstallEntry(
+ SDK_TARGET,
+ os.path.join('mainline-sdks/for-latest-build/current',
+ 'com.android.' + apex_base_name,
+ sdk_type,
+ apex_base_name + '-module-' + sdk_type + '-current.zip'),
+ os.path.join(apex_base_name, sdk_type),
+ install_unzipped=True)]
+
+def InstallBundledSdkEntries(apex_base_name, sdk_type):
+ return [update.InstallEntry(
+ SDK_TARGET,
+ os.path.join('bundled-mainline-sdks',
+ 'com.android.' + apex_base_name,
+ sdk_type,
+ apex_base_name + '-module-' + sdk_type + '-current.zip'),
+ os.path.join(apex_base_name, sdk_type),
+ install_unzipped=True)]
+
+def InstallPlatformMainlineSdkEntries(sdk_type):
+ return [update.InstallEntry(
+ SDK_TARGET,
+ os.path.join('bundled-mainline-sdks',
+ 'platform-mainline',
+ sdk_type,
+ 'platform-mainline-' + sdk_type + '-current.zip'),
+ os.path.join('platform', sdk_type),
+ install_unzipped=True)]
+
def InstallSharedLibEntries(lib_name, install_dir):
res = []
for arch in ['arm', 'arm64', 'x86', 'x86_64']:
res.append(update.InstallEntry(
- TARGET,
- arch + '/' + lib_name + '.so',
- install_dir + '/' + arch + '/' + lib_name + '.so',
+ MODULE_TARGET,
+ os.path.join(arch, lib_name + '.so'),
+ os.path.join(install_dir, arch, lib_name + '.so'),
install_unzipped=False))
return res
-def InstallSdkEntries(mainline_sdk_name, install_dir):
- return [update.InstallEntry(
- TARGET,
- 'mainline-sdks/' + mainline_sdk_name + '-current.zip',
- install_dir,
- install_unzipped=True)]
-
-PREBUILT_INSTALL_MODULES = {
+PREBUILT_INSTALL_MODULES = (
# Conscrypt
- 'conscrypt': (
- InstallApexEntries('com.android.conscrypt', 'conscrypt/apex') +
- InstallSdkEntries('conscrypt-module-test-exports', 'conscrypt/test-exports') +
- InstallSdkEntries('conscrypt-module-host-exports', 'conscrypt/host-exports')),
+ #InstallApexEntries('conscrypt', 'conscrypt/apex') +
+ #InstallUnbundledSdkEntries('conscrypt', 'test-exports') +
+ #InstallUnbundledSdkEntries('conscrypt', 'host-exports') +
# Runtime (Bionic)
- 'runtime': (
- InstallApexEntries('com.android.runtime', 'runtime/apex') +
- InstallSdkEntries('runtime-module-sdk', 'runtime/sdk') +
- InstallSdkEntries('runtime-module-host-exports', 'runtime/host-exports')),
+ #InstallApexEntries('runtime', 'runtime/apex') +
+ InstallBundledSdkEntries('runtime', 'sdk') +
+ #InstallBundledSdkEntries('runtime', 'host-exports') +
# I18N
- 'i18n': (
- InstallApexEntries('com.android.i18n', 'i18n/apex') +
- InstallSdkEntries('i18n-module-sdk', 'i18n/sdk') +
- InstallSdkEntries('i18n-module-test-exports', 'i18n/test-exports')),
+ #InstallApexEntries('i18n', 'i18n/apex') +
+ #InstallBundledSdkEntries('i18n', 'sdk') +
+ #InstallBundledSdkEntries('i18n', 'test-exports') +
# tzdata
- 'tzdata': (
- InstallApexEntries('com.android.tzdata', 'tzdata/apex') +
- InstallSdkEntries('tzdata-module-test-exports', 'tzdata/test-exports')),
+ #InstallApexEntries('tzdata', 'tzdata/apex') +
+ #InstallBundledSdkEntries('tzdata', 'test-exports') +
# statsd
- 'statsd': InstallApexEntries('com.android.os.statsd', 'statsd/apex'),
+ #InstallApexEntries('os.statsd', 'statsd/apex') +
# Platform
- 'platform': (
- InstallSdkEntries('platform-mainline-sdk', 'platform/sdk') +
- InstallSdkEntries('platform-mainline-test-exports', 'platform/test-exports') +
- # Shared libraries that are stubs in SDKs, but for which we need their
- # implementation for device testing.
- InstallSharedLibEntries('heapprofd_client_api', 'platform/impl') +
- InstallSharedLibEntries('libartpalette-system', 'platform/impl') +
- InstallSharedLibEntries('liblog', 'platform/impl')),
-}
-
-def add_additional_arguments(parser):
- parser.add_argument('--install-module', choices=['all'] + PREBUILT_INSTALL_MODULES.keys(),
- default='all',
- help="The prebuilt module(s) to install.")
+ #InstallPlatformMainlineSdkEntries('sdk') +
+ #InstallPlatformMainlineSdkEntries('test-exports') +
+ # Shared libraries that are stubs in SDKs, but for which we need their
+ # implementation for device testing.
+ #InstallSharedLibEntries('heapprofd_client_api', 'platform/impl') +
+ #InstallSharedLibEntries('libartpalette-system', 'platform/impl') +
+ #InstallSharedLibEntries('liblog', 'platform/impl') +
-if __name__ == '__main__':
- args = update.parse_args(add_additional_arguments)
-
- mainline_install_list = []
- if args.install_module == 'all':
- modules = PREBUILT_INSTALL_MODULES.keys()
- else:
- modules = [args.install_module]
- for module in modules:
- mainline_install_list.extend(PREBUILT_INSTALL_MODULES[module])
+ [])
- commit_message_note = COMMIT_MESSAGE_NOTE_TEMPLATE.format(', '.join(modules))
-
- update.main(args, THIS_DIR, PREBUILT_DESCRIPTION, mainline_install_list, [],
- commit_message_note)
+if __name__ == '__main__':
+ args = update.parse_args()
+ update.main(args, THIS_DIR, PREBUILT_DESCRIPTION, PREBUILT_INSTALL_MODULES,
+ [], COMMIT_MESSAGE_NOTE)