Fix dex2oatd module definition.
- On target, dex2oatd is compiled as a "prefer32" module, producing a
single 32-bit (or potentially 64-bit) binary ("dex2oatd");
- On host, dex2oatd is compiled as a multilib module, producing both
32- and 64-bit binaries ("dex2oatd32" and "dex2oatd64") as well as a
symlink ("dex2oatd") pointing to one of these binaries (the "primary
target").
Test: m
Test: art/build/apex/runtests.sh
Test: Run "adb shell cmd package bg-dexopt-job" on a userdebug build
and verify the absence of SELinux denials for `installd`.
Test: ALLOW_MISSING_DEPENDENCIES=true DIST_DIR=$(pwd)/out/dist art/tools/dist_linux_bionic.sh -j50 com.android.runtime.host
Bug: 133864678
Bug: 123079311
Change-Id: Ic1b297888ae9889f9344362b25bc6ae0a52138db
diff --git a/build/apex/art_apex_test.py b/build/apex/art_apex_test.py
index db161ed..dc95f93 100755
--- a/build/apex/art_apex_test.py
+++ b/build/apex/art_apex_test.py
@@ -275,10 +275,6 @@
"""Check bin/filename32, and/or bin/filename64, with symlink bin/filename."""
raise NotImplementedError
- def check_symlinked_prefer32_executable(self, filename):
- """Check bin/filename32, or bin/filename64 on 64 bit only, with symlink bin/filename."""
- raise NotImplementedError
-
def check_multilib_executable(self, filename):
"""Check bin/filename for 32 bit, and/or bin/filename64."""
raise NotImplementedError
@@ -301,10 +297,6 @@
self.check_executable('%s32' % filename)
self.check_executable_symlink(filename)
- def check_symlinked_prefer32_executable(self, filename):
- self.check_executable('%s32' % filename)
- self.check_executable_symlink(filename)
-
def check_multilib_executable(self, filename):
self.check_executable(filename)
@@ -325,10 +317,6 @@
self.check_executable('%s64' % filename)
self.check_executable_symlink(filename)
- def check_symlinked_prefer32_executable(self, filename):
- self.check_executable('%s64' % filename)
- self.check_executable_symlink(filename)
-
def check_multilib_executable(self, filename):
self.check_executable('%s64' % filename)
@@ -350,10 +338,6 @@
self.check_executable('%s64' % filename)
self.check_executable_symlink(filename)
- def check_symlinked_prefer32_executable(self, filename):
- self.check_executable('%s32' % filename)
- self.check_executable_symlink(filename)
-
def check_multilib_executable(self, filename):
self.check_executable('%s64' % filename)
self.check_executable(filename)
@@ -541,7 +525,6 @@
# Check debug binaries for ART.
self._checker.check_executable('dexoptanalyzerd')
self._checker.check_executable('profmand')
- self._checker.check_symlinked_prefer32_executable('dex2oatd')
# Check internal libraries for ART.
self._checker.check_native_library('libadbconnectiond')
@@ -567,6 +550,7 @@
def run(self):
# Check ART debug binaries.
+ self._checker.check_executable('dex2oatd')
self._checker.check_executable('oatdumpd')
# Check ART internal libraries.
diff --git a/dex2oat/Android.bp b/dex2oat/Android.bp
index 74df162..d3ba191 100644
--- a/dex2oat/Android.bp
+++ b/dex2oat/Android.bp
@@ -305,25 +305,25 @@
static_libs: [
"libz",
],
+ compile_multilib: "prefer32",
},
host: {
shared_libs: [
"libz",
],
compile_multilib: "both",
+ symlink_preferred_arch: true,
},
- },
-
- multilib: {
- lib32: {
+ linux_glibc_x86: {
suffix: "32",
},
- lib64: {
+ linux_glibc_x86_64: {
+ suffix: "64",
+ },
+ linux_bionic_x86_64: {
suffix: "64",
},
},
-
- symlink_preferred_arch: true,
}
cc_defaults {