diff options
author | Brian Carlstrom <bdc@google.com> | 2013-11-08 18:25:47 -0800 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2013-11-08 18:25:47 -0800 |
commit | eb4d2ae2efdd186a01f3c91a3f6d44cc07e116ef (patch) | |
tree | 26d7bbaeb9d8f927ed3b74ade60a59c0e5781bb1 | |
parent | 0e49b42e03af56521d8ce2c9c84ac5b79e6241c9 (diff) | |
download | art-eb4d2ae2efdd186a01f3c91a3f6d44cc07e116ef.tar.gz art-eb4d2ae2efdd186a01f3c91a3f6d44cc07e116ef.tar.bz2 art-eb4d2ae2efdd186a01f3c91a3f6d44cc07e116ef.zip |
Ignore missing files in dex2oat
Bug: 11599365
Change-Id: I43f7437d2574c3776f921472f38b5a03a87c2822
-rw-r--r-- | dex2oat/dex2oat.cc | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc index c4cce2ff73..a8bd74cfc6 100644 --- a/dex2oat/dex2oat.cc +++ b/dex2oat/dex2oat.cc @@ -409,22 +409,19 @@ static bool ParseInt(const char* in, int* out) { return true; } -static size_t OpenDexFiles(const std::vector<const char*>& dex_filenames, - const std::vector<const char*>& dex_locations, - std::vector<const DexFile*>& dex_files) { - size_t failure_count = 0; +static void OpenDexFiles(const std::vector<const char*>& dex_filenames, + const std::vector<const char*>& dex_locations, + std::vector<const DexFile*>& dex_files) { for (size_t i = 0; i < dex_filenames.size(); i++) { const char* dex_filename = dex_filenames[i]; const char* dex_location = dex_locations[i]; const DexFile* dex_file = DexFile::Open(dex_filename, dex_location); if (dex_file == NULL) { LOG(WARNING) << "Failed to open .dex from file '" << dex_filename << "'\n"; - ++failure_count; } else { dex_files.push_back(dex_file); } } - return failure_count; } // The primary goal of the watchdog is to prevent stuck build servers @@ -846,11 +843,7 @@ static int dex2oat(int argc, char** argv) { options.push_back(std::make_pair("compiler", reinterpret_cast<void*>(NULL))); std::vector<const DexFile*> boot_class_path; if (boot_image_option.empty()) { - size_t failure_count = OpenDexFiles(dex_filenames, dex_locations, boot_class_path); - if (failure_count > 0) { - LOG(ERROR) << "Failed to open some dex files: " << failure_count; - return EXIT_FAILURE; - } + OpenDexFiles(dex_filenames, dex_locations, boot_class_path); options.push_back(std::make_pair("bootclasspath", &boot_class_path)); } else { options.push_back(std::make_pair(boot_image_option.c_str(), reinterpret_cast<void*>(NULL))); @@ -914,11 +907,7 @@ static int dex2oat(int argc, char** argv) { } dex_files.push_back(dex_file); } else { - size_t failure_count = OpenDexFiles(dex_filenames, dex_locations, dex_files); - if (failure_count > 0) { - LOG(ERROR) << "Failed to open some dex files: " << failure_count; - return EXIT_FAILURE; - } + OpenDexFiles(dex_filenames, dex_locations, dex_files); } // Ensure opened dex files are writable for dex-to-dex transformations. |