Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build-tools/scripts/Ndk.projitems.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<ApiLevelNET>$(AndroidNdkApiLevel_Arm)</ApiLevelNET>
<AndroidRID>android-arm</AndroidRID>
<SupportMonoVM>True</SupportMonoVM>
<SupportCoreCLR>False</SupportCoreCLR>
<SupportCoreCLR>True</SupportCoreCLR>
<SupportNativeAOT>False</SupportNativeAOT>
</AndroidSupportedTargetJitAbi>

Expand Down
1 change: 1 addition & 0 deletions build-tools/scripts/xa_build_configuration.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ set(NETCORE_APP_RUNTIME_DIR_ARM64 "@NETCORE_APP_RUNTIME_ANDROID_ARM64@")
set(NETCORE_APP_RUNTIME_DIR_X86 "@NETCORE_APP_RUNTIME_ANDROID_X86@")
set(NETCORE_APP_RUNTIME_DIR_X86_64 "@NETCORE_APP_RUNTIME_ANDROID_X86_64@")

set(CORECLR_APP_RUNTIME_DIR_ARM "@CORECLR_APP_RUNTIME_ANDROID_ARM@")
set(CORECLR_APP_RUNTIME_DIR_ARM64 "@CORECLR_APP_RUNTIME_ANDROID_ARM64@")
set(CORECLR_APP_RUNTIME_DIR_X86_64 "@CORECLR_APP_RUNTIME_ANDROID_X86_64@")
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ GeneratedFile Get_Cmake_XA_Build_Configuration (Context context)
{ "@NETCORE_APP_RUNTIME_ANDROID_X86@", Utilities.EscapePathSeparators (Configurables.Paths.NetcoreAppRuntimeAndroidX86) },
{ "@NETCORE_APP_RUNTIME_ANDROID_X86_64@", Utilities.EscapePathSeparators (Configurables.Paths.NetcoreAppRuntimeAndroidX86_64) },

{ "@CORECLR_APP_RUNTIME_ANDROID_ARM@", Utilities.EscapePathSeparators (Configurables.Paths.CoreClrAppRuntimeAndroidARM) },
{ "@CORECLR_APP_RUNTIME_ANDROID_ARM64@", Utilities.EscapePathSeparators (Configurables.Paths.CoreClrAppRuntimeAndroidARM64) },
{ "@CORECLR_APP_RUNTIME_ANDROID_X86_64@", Utilities.EscapePathSeparators (Configurables.Paths.CoreClrAppRuntimeAndroidX86_64) },
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"Microsoft.Android.Runtime.Mono.37.android-arm64",
"Microsoft.Android.Runtime.Mono.37.android-x86",
"Microsoft.Android.Runtime.Mono.37.android-x64",
"Microsoft.Android.Runtime.CoreCLR.37.android-arm",
"Microsoft.Android.Runtime.CoreCLR.37.android-arm64",
"Microsoft.Android.Runtime.CoreCLR.37.android-x64",
"Microsoft.Android.Runtime.NativeAOT.37.android-arm64",
Expand Down Expand Up @@ -78,6 +79,10 @@
"kind": "framework",
"version": "@WORKLOAD_VERSION@"
},
"Microsoft.Android.Runtime.CoreCLR.37.android-arm": {
"kind": "framework",
"version": "@WORKLOAD_VERSION@"
},
"Microsoft.Android.Runtime.CoreCLR.37.android-arm64": {
"kind": "framework",
"version": "@WORKLOAD_VERSION@"
Expand Down
2 changes: 2 additions & 0 deletions src/native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,11 @@ if(IS_CLR_RUNTIME)
set(LOCAL_CORECLR_CONFIG Release)
endif()

set(RUNTIME_DIR_ARM "${LOCAL_CORECLR_PATH}/${CLR_PACKAGE_NAME_STEM}-arm/${LOCAL_CORECLR_CONFIG}/runtimes/android-arm")
set(RUNTIME_DIR_ARM64 "${LOCAL_CORECLR_PATH}/${CLR_PACKAGE_NAME_STEM}-arm64/${LOCAL_CORECLR_CONFIG}/runtimes/android-arm64")
set(RUNTIME_DIR_X86_64 "${LOCAL_CORECLR_PATH}/${CLR_PACKAGE_NAME_STEM}-x64/${LOCAL_CORECLR_CONFIG}/runtimes/android-x64")
else()
set(RUNTIME_DIR_ARM "${CORECLR_APP_RUNTIME_DIR_ARM}")
set(RUNTIME_DIR_ARM64 "${CORECLR_APP_RUNTIME_DIR_ARM64}")
set(RUNTIME_DIR_X86_64 "${CORECLR_APP_RUNTIME_DIR_X86_64}")
endif()
Expand Down
10 changes: 10 additions & 0 deletions src/native/CMakePresets.json.in
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,21 @@
"inherits": ["default-common", "common-debug", "common-armeabi-v7a"]
},

{
"name": "coreclr-default-debug-armeabi-v7a",
"inherits": ["default-common", "common-debug", "common-armeabi-v7a"]
},

{
"name": "default-release-armeabi-v7a",
"inherits": ["default-common", "common-release", "common-armeabi-v7a"]
},

{
"name": "coreclr-default-release-armeabi-v7a",
"inherits": ["default-common", "common-release", "common-armeabi-v7a"]
},

{
"name": "analyzers-debug-armeabi-v7a",
"hidden": true,
Expand Down
2 changes: 1 addition & 1 deletion src/native/clr/host/typemap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ auto TypeMapper::managed_to_java_debug (const char *typeName, const uint8_t *mvi
dynamic_local_path_string full_type_name;
full_type_name.append (typeName);

hash_t mvid_hash = xxhash::hash (mvid, 16z); // we must hope managed land called us with valid data
hash_t mvid_hash = xxhash::hash (reinterpret_cast<const char*>(mvid), 16z); // we must hope managed land called us with valid data

auto equal = [](TypeMapAssembly const& entry, hash_t key) -> bool { return entry.mvid_hash == key; };
auto less_than = [](TypeMapAssembly const& entry, hash_t key) -> bool { return entry.mvid_hash < key; };
Expand Down
4 changes: 3 additions & 1 deletion src/native/native-clr.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
<OutputType>Exe</OutputType>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>

<!-- HACK HACK: until CoreCLR exists for all the targets, work only with arm64 -->
<!-- HACK HACK: until the android-arm CoreCLR runtime pack ships (dotnet/runtime#127225), -->
<!-- exclude armeabi-v7a from the native CoreCLR build so the linker doesn't fail on -lcoreclr. -->
<!-- The rest of the arm32 wiring (workload manifest, Ndk.projitems, CMake presets) is kept. -->
<AndroidSupportedTargetAotAbis>arm64:x86_64</AndroidSupportedTargetAotAbis>
<AndroidSupportedTargetJitAbis>arm64-v8a:x86_64</AndroidSupportedTargetJitAbis>
</PropertyGroup>
Expand Down