Compile llvm.Module into ELF object file.
Change-Id: I8faf7427944324c9bac12573d217cde2a2e658f1
diff --git a/src/oat_writer.cc b/src/oat_writer.cc
index 99c42f7..a4a4a2c 100644
--- a/src/oat_writer.cc
+++ b/src/oat_writer.cc
@@ -201,6 +201,8 @@
size_t OatWriter::InitOatCodeMethod(size_t offset, size_t oat_class_index, size_t class_def_index,
size_t class_def_method_index, bool is_native, bool is_static,
bool is_direct, uint32_t method_idx, const DexFile* dex_file) {
+
+#if !defined(ART_USE_LLVM_COMPILER)
// derived from CompiledMethod if available
uint32_t code_offset = 0;
uint32_t frame_size_in_bytes = kStackAlignment;
@@ -351,6 +353,8 @@
method->SetOatGcMapOffset(gc_map_offset);
method->SetOatInvokeStubOffset(invoke_stub_offset);
}
+#endif
+
return offset;
}
@@ -502,6 +506,7 @@
size_t OatWriter::WriteCodeMethod(File* file, size_t code_offset, size_t oat_class_index,
size_t class_def_method_index, bool is_static,
uint32_t method_idx, const DexFile& dex_file) {
+#if !defined(ART_USE_LLVM_COMPILER)
const CompiledMethod* compiled_method =
compiler_->GetCompiledMethod(Compiler::MethodReference(&dex_file, method_idx));
@@ -679,6 +684,8 @@
}
DCHECK_CODE_OFFSET();
}
+#endif
+
return code_offset;
}