Skip to content

Commit e7eba0a

Browse files
committed
Update for the recent main changes
1 parent cbad0d2 commit e7eba0a

File tree

7 files changed

+17
-18
lines changed

7 files changed

+17
-18
lines changed

src/monodroid/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ if(ANDROID)
511511
${LZ4_SOURCES}
512512
)
513513

514-
if(NOT DEBUG_BUILD AND ENABLE_NET6 AND ENABLE_MARSHAL_METHODS)
514+
if(NOT DEBUG_BUILD AND ENABLE_NET AND ENABLE_MARSHAL_METHODS)
515515
list(APPEND XAMARIN_MONODROID_SOURCES
516516
${SOURCES_DIR}/xamarin-android-app-context.cc
517517
)
@@ -588,7 +588,7 @@ else()
588588
list(APPEND MONOSGEN_LIB_LINK -lmonosgen-2.0)
589589
endif()
590590

591-
if(NOT (ANDROID AND ENABLE_NET6))
591+
if(NOT (ANDROID AND ENABLE_NET))
592592
add_library(
593593
${XAMARIN_INTERNAL_API_LIB}
594594
SHARED
@@ -618,7 +618,7 @@ target_link_options(
618618
)
619619

620620
if(ANDROID)
621-
if(NOT DEBUG_BUILD AND ENABLE_NET6 AND ENABLE_MARSHAL_METHODS)
621+
if(NOT DEBUG_BUILD AND ENABLE_NET AND ENABLE_MARSHAL_METHODS)
622622
# The marshaling lib is used only when building for devices
623623
add_library(
624624
${XAMARIN_APP_MARSHALING_LIB}
@@ -740,7 +740,7 @@ target_link_libraries(
740740
${LINK_LIBS} xamarin-app
741741
)
742742

743-
if((NOT DEBUG_BUILD) AND ANDROID AND ENABLE_NET6 AND ENABLE_MARSHAL_METHODS)
743+
if((NOT DEBUG_BUILD) AND ANDROID AND ENABLE_NET AND ENABLE_MARSHAL_METHODS)
744744
target_link_libraries(
745745
${XAMARIN_MONO_ANDROID_LIB}
746746
${XAMARIN_APP_MARSHALING_LIB}

src/monodroid/jni/application_dso_stub.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ DSOCacheEntry dso_cache[] = {
148148
//
149149
// Support for marshal methods
150150
//
151-
#if defined (RELEASE) && defined (ANDROID) && defined (NET6)
151+
#if defined (RELEASE) && defined (ANDROID) && defined (NET)
152152
MonoImage* assembly_image_cache[] = {
153153
nullptr,
154154
nullptr,
@@ -188,4 +188,4 @@ void xamarin_app_init ([[maybe_unused]] get_function_pointer_fn fn)
188188
{
189189
// Dummy
190190
}
191-
#endif // def RELEASE && def ANDROID && def NET6
191+
#endif // def RELEASE && def ANDROID && def NET

src/monodroid/jni/embedded-assemblies.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ namespace xamarin::android::internal {
5757
template<typename T>
5858
concept LoaderData = requires (T a) {
5959
requires std::same_as<T, bool>
60-
#if defined (NET6)
60+
#if defined (NET)
6161
|| std::same_as<T, MonoAssemblyLoadContextGCHandle>
6262
#endif
6363
;

src/monodroid/jni/mono-image-loader.hh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <cstddef>
77

88
#include <mono/metadata/image.h>
9-
#if defined (NET6)
9+
#if defined (NET)
1010
#include <mono/metadata/mono-private-unstable.h>
1111
#endif
1212
#include <mono/metadata/object.h>
@@ -17,7 +17,7 @@
1717
#include "search.hh"
1818
#include "strings.hh"
1919

20-
#if defined (RELEASE) && defined (ANDROID) && defined (NET6) && defined (ENABLE_MARSHAL_METHODS)
20+
#if defined (RELEASE) && defined (ANDROID) && defined (NET) && defined (ENABLE_MARSHAL_METHODS)
2121
#define USE_CACHE 1
2222
#endif
2323

@@ -52,7 +52,7 @@ namespace xamarin::android::internal {
5252
}
5353
#endif // def USE_CACHE
5454

55-
#if defined (NET6)
55+
#if defined (NET)
5656
force_inline static MonoImage* load (dynamic_local_string<SENSIBLE_PATH_MAX> const& name, MonoAssemblyLoadContextGCHandle alc_gchandle, hash_t name_hash, uint8_t *assembly_data, uint32_t assembly_data_size) noexcept
5757
{
5858
log_info (LOG_DEFAULT, "Loading assembly %s; hash 0x%zx", name.get (), name_hash);
@@ -74,7 +74,7 @@ namespace xamarin::android::internal {
7474

7575
return load (name, alc_gchandle, xxhash::hash (name.get (), name.length ()), assembly_data, assembly_data_size);
7676
}
77-
#endif
77+
#endif // def NET
7878

7979
force_inline static MonoImage* load (dynamic_local_string<SENSIBLE_PATH_MAX> const& name, bool ref_only, hash_t name_hash, uint8_t *assembly_data, uint32_t assembly_data_size) noexcept
8080
{
@@ -136,7 +136,7 @@ namespace xamarin::android::internal {
136136
// support for unloadable Assembly Load Contexts) and the actual write operation to the destination is
137137
// atomic
138138
assembly_image_cache[index] = image;
139-
#endif // def RELEASE && def ANDROID && def NET6
139+
#endif // def RELEASE && def ANDROID && def NET
140140
return image;
141141
}
142142

src/monodroid/jni/monodroid-glue-internal.hh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,7 @@ namespace xamarin::android::internal
351351
#if defined (RELEASE) && defined (ANDROID)
352352
static void* get_function_pointer (uint32_t mono_image_index, uint32_t class_token, uint32_t method_token) noexcept;
353353
#endif // def RELEASE && def ANDROID
354-
#endif // def NET6
355-
354+
#endif // def NET
356355

357356
#if defined (DEBUG)
358357
void set_debug_env_vars (void);

src/monodroid/jni/monodroid-glue.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -874,9 +874,9 @@ MonodroidRuntime::mono_runtime_init ([[maybe_unused]] dynamic_local_string<PROPE
874874
mono_install_assembly_preload_hook (open_from_update_dir, nullptr);
875875
#endif
876876

877-
#if defined (RELEASE) && defined (ANDROID) && defined (NET6) && ENABLE_MARSHAL_METHODS
877+
#if defined (RELEASE) && defined (ANDROID) && defined (NET) && ENABLE_MARSHAL_METHODS
878878
xamarin_app_init (get_function_pointer);
879-
#endif // def RELEASE && def ANDROID && def NET6
879+
#endif // def RELEASE && def ANDROID && def NET
880880
}
881881

882882
#if defined (NET)

src/monodroid/jni/xamarin-app.hh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ MONO_API MONO_API_EXPORT DSOCacheEntry dso_cache[];
262262
//
263263
// Support for marshal methods
264264
//
265-
#if defined (RELEASE) && defined (ANDROID) && defined (NET6)
265+
#if defined (RELEASE) && defined (ANDROID) && defined (NET)
266266
struct MarshalMethodsManagedClass
267267
{
268268
const uint32_t token;
@@ -293,6 +293,6 @@ MONO_API MONO_API_EXPORT MarshalMethodsManagedClass marshal_methods_class_cache[
293293
using get_function_pointer_fn = void*(*)(uint32_t mono_image_index, uint32_t class_token, uint32_t method_token);
294294

295295
MONO_API_EXPORT void xamarin_app_init (get_function_pointer_fn fn);
296-
#endif // def RELEASE && def ANDROID && def NET6
296+
#endif // def RELEASE && def ANDROID && def NET
297297

298298
#endif // __XAMARIN_ANDROID_TYPEMAP_H

0 commit comments

Comments
 (0)