diff options
author | Roland Levillain <rpl@google.com> | 2018-11-06 13:31:48 +0000 |
---|---|---|
committer | Roland Levillain <rpl@google.com> | 2018-11-06 14:14:43 +0000 |
commit | 5725e7c4aab576384649de60557dc1f52eb21b9f (patch) | |
tree | 0fdc9247fbc5129a8c0cc1ee1eaa1e680ebd856d /disassembler | |
parent | 5af106e2b67752275e6fc9a2530cb30a8587f402 (diff) |
Conditionally compile/link ARM & ARM64 disassemblers based on targeted archs.
Note: We still unconditionally compile and link the MIPS32/MIPS64
and x86/x86-64 disassemblers, as they cannot be easily made
orthogonal in the Blueprint file.
Test: Build ART on host
Test: Build ART for ARM-only device
Test: Build ART for ARM64-only device
Test: Build ART for ARM64/ARM device
Bug: 119090273
Change-Id: Iec7bfed660ad0008bb870bfa614a90113bf4c501
Diffstat (limited to 'disassembler')
-rw-r--r-- | disassembler/Android.bp | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/disassembler/Android.bp b/disassembler/Android.bp index 241b191641..a7c1802515 100644 --- a/disassembler/Android.bp +++ b/disassembler/Android.bp @@ -20,11 +20,39 @@ art_cc_defaults { host_supported: true, srcs: [ "disassembler.cc", - "disassembler_arm.cc", - "disassembler_arm64.cc", "disassembler_mips.cc", "disassembler_x86.cc", ], + codegen: { + arm: { + srcs: ["disassembler_arm.cc"] + }, + arm64: { + srcs: ["disassembler_arm64.cc"] + }, + // TODO: We should also conditionally include the MIPS32/MIPS64 and the + // x86/x86-64 disassembler definitions (b/119090273). However, using the + // following syntax here: + // + // mips: { + // srcs: ["disassembler_mips.cc"] + // }, + // mips64: { + // srcs: ["disassembler_mips.cc"] + // }, + // x86: { + // srcs: ["disassembler_x86.cc"] + // }, + // x86_64: { + // srcs: ["disassembler_x86.cc"] + // }, + // + // does not work, as it generates a file rejected by ninja with this + // error message (e.g. on host, where we include all the back ends by + // default): + // + // FAILED: ninja: out/soong/build.ninja:320768: multiple rules generate out/soong/.intermediates/art/disassembler/libart-disassembler/linux_glibc_x86_64_static/obj/art/disassembler/disassembler_mips.o [-w dupbuild=err] + }, include_dirs: ["art/runtime"], shared_libs: [ |