diff options
author | 2023-04-20 15:46:49 -0700 | |
---|---|---|
committer | 2023-05-08 17:22:11 +0000 | |
commit | 32645f219cb3d4588c1aefcf9c7db944aef6cd45 (patch) | |
tree | 3289943d1f5ef837aad074990ccc452583f0138c /disassembler | |
parent | aad32c712ec6860d96c30e152bfcd02e74200b15 (diff) |
Remove the codegen property
The codegen property was very similar to the targets property, except:
- on host it combined all the properties from all the arches
- it would apply the properties from each arch branch if the device
supported it, with the exception of always including a 32bit branch
if the 64bit branch was included.
For the most part, this could be expressed by using the regular `target`
property in soong. However, the `target` branches are selected based
on if the module itself is being compiled for 32bit/64bit/a particular
arch, not if the device supports it or not. This means that after this
change, compiling a module for 32 bit on a device that supports both
64 and 32 bit will not have the 64 bit flags. Note that the reverse does
not work the same way, the 32 bit flags are manually copied onto the 64
bit `target` branch to maintain the plugin's old behavior of always
including 32bit code on 64bit.
Bug: 247785938
Test: Presubmits (because of the behavior change described above, the ninja files do have differences)
Change-Id: I23f585c2a2ad2cbe9b3e212097aef88d63c5394b
Diffstat (limited to 'disassembler')
-rw-r--r-- | disassembler/Android.bp | 69 |
1 files changed, 50 insertions, 19 deletions
diff --git a/disassembler/Android.bp b/disassembler/Android.bp index b7f758ffdc..c16ee39799 100644 --- a/disassembler/Android.bp +++ b/disassembler/Android.bp @@ -23,25 +23,41 @@ package { default_applicable_licenses: ["art_license"], } -art_cc_defaults { +cc_defaults { name: "libart-disassembler-defaults", defaults: ["art_defaults"], host_supported: true, srcs: [ "disassembler.cc", ], - codegen: { - arm: { - srcs: ["disassembler_arm.cc"], + target: { + host: { + srcs: [ + "disassembler_arm.cc", + "disassembler_arm64.cc", + "disassembler_x86.cc", + ], }, - arm64: { - srcs: ["disassembler_arm64.cc"], + android_arm: { + srcs: [ + "disassembler_arm.cc", + ], + }, + android_arm64: { + srcs: [ + "disassembler_arm.cc", + "disassembler_arm64.cc", + ], }, - x86: { - srcs: ["disassembler_x86.cc"], + android_x86: { + srcs: [ + "disassembler_x86.cc", + ], }, - x86_64: { - srcs: ["disassembler_x86.cc"], + android_x86_64: { + srcs: [ + "disassembler_x86.cc", + ], }, }, shared_libs: [ @@ -56,14 +72,20 @@ art_cc_defaults { art_cc_library { name: "libart-disassembler", defaults: ["libart-disassembler-defaults"], - codegen: { - arm: { + target: { + host: { + static_libs: [ + // For disassembler_arm*. + "libvixl", + ], + }, + android_arm: { static_libs: [ // For disassembler_arm*. "libvixl", ], }, - arm64: { + android_arm64: { static_libs: [ // For disassembler_arm*. "libvixl", @@ -90,14 +112,20 @@ art_cc_library { "art_debug_defaults", "libart-disassembler-defaults", ], - codegen: { - arm: { + target: { + host: { + static_libs: [ + // For disassembler_arm*. + "libvixld", + ], + }, + android_arm: { static_libs: [ // For disassembler_arm*. "libvixld", ], }, - arm64: { + android_arm64: { static_libs: [ // For disassembler_arm*. "libvixld", @@ -132,10 +160,13 @@ cc_library_headers { ], } -art_cc_defaults { +cc_defaults { name: "art_disassembler_tests_defaults", - codegen: { - arm64: { + target: { + host: { + srcs: ["disassembler_arm64_test.cc"], + }, + android_arm64: { srcs: ["disassembler_arm64_test.cc"], }, }, |