diff --git a/src/native/clr/host/internal-pinvokes-clr.cc b/src/native/clr/host/internal-pinvokes-clr.cc
index 372196207a9..0f3fd5035af 100644
--- a/src/native/clr/host/internal-pinvokes-clr.cc
+++ b/src/native/clr/host/internal-pinvokes-clr.cc
@@ -66,11 +66,6 @@ void monodroid_timing_stop (managed_timing_sequence *sequence, const char *messa
timing->release_sequence (sequence);
}
-void _monodroid_weak_gref_delete (jobject handle, char type, const char *threadName, int threadId, const char *from, int from_writable)
-{
- OSBridge::_monodroid_weak_gref_delete (handle, type, threadName, threadId, from, from_writable);
-}
-
void* _monodroid_timezone_get_default_id ()
{
JNIEnv *env = OSBridge::ensure_jnienv ();
diff --git a/src/native/clr/host/internal-pinvokes-shared.cc b/src/native/clr/host/internal-pinvokes-shared.cc
index d8505c3e9d9..2df948d1297 100644
--- a/src/native/clr/host/internal-pinvokes-shared.cc
+++ b/src/native/clr/host/internal-pinvokes-shared.cc
@@ -29,6 +29,11 @@ void _monodroid_gref_log_delete (jobject handle, char type, const char *threadNa
OSBridge::_monodroid_gref_log_delete (handle, type, threadName, threadId, from, from_writable);
}
+void _monodroid_weak_gref_delete (jobject handle, char type, const char *threadName, int threadId, const char *from, int from_writable)
+{
+ OSBridge::_monodroid_weak_gref_delete (handle, type, threadName, threadId, from, from_writable);
+}
+
BridgeProcessingFtn clr_initialize_gc_bridge (
BridgeProcessingStartedFtn bridge_processing_started_callback,
BridgeProcessingFinishedFtn bridge_processing_finished_callback) noexcept
diff --git a/src/native/nativeaot/host/internal-pinvoke-stubs.cc b/src/native/nativeaot/host/internal-pinvoke-stubs.cc
index 8cea50867b2..8753b435d8f 100644
--- a/src/native/nativeaot/host/internal-pinvoke-stubs.cc
+++ b/src/native/nativeaot/host/internal-pinvoke-stubs.cc
@@ -5,9 +5,14 @@ using namespace xamarin::android;
namespace {
[[gnu::noreturn]]
- void pinvoke_unreachable ()
+ void pinvoke_unreachable (std::source_location sloc = std::source_location::current ())
{
- Helpers::abort_application (LOG_DEFAULT, "The method is not implemented. This is a stub and should not be called."sv);
+ Helpers::abort_application (
+ LOG_DEFAULT,
+ "The p/invoke is not implemented. This is a stub and should not be called."sv,
+ true, // log_location
+ sloc
+ );
}
}
@@ -51,17 +56,6 @@ void monodroid_timing_stop (
pinvoke_unreachable ();
}
-void _monodroid_weak_gref_delete (
- [[maybe_unused]] jobject handle,
- [[maybe_unused]] char type,
- [[maybe_unused]] const char *threadName,
- [[maybe_unused]] int threadId,
- [[maybe_unused]] const char *from,
- [[maybe_unused]] int from_writable)
-{
- pinvoke_unreachable ();
-}
-
void* _monodroid_timezone_get_default_id ()
{
pinvoke_unreachable ();
diff --git a/tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj b/tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj
index ed78d3366ed..c7feecdd9a0 100644
--- a/tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj
+++ b/tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj
@@ -22,8 +22,6 @@
IL2037
true
- $(DefineConstants);CORECLR
- $(DefineConstants);NATIVEAOT