diff options
author | 2020-01-31 22:43:43 +0000 | |
---|---|---|
committer | 2020-02-13 22:21:42 +0000 | |
commit | e1a445158f65ad7eb47deee7f0fa580e34e836df (patch) | |
tree | d3948eede8c2b54b5dc3349995564a71b8b12631 | |
parent | 71dfc9cfcf3bf6ddd9292d21f3569a62660c5d63 (diff) |
Compile host dex2oat for 64 bit even when HOST_PREFER_32_BIT is set.
Bug: 148312086
Bug: 148372405
Test: env OUT_DIR=out-buildbot HOST_PREFER_32_BIT=true TARGET_BUILD_TYPE=release TARGET_BUILD_VARIANT=eng TARGET_PRODUCT=sdk build/soong/soong_ui.bash --make-mode SOONG_ALLOW_MISSING_DEPENDENCIES=true TEMPORARY_DISABLE_PATH_RESTRICTIONS=true build-art-host-tests vogar core-tests apache-harmony-jdwp-tests-hostdex jsr166-tests libartpalette-system mockito-target dx-tests junit-host libjavacoretests-host libjdwp-host libwrapagentproperties-host libwrapagentpropertiesd-host
Test: lunch sdk-eng && art/tools/buildbot-build.sh --host && m test-art-host-gtest
Test: m art-job-images
Change-Id: I81a812ef5e9324156fd2dcc8abe5bff4097dacb9
-rw-r--r-- | build/art.go | 4 | ||||
-rw-r--r-- | dex2oat/Android.bp | 25 |
2 files changed, 28 insertions, 1 deletions
diff --git a/build/art.go b/build/art.go index f2a64db4bc..e354f61d3a 100644 --- a/build/art.go +++ b/build/art.go @@ -251,7 +251,9 @@ func prefer32Bit(ctx android.LoadHookContext) { p.Target.Host.Compile_multilib = proptools.StringPtr("prefer32") } - ctx.AppendProperties(p) + // Prepend to make it overridable in the blueprints. Note that it doesn't work + // to override the property in a cc_defaults module. + ctx.PrependProperties(p) } var testMapKey = android.NewOnceKey("artTests") diff --git a/dex2oat/Android.bp b/dex2oat/Android.bp index a4bbf40a8f..e5e5b95f0c 100644 --- a/dex2oat/Android.bp +++ b/dex2oat/Android.bp @@ -271,6 +271,24 @@ art_cc_binary { shared_libs: [ "libz", ], + // Override the prefer32 added by art_cc_binary when + // 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 + // 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", }, }, apex_available: [ @@ -314,6 +332,13 @@ art_cc_binary { shared_libs: [ "libz", ], + // Override the prefer32 added by art_cc_binary when + // 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 + // it'd get overridden by the load hook even when it uses + // PrependProperties. compile_multilib: "both", symlink_preferred_arch: true, }, |