Skip to content

Commit

Permalink
Merge branch 'main' into dev/grendel/blobs-in-lib
Browse files Browse the repository at this point in the history
* main:
  Bump to xamarin/Java.Interop/main@dfcbd670 (#8714)
  [monodroid] C++ tweaks and legacy code cleanup (#8638)
  Bump to xamarin/xamarin-android-tools/main@a698a33 (#8710)
  • Loading branch information
grendello committed Feb 9, 2024
2 parents f860251 + b812506 commit 153253e
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 11 deletions.
1 change: 1 addition & 0 deletions Configuration.props
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
<MonoSourceFullPath>$([System.IO.Path]::GetFullPath ('$(MonoSourceDirectory)'))</MonoSourceFullPath>
<SqliteSourceFullPath>$([System.IO.Path]::GetFullPath ('$(SqliteSourceDirectory)'))</SqliteSourceFullPath>
<OpenTKSourceFullPath>$([System.IO.Path]::GetFullPath ('$(OpenTKSourceDirectory)'))</OpenTKSourceFullPath>
<JavaInteropTargetFrameworkVersion>net8.0</JavaInteropTargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup>
<AdbToolPath Condition=" '$(AdbToolPath)' == '' ">$(AndroidSdkFullPath)\platform-tools\</AdbToolPath>
Expand Down
2 changes: 1 addition & 1 deletion build-tools/create-packs/Microsoft.Android.Ref.proj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ by projects that use the Microsoft.Android framework in .NET 6+.
</PropertyGroup>

<ItemGroup>
<_AndroidRefPackAssemblies Include="$(JavaInteropSourceDirectory)\bin\$(Configuration)-net7.0\ref\Java.Interop.dll" />
<_AndroidRefPackAssemblies Include="$(JavaInteropSourceDirectory)\bin\$(Configuration)-$(JavaInteropTargetFrameworkVersion)\ref\Java.Interop.dll" />
<_AndroidRefPackAssemblies Include="$(_MonoAndroidNETDefaultOutDir)ref\Mono.Android.dll" />
<_AndroidRefPackAssemblies Include="$(_MonoAndroidNETDefaultOutDir)ref\Mono.Android.Runtime.dll" />
<!-- Always include stable Mono.Android.Export.dll -->
Expand Down
2 changes: 1 addition & 1 deletion external/Java.Interop
2 changes: 1 addition & 1 deletion external/xamarin-android-tools
2 changes: 1 addition & 1 deletion src/Mono.Android/Mono.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@
SkipUnchangedFiles="true"
/>
<Copy
SourceFiles="$(OutputPath)ref\Mono.Android.dll;$(JavaInteropSourceDirectory)\bin\$(Configuration)-net7.0\ref\Java.Interop.dll"
SourceFiles="$(OutputPath)ref\Mono.Android.dll;$(JavaInteropSourceDirectory)\bin\$(Configuration)-$(JavaInteropTargetFrameworkVersion)\ref\Java.Interop.dll"
DestinationFolder="$(MicrosoftAndroidRefPackDir)"
SkipUnchangedFiles="true"
/>
Expand Down
3 changes: 1 addition & 2 deletions src/monodroid/jni/embedded-assemblies.hh
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,10 @@ namespace xamarin::android::internal {
static constexpr off_t ZIP_CENTRAL_LEN = 46;
static constexpr off_t ZIP_LOCAL_LEN = 30;

// TODO: fix
static constexpr std::string_view zip_path_separator { "/" };
static constexpr std::string_view apk_lib_dir_name { "lib" };
static constexpr size_t assemblies_prefix_size = calc_size(apk_lib_dir_name, zip_path_separator, SharedConstants::android_lib_abi, zip_path_separator);
static constexpr auto assemblies_prefix = concat_string_views<assemblies_prefix_size> (apk_lib_dir_name, zip_path_separator, SharedConstants::android_lib_abi, zip_path_separator);
static constexpr auto assemblies_prefix = concat_string_views<assemblies_prefix_size> (apk_lib_dir_name, zip_path_separator, SharedConstants::android_lib_abi, zip_path_separator);

// We have two records for each assembly, for names with and without the extension
static constexpr uint32_t assembly_store_index_entries_per_assembly = 2;
Expand Down
1 change: 1 addition & 0 deletions src/monodroid/jni/monodroid-glue.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <fcntl.h>
#include <pthread.h>
#include <strings.h>

#include <dlfcn.h>
#include <sys/mman.h>
#include <sys/stat.h>
Expand Down
5 changes: 0 additions & 5 deletions src/monodroid/jni/shared-constants.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,11 @@ namespace xamarin::android::internal
public:
// These three MUST be the same as like-named constants in src/Xamarin.Android.Build.Tasks/Utilities/MonoAndroidHelper.Basic.cs
static constexpr std::string_view MANGLED_ASSEMBLY_NAME_EXT { ".so" };
// static constexpr size_t MANGLED_ASSEMBLY_NAME_EXT_LEN = sizeof(MANGLED_ASSEMBLY_NAME_EXT) - 1;

static constexpr std::string_view MANGLED_ASSEMBLY_REGULAR_ASSEMBLY_MARKER { "lib_" };
static constexpr size_t REGULAR_ASSEMBLY_MARKER_INDEX = 3; // this ☝️
// static constexpr size_t REGULAR_ASSEMBLY_PREFIX_LEN = sizeof(SharedConstants::MANGLED_ASSEMBLY_REGULAR_ASSEMBLY_MARKER) - 1;
static constexpr char REGULAR_ASSEMBLY_MARKER_CHAR = MANGLED_ASSEMBLY_REGULAR_ASSEMBLY_MARKER[REGULAR_ASSEMBLY_MARKER_INDEX];

static constexpr std::string_view MANGLED_ASSEMBLY_SATELLITE_ASSEMBLY_MARKER { "lib-" };
static constexpr size_t SATELLITE_ASSEMBLY_MARKER_INDEX = 3; // this ☝️
// static constexpr size_t SATELLITE_ASSEMBLY_PREFIX_LEN = sizeof(SharedConstants::MANGLED_ASSEMBLY_SATELLITE_ASSEMBLY_MARKER) - 1;
static constexpr char SATELLITE_ASSEMBLY_MARKER_CHAR = MANGLED_ASSEMBLY_SATELLITE_ASSEMBLY_MARKER[SATELLITE_ASSEMBLY_MARKER_INDEX];

static constexpr std::string_view MONO_ANDROID_RUNTIME_ASSEMBLY_NAME { "Mono.Android.Runtime" };
Expand Down

0 comments on commit 153253e

Please sign in to comment.