diff options
| author | 2020-02-25 16:02:07 +0000 | |
|---|---|---|
| committer | 2020-02-25 19:31:06 +0000 | |
| commit | c42db836671ac361a18e929d137e98f36b71ad73 (patch) | |
| tree | 08f1e761e7b635cd3872a72faca01f6ce594b1f3 | |
| parent | 1c85efd33bb7e1b6e46393b9d7b46a346e32ef04 (diff) | |
Make dex2oat(d) and hiddenapi 64-bit only on host.
Following https://r.android.com/1239726 we no longer need multilib host
dex2oat.
Also clean up a prefer32 device override that isn't applicable for the
host-only hiddenapi binary.
Test: m (with and without HOST_PREFER_32_BIT=true)
Test: art/build/apex/runtests.sh (with and without HOST_PREFER_32_BIT=true)
Test: lunch sdk-eng && art/tools/buildbot-build.sh --host && \
art/test/run-test --host --optimizing 641-checker-arraycopy
(with and without HOST_PREFER_32_BIT=true)
Bug: 148372405
Bug: 149749169
Change-Id: I46256ad7e8778e8d0f24b40d5acde482c4b66971
| -rw-r--r-- | build/apex/Android.bp | 43 | ||||
| -rwxr-xr-x | build/apex/art_apex_test.py | 3 | ||||
| -rw-r--r-- | dex2oat/Android.bp | 28 | ||||
| -rw-r--r-- | tools/hiddenapi/Android.bp | 12 |
4 files changed, 20 insertions, 66 deletions
diff --git a/build/apex/Android.bp b/build/apex/Android.bp index 03704c3dd4..4d96d6de6b 100644 --- a/build/apex/Android.bp +++ b/build/apex/Android.bp @@ -11,24 +11,10 @@ art_runtime_base_binaries_both = [ // - Base requirements (binaries for which a 32-bit version is preferred on device, but for which // only the "first" (likely 64-bit) version is required on host). art_runtime_base_binaries_prefer32_on_device_first_on_host = [ + "dex2oat", "dexoptanalyzer", "profman", ] -// - Base requirements (binaries for which a 32-bit version is preferred on device, but for which -// "both" versions (32- and 64-bit, if possible) are required on host). -art_runtime_base_binaries_prefer32_on_device_both_on_host = [ - "dex2oat", -] - -art_runtime_base_binaries_prefer32_on_device = - art_runtime_base_binaries_prefer32_on_device_first_on_host + - art_runtime_base_binaries_prefer32_on_device_both_on_host - -art_runtime_base_binaries_both_on_host = - art_runtime_base_binaries_prefer32_on_device_both_on_host - -art_runtime_base_binaries_first_on_host = - art_runtime_base_binaries_prefer32_on_device_first_on_host // - Base requirements (libraries). // @@ -80,24 +66,10 @@ bionic_binaries_both = [ // - Debug variants (binaries for which a 32-bit version is preferred on device, but for which // only the "first" (likely 64-bit) version is required on host). art_runtime_debug_binaries_prefer32_on_device_first_on_host = [ + "dex2oatd", "dexoptanalyzerd", "profmand", ] -// - Debug variants (binaries for which a 32-bit version is preferred on device, but for which -// "both" versions (32- and 64-bit, if possible) are required on host). -art_runtime_debug_binaries_prefer32_on_device_both_on_host = [ - "dex2oatd", -] - -art_runtime_debug_binaries_prefer32_on_device = - art_runtime_debug_binaries_prefer32_on_device_first_on_host + - art_runtime_debug_binaries_prefer32_on_device_both_on_host - -art_runtime_debug_binaries_both_on_host = - art_runtime_debug_binaries_prefer32_on_device_both_on_host - -art_runtime_debug_binaries_first_on_host = - art_runtime_debug_binaries_prefer32_on_device_first_on_host // - Debug variants (libraries). art_runtime_debug_native_shared_libs = [ @@ -239,7 +211,7 @@ apex_defaults { binaries: art_runtime_base_binaries_both, }, prefer32: { - binaries: art_runtime_base_binaries_prefer32_on_device + binaries: art_runtime_base_binaries_prefer32_on_device_first_on_host, }, first: { binaries: art_tools_common_binaries + @@ -266,7 +238,7 @@ apex_defaults { binaries: art_tools_debug_binaries_both, }, prefer32: { - binaries: art_runtime_debug_binaries_prefer32_on_device, + binaries: art_runtime_debug_binaries_prefer32_on_device_first_on_host, }, first: { binaries: art_tools_debug_binaries + @@ -352,14 +324,11 @@ art_apex_test_host { multilib: { both: { binaries: art_runtime_base_binaries_both + - art_runtime_base_binaries_both_on_host + - art_runtime_debug_binaries_both_on_host + art_tools_debug_binaries_both, }, first: { - binaries: - art_runtime_base_binaries_first_on_host + - art_runtime_debug_binaries_first_on_host + + binaries: art_runtime_base_binaries_prefer32_on_device_first_on_host + + art_runtime_debug_binaries_prefer32_on_device_first_on_host + art_tools_common_binaries + art_tools_debug_binaries + // Host APEX is always debug. art_tools_host_only_binaries, diff --git a/build/apex/art_apex_test.py b/build/apex/art_apex_test.py index bc0de41780..0e63afd53a 100755 --- a/build/apex/art_apex_test.py +++ b/build/apex/art_apex_test.py @@ -614,8 +614,7 @@ class ReleaseHostChecker: def run(self): # Check binaries for ART. self._checker.check_executable('hprof-conv') - self._checker.check_symlinked_multilib_executable('dex2oat') - self._checker.check_symlinked_multilib_executable('dex2oatd') + self._checker.check_executable('dex2oatd') # Check exported native libraries for Managed Core Library. self._checker.check_native_library('libandroidicu-host') diff --git a/dex2oat/Android.bp b/dex2oat/Android.bp index e5e5b95f0c..4a72faa606 100644 --- a/dex2oat/Android.bp +++ b/dex2oat/Android.bp @@ -275,20 +275,10 @@ art_cc_binary { // HOST_PREFER_32_BIT is in use. Necessary because the logic in // Soong for setting ctx.Config().BuildOSTarget (used in // dexpreopt.RegisterToolDeps) doesn't take host prefer32 into - // account. Note that this override cannot be in cc_default because + // account. Note that this override cannot be in cc_defaults because // it'd get overridden by the load hook even when it uses // PrependProperties. - compile_multilib: "both", - symlink_preferred_arch: true, - }, - linux_glibc_x86: { - suffix: "32", - }, - linux_glibc_x86_64: { - suffix: "64", - }, - linux_bionic_x86_64: { - suffix: "64", + compile_multilib: "64", }, }, apex_available: [ @@ -336,20 +326,10 @@ art_cc_binary { // HOST_PREFER_32_BIT is in use. Necessary because the logic in // Soong for setting ctx.Config().BuildOSTarget (used in // dexpreopt.RegisterToolDeps) doesn't take host prefer32 into - // account. Note that this override cannot be in cc_default because + // account. Note that this override cannot be in cc_defaults because // it'd get overridden by the load hook even when it uses // PrependProperties. - compile_multilib: "both", - symlink_preferred_arch: true, - }, - linux_glibc_x86: { - suffix: "32", - }, - linux_glibc_x86_64: { - suffix: "64", - }, - linux_bionic_x86_64: { - suffix: "64", + compile_multilib: "64", }, }, apex_available: [ diff --git a/tools/hiddenapi/Android.bp b/tools/hiddenapi/Android.bp index e77e4c787f..9ddaf7dd1a 100644 --- a/tools/hiddenapi/Android.bp +++ b/tools/hiddenapi/Android.bp @@ -24,9 +24,6 @@ cc_defaults { ], target: { - android: { - compile_multilib: "prefer32", - }, darwin: { enabled: true, }, @@ -40,6 +37,15 @@ cc_defaults { art_cc_binary { name: "hiddenapi", defaults: ["hiddenapi-defaults"], + target: { + host: { + // Override the prefer32 added by art_cc_binary when + // HOST_PREFER_32_BIT is in use. Note that this override cannot be + // in cc_defaults because it'd get overridden by the load hook even + // when it uses PrependProperties. + compile_multilib: "64", + }, + }, shared_libs: [ "libdexfile", "libartbase", |