From 4fa07a5727551018e2dcd93d41dac98f20212e99 Mon Sep 17 00:00:00 2001 From: David Srbecky Date: Tue, 31 Mar 2020 20:52:09 +0100 Subject: Add explicit compiler option to enable test-specific features. We can no longer rely on checking the "core.art" image name, since we plan to remove it and use the shipped boot image. This option enables test-specific features, such as $noinline$. Test: ./art/test.py -r --optimizing --64 Bug: 147817558 Change-Id: Iadac6e1b0f46e83efd0551fb8462a6b268ad33d8 --- compiler/driver/compiler_options.cc | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'compiler/driver/compiler_options.cc') diff --git a/compiler/driver/compiler_options.cc b/compiler/driver/compiler_options.cc index 5681134666..05500751f8 100644 --- a/compiler/driver/compiler_options.cc +++ b/compiler/driver/compiler_options.cc @@ -51,7 +51,7 @@ CompilerOptions::CompilerOptions() image_classes_(), verification_results_(nullptr), image_type_(ImageType::kNone), - compiling_with_core_image_(false), + compile_art_test_(false), baseline_(false), debuggable_(false), generate_debug_info_(kDefaultGenerateDebugInfo), @@ -186,24 +186,4 @@ bool CompilerOptions::IsMethodVerifiedWithoutFailures(uint32_t method_idx, return is_system_class; } -bool CompilerOptions::IsCoreImageFilename(const std::string& boot_image_filename) { - std::string_view filename(boot_image_filename); - size_t colon_pos = filename.find(':'); - if (colon_pos != std::string_view::npos) { - filename = filename.substr(0u, colon_pos); - } - // Look for "core.art" or "core-*.art". - if (EndsWith(filename, "core.art")) { - return true; - } - if (!EndsWith(filename, ".art")) { - return false; - } - size_t slash_pos = filename.rfind('/'); - if (slash_pos == std::string::npos) { - return StartsWith(filename, "core-"); - } - return filename.compare(slash_pos + 1, 5u, "core-") == 0; -} - } // namespace art -- cgit v1.2.3-59-g8ed1b