From 8070443ce4b31a6787c22490f18f838f8f6ed4be Mon Sep 17 00:00:00 2001 From: David Srbecky Date: Wed, 1 Jul 2020 13:40:19 +0100 Subject: Switch to LLVM prebuilt tools for ART gtests It is also necessary to adjust the expected output of some tests. Bug: 147817558 Test: m test-art-host-gtest Change-Id: Ib517169614470193e0c55f566adb72a526ae6902 --- compiler/utils/assembler_test_base.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'compiler/utils/assembler_test_base.h') diff --git a/compiler/utils/assembler_test_base.h b/compiler/utils/assembler_test_base.h index 1567367b67..736a292667 100644 --- a/compiler/utils/assembler_test_base.h +++ b/compiler/utils/assembler_test_base.h @@ -135,22 +135,24 @@ class AssemblerTestBase : public testing::Test { } virtual std::vector GetAssemblerCommand() { - switch (GetIsa()) { + InstructionSet isa = GetIsa(); + switch (isa) { case InstructionSet::kX86: - return {FindTool("as"), "--32"}; + return {FindTool("clang"), "--compile", "-target", "i386-linux-gnu"}; case InstructionSet::kX86_64: - return {FindTool("as"), "--64"}; + return {FindTool("clang"), "--compile", "-target", "x86_64-linux-gnu"}; default: - return {FindTool("as")}; + LOG(FATAL) << "Unknown instruction set: " << isa; + UNREACHABLE(); } } virtual std::vector GetDisassemblerCommand() { switch (GetIsa()) { case InstructionSet::kThumb2: - return {FindTool("objdump"), "--disassemble", "-M", "force-thumb"}; + return {FindTool("llvm-objdump"), "--disassemble", "-triple", "thumbv7a-linux-gnueabi"}; default: - return {FindTool("objdump"), "--disassemble", "--no-show-raw-insn"}; + return {FindTool("llvm-objdump"), "--disassemble", "--no-show-raw-insn"}; } } -- cgit v1.2.3-59-g8ed1b