From 3156f300a2463f769ee992e197db2a9bba66c00f Mon Sep 17 00:00:00 2001 From: Egor Bogatov Date: Tue, 2 Jun 2020 13:20:00 +0300 Subject: [PATCH] Rename to libruntime-android.so to libmonodroid.so (#37251) --- src/mono/mono/metadata/loader-internals.h | 2 +- .../mobile.tasks/AndroidAppBuilder/ApkBuilder.cs | 14 +++++++------- .../Templates/CMakeLists-android.txt | 8 ++++---- .../AndroidAppBuilder/Templates/MonoRunner.java | 2 +- .../Templates/{runtime-android.c => monodroid.c} | 0 5 files changed, 13 insertions(+), 13 deletions(-) rename tools-local/tasks/mobile.tasks/AndroidAppBuilder/Templates/{runtime-android.c => monodroid.c} (100%) diff --git a/src/mono/mono/metadata/loader-internals.h b/src/mono/mono/metadata/loader-internals.h index 07f6e7186c885..43134540d59ab 100644 --- a/src/mono/mono/metadata/loader-internals.h +++ b/src/mono/mono/metadata/loader-internals.h @@ -17,7 +17,7 @@ #if defined(TARGET_OSX) #define MONO_LOADER_LIBRARY_NAME "libcoreclr.dylib" #elif defined(TARGET_ANDROID) -#define MONO_LOADER_LIBRARY_NAME "libruntime-android.so" +#define MONO_LOADER_LIBRARY_NAME "libmonodroid.so" #else #define MONO_LOADER_LIBRARY_NAME "libcoreclr.so" #endif diff --git a/tools-local/tasks/mobile.tasks/AndroidAppBuilder/ApkBuilder.cs b/tools-local/tasks/mobile.tasks/AndroidAppBuilder/ApkBuilder.cs index e7fcebdd08eb1..a92a5090c3368 100644 --- a/tools-local/tasks/mobile.tasks/AndroidAppBuilder/ApkBuilder.cs +++ b/tools-local/tasks/mobile.tasks/AndroidAppBuilder/ApkBuilder.cs @@ -129,7 +129,7 @@ public class ApkBuilder if (!File.Exists(androidJar)) throw new ArgumentException($"API level={BuildApiLevel} is not downloaded in Android SDK"); - // 1. Build libruntime-android.so` via cmake + // 1. Build libmonodroid.so` via cmake string monoRuntimeLib = Path.Combine(sourceDir, "libmonosgen-2.0.a"); if (!File.Exists(monoRuntimeLib)) @@ -140,15 +140,15 @@ public class ApkBuilder .Replace("%NativeLibrariesToLink%", monoRuntimeLib); File.WriteAllText(Path.Combine(OutputDir, "CMakeLists.txt"), cmakeLists); - string runtimeAndroidSrc = Utils.GetEmbeddedResource("runtime-android.c") + string monodroidSrc = Utils.GetEmbeddedResource("monodroid.c") .Replace("%EntryPointLibName%", Path.GetFileName(entryPointLib) .Replace("%RID%", GetRid(abi))); - File.WriteAllText(Path.Combine(OutputDir, "runtime-android.c"), runtimeAndroidSrc); + File.WriteAllText(Path.Combine(OutputDir, "monodroid.c"), monodroidSrc); string cmakeGenArgs = $"-DCMAKE_TOOLCHAIN_FILE={androidToolchain} -DANDROID_ABI=\"{abi}\" -DANDROID_STL=none " + - $"-DANDROID_NATIVE_API_LEVEL={MinApiLevel} -B runtime-android"; + $"-DANDROID_NATIVE_API_LEVEL={MinApiLevel} -B monodroid"; - string cmakeBuildArgs = "--build runtime-android"; + string cmakeBuildArgs = "--build monodroid"; if (StripDebugSymbols) { @@ -192,7 +192,7 @@ public class ApkBuilder Utils.RunProcess(aapt, $"package -f -m -F {apkFile} -A assets -M AndroidManifest.xml -I {androidJar}", workingDir: OutputDir); var dynamicLibs = new List(); - dynamicLibs.Add(Path.Combine(OutputDir, "runtime-android", "libruntime-android.so")); + dynamicLibs.Add(Path.Combine(OutputDir, "monodroid", "libmonodroid.so")); dynamicLibs.AddRange(Directory.GetFiles(sourceDir, "*.so")); // add all *.so files to lib/%abi%/ @@ -202,7 +202,7 @@ public class ApkBuilder string dynamicLibName = Path.GetFileName(dynamicLib); if (dynamicLibName == "libmonosgen-2.0.so") { - // we link mono runtime statically into libruntime-android.so + // we link mono runtime statically into libmonodroid.so continue; } diff --git a/tools-local/tasks/mobile.tasks/AndroidAppBuilder/Templates/CMakeLists-android.txt b/tools-local/tasks/mobile.tasks/AndroidAppBuilder/Templates/CMakeLists-android.txt index 18727daa90605..48e1d080fcd5d 100644 --- a/tools-local/tasks/mobile.tasks/AndroidAppBuilder/Templates/CMakeLists-android.txt +++ b/tools-local/tasks/mobile.tasks/AndroidAppBuilder/Templates/CMakeLists-android.txt @@ -1,16 +1,16 @@ cmake_minimum_required(VERSION 3.10) -project(runtime-android) +project(monodroid) add_library( - runtime-android + monodroid SHARED - runtime-android.c) + monodroid.c) include_directories("%MonoInclude%") target_link_libraries( - runtime-android + monodroid %NativeLibrariesToLink% libz.so log diff --git a/tools-local/tasks/mobile.tasks/AndroidAppBuilder/Templates/MonoRunner.java b/tools-local/tasks/mobile.tasks/AndroidAppBuilder/Templates/MonoRunner.java index 6acedccf6ac2e..5fba2af187106 100644 --- a/tools-local/tasks/mobile.tasks/AndroidAppBuilder/Templates/MonoRunner.java +++ b/tools-local/tasks/mobile.tasks/AndroidAppBuilder/Templates/MonoRunner.java @@ -31,7 +31,7 @@ public class MonoRunner extends Instrumentation static MonoRunner inst; static { - System.loadLibrary("runtime-android"); + System.loadLibrary("monodroid"); } @Override diff --git a/tools-local/tasks/mobile.tasks/AndroidAppBuilder/Templates/runtime-android.c b/tools-local/tasks/mobile.tasks/AndroidAppBuilder/Templates/monodroid.c similarity index 100% rename from tools-local/tasks/mobile.tasks/AndroidAppBuilder/Templates/runtime-android.c rename to tools-local/tasks/mobile.tasks/AndroidAppBuilder/Templates/monodroid.c