diff options
author | Ian Rogers <irogers@google.com> | 2014-09-19 16:51:13 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-09-19 16:51:13 +0000 |
commit | d7fe69baee699ef1c9ec17f95b2d4f2522f03557 (patch) | |
tree | 48bf1807e377504ae735a992248fa4b29ef48b4f /compiler/utils | |
parent | 8147dcb6b149ba5bba0915fdf0cbcb2dd18d431e (diff) | |
parent | 52ed9ad728bf03cc996feff6b3874c1c5a3d0a1f (diff) | |
download | art-d7fe69baee699ef1c9ec17f95b2d4f2522f03557.zip art-d7fe69baee699ef1c9ec17f95b2d4f2522f03557.tar.gz art-d7fe69baee699ef1c9ec17f95b2d4f2522f03557.tar.bz2 |
Merge "ART: Fix host test failure (assembler_thumb_test)."
Diffstat (limited to 'compiler/utils')
-rw-r--r-- | compiler/utils/assembler_thumb_test.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/compiler/utils/assembler_thumb_test.cc b/compiler/utils/assembler_thumb_test.cc index 891a287..e3a9580 100644 --- a/compiler/utils/assembler_thumb_test.cc +++ b/compiler/utils/assembler_thumb_test.cc @@ -116,6 +116,19 @@ std::string GetAndroidToolsDir() { std::string subdir = toolsdir + std::string("/") + std::string(entry->d_name); size_t eabi = subdir.find(TOOL_PREFIX); if (eabi != std::string::npos) { + // Check if "bin/{as,objcopy,objdump}" exist under this folder. + struct stat exec_st; + std::string exec_path; + exec_path = subdir + "/bin/" + TOOL_PREFIX + "as"; + if (stat(exec_path.c_str(), &exec_st) != 0) + continue; + exec_path = subdir + "/bin/" + TOOL_PREFIX + "objcopy"; + if (stat(exec_path.c_str(), &exec_st) != 0) + continue; + exec_path = subdir + "/bin/" + TOOL_PREFIX + "objdump"; + if (stat(exec_path.c_str(), &exec_st) != 0) + continue; + std::string suffix = subdir.substr(eabi + strlen(TOOL_PREFIX)); double version = strtod(suffix.c_str(), nullptr); if (version > maxversion) { |