Revert^2 "Switch to LLVM prebuilt tools for ART gtests"
It is also necessary to adjust the expected output of some tests.
This reverts commit ea54b823a3a02f65c865e11bbbccb327a273c039.
Bug: 147817558
Test: m test-art-host-gtest
Change-Id: Ib244e8b7d43d575299654397a47056f295ab4589
diff --git a/compiler/utils/assembler_test_base.h b/compiler/utils/assembler_test_base.h
index 1567367..736a292 100644
--- a/compiler/utils/assembler_test_base.h
+++ b/compiler/utils/assembler_test_base.h
@@ -135,22 +135,24 @@
}
virtual std::vector<std::string> 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<std::string> 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"};
}
}