From f1cf622ecc1a27d95236dd0ec1da0936182ecafd Mon Sep 17 00:00:00 2001 From: Jiakai Zhang Date: Tue, 24 Dec 2024 09:03:35 +0000 Subject: Support loading SDM files at runtime. This is the last piece of platform support for Cloud Compilation. Bug: 377474232 Test: m test-art-host-gtest-art_runtime_tests Test: atest art_standalone_runtime_tests Change-Id: I3a7c1774c75334e55e9c98610745707dfcec35a2 --- libartbase/base/file_utils.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libartbase/base/file_utils.cc') diff --git a/libartbase/base/file_utils.cc b/libartbase/base/file_utils.cc index 2acebb9b4f..4253fa1ce7 100644 --- a/libartbase/base/file_utils.cc +++ b/libartbase/base/file_utils.cc @@ -715,6 +715,15 @@ std::string GetDmFilename(const std::string& dex_location) { return ReplaceFileExtension(dex_location, kDmExtension); } +std::string GetSdmFilename(const std::string& dex_location, InstructionSet isa) { + return ReplaceFileExtension(dex_location, + StringPrintf("%s%s", GetInstructionSetString(isa), kSdmExtension)); +} + +std::string GetSdcFilename(const std::string& oat_location) { + return ReplaceFileExtension(oat_location, kSdcExtension); +} + // check for the file in /system, followed by /system_ext std::string GetSystemOdexFilenameForApex(std::string_view location, InstructionSet isa) { DCHECK(LocationIsOnApex(location)); -- cgit v1.2.3-59-g8ed1b