diff options
author | Andreas Gampe <agampe@google.com> | 2015-04-10 09:28:22 -0700 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2015-04-10 09:28:22 -0700 |
commit | 3773cd046b1c34569f4711666788bf8a389c7857 (patch) | |
tree | 4fda463949679cfe434e0d5559919a5f01b4d1ac /compiler/driver/compiler_driver.cc | |
parent | 6d80318c382a3490ab605b46fa7cb22c5e823fec (diff) | |
download | android_art-3773cd046b1c34569f4711666788bf8a389c7857.tar.gz android_art-3773cd046b1c34569f4711666788bf8a389c7857.tar.bz2 android_art-3773cd046b1c34569f4711666788bf8a389c7857.zip |
ART: Remove WriteElf from Compiler
As Portable is gone, we only have one elf_writer left. It also
allows to put the decision for 32b vs 64b ELF into a central
point.
Change-Id: Iae67d06df85268b3f0ee5725abc65edd23eb2499
Diffstat (limited to 'compiler/driver/compiler_driver.cc')
-rw-r--r-- | compiler/driver/compiler_driver.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index c2b837512c..f263f6d329 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -40,6 +40,7 @@ #include "dex/verified_method.h" #include "dex/quick/dex_file_method_inliner.h" #include "driver/compiler_options.h" +#include "elf_writer_quick.h" #include "jni_internal.h" #include "object_lock.h" #include "profiler.h" @@ -72,6 +73,9 @@ namespace art { static constexpr bool kTimeCompileMethod = !kIsDebugBuild; +// Whether to produce 64-bit ELF files for 64-bit targets. Leave this off for now. +static constexpr bool kProduce64BitELFFiles = false; + static double Percentage(size_t x, size_t y) { return 100.0 * (static_cast<double>(x)) / (static_cast<double>(x + y)); } @@ -2368,7 +2372,11 @@ bool CompilerDriver::WriteElf(const std::string& android_root, OatWriter* oat_writer, art::File* file) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { - return compiler_->WriteElf(file, oat_writer, dex_files, android_root, is_host); + if (kProduce64BitELFFiles && Is64BitInstructionSet(GetInstructionSet())) { + return art::ElfWriterQuick64::Create(file, oat_writer, dex_files, android_root, is_host, *this); + } else { + return art::ElfWriterQuick32::Create(file, oat_writer, dex_files, android_root, is_host, *this); + } } bool CompilerDriver::SkipCompilation(const std::string& method_name) { |