Skip to content
Merged
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
1 change: 1 addition & 0 deletions build-tools/create-packs/Microsoft.Android.Runtime.proj
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ projects that use the Microsoft.Android framework in .NET 5.
<ItemGroup>
<_AndroidRuntimePackAssets Include="$(XamarinAndroidSourcePath)bin\$(Configuration)\lib\xamarin.android\xbuild\Xamarin\Android\lib\$(AndroidABI)\libmono-android.debug.so" />
<_AndroidRuntimePackAssets Include="$(XamarinAndroidSourcePath)bin\$(Configuration)\lib\xamarin.android\xbuild\Xamarin\Android\lib\$(AndroidABI)\libmono-android.release.so" />
<_AndroidRuntimePackAssets Include="$(XamarinAndroidSourcePath)bin\$(Configuration)\lib\xamarin.android\xbuild\Xamarin\Android\lib\$(AndroidABI)\libxa-internal-api.so" />
<_AndroidRuntimePackAssets Include="$(XamarinAndroidSourcePath)bin\$(Configuration)\lib\xamarin.android\xbuild\Xamarin\Android\lib\$(AndroidABI)\libsqlite3_xamarin.so" />
<_AndroidRuntimePackAssets Include="$(XamarinAndroidSourcePath)bin\$(Configuration)\lib\xamarin.android\xbuild\Xamarin\Android\lib\$(AndroidABI)\libxamarin-debug-app-helper.so" />
<FrameworkListFileClass Include="@(_AndroidRuntimePackAssets->'%(Filename)%(Extension)')" Profile="Android" />
Expand Down
3 changes: 3 additions & 0 deletions build-tools/installers/create-installers.targets
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@
<_MSBuildFiles Include="$(MSBuildSrcDir)\LayoutBinding.cs" />
<_MSBuildFiles Include="@(AndroidSupportedTargetJitAbi->'$(MSBuildSrcDir)\lib\%(Identity)\libmono-android.debug.so')" Condition=" '$(PackageId)' != 'Microsoft.Android.Sdk' " />
<_MSBuildFiles Include="@(AndroidSupportedTargetJitAbi->'$(MSBuildSrcDir)\lib\%(Identity)\libmono-android.release.so')" Condition=" '$(PackageId)' != 'Microsoft.Android.Sdk' " />
<_MSBuildFiles Include="@(AndroidSupportedTargetJitAbi->'$(MSBuildSrcDir)\lib\%(Identity)\libxa-internal-api.so')" Condition=" '$(PackageId)' != 'Microsoft.Android.Sdk' " />
<_MSBuildFiles Include="@(AndroidSupportedTargetJitAbi->'$(MSBuildSrcDir)\lib\%(Identity)\libmono-btls-shared.so')" Condition=" '$(PackageId)' != 'Microsoft.Android.Sdk' " />
<_MSBuildFiles Include="@(AndroidSupportedTargetJitAbi->'$(MSBuildSrcDir)\lib\%(Identity)\libmono-profiler-aot.so')" Condition=" '$(PackageId)' != 'Microsoft.Android.Sdk' " />
<_MSBuildFiles Include="@(AndroidSupportedTargetJitAbi->'$(MSBuildSrcDir)\lib\%(Identity)\libmono-profiler-log.so')" Condition=" '$(PackageId)' != 'Microsoft.Android.Sdk' " />
Expand Down Expand Up @@ -294,6 +295,7 @@
<_MSBuildLibHostFilesWin Include="$(MSBuildSrcDir)\lib\host-mxe-Win64\libMonoPosixHelper.dll" />
<_MSBuildLibHostFilesWin Include="$(MSBuildSrcDir)\lib\host-mxe-Win64\libmonosgen-2.0.dll" />
<_MSBuildLibHostFilesWin Include="$(MSBuildSrcDir)\lib\host-mxe-Win64\libxamarin-app.dll" Condition=" '$(HostOS)' != 'Windows' " />
<_MSBuildLibHostFilesWin Include="$(MSBuildSrcDir)\lib\host-mxe-Win64\libxa-internal-api.dll" Condition=" '$(HostOS)' != 'Windows' " />
</ItemGroup>
<ItemDefinitionGroup>
<_MSBuildFilesUnixSign>
Expand Down Expand Up @@ -333,6 +335,7 @@
<_MSBuildFilesUnixSign Include="$(MSBuildSrcDir)\lib\host-$(HostOS)\libMonoPosixHelper.$(LibExtension)" Condition=" '$(PackageId)' != 'Microsoft.Android.Sdk' " />
<_MSBuildFilesUnixSign Include="$(MSBuildSrcDir)\lib\host-$(HostOS)\libmonosgen-2.0.$(LibExtension)" Condition=" '$(PackageId)' != 'Microsoft.Android.Sdk' " />
<_MSBuildFilesUnixSign Include="$(MSBuildSrcDir)\lib\host-$(HostOS)\libxamarin-app.$(LibExtension)" Condition=" '$(PackageId)' != 'Microsoft.Android.Sdk' " />
<_MSBuildFilesUnixSign Include="$(MSBuildSrcDir)\lib\host-$(HostOS)\libxa-internal-api.$(LibExtension)" Condition=" '$(PackageId)' != 'Microsoft.Android.Sdk' " />
<_MSBuildFilesUnixSign Include="$(MSBuildSrcDir)\libzip.$(LibExtension)" />
<_MSBuildFilesUnix Include="$(MSBuildSrcDir)\proguard\bin\proguard.sh" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/HelloWorld/Properties/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.xamarin.android.helloworld">
<uses-sdk android:minSdkVersion="21" />
<application android:allowBackup="true" android:icon="@mipmap/icon" android:label="@string/app_name">
<application android:allowBackup="true" android:icon="@mipmap/icon" android:label="@string/app_name" android:extractNativeLibs="false">
</application>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -1890,6 +1890,7 @@ because xbuild doesn't support framework reference assemblies.
<_AndroidNativeLibraryForFastDev Condition=" '$(_InstantRunEnabled)' == 'True' And '$(AndroidUseDebugRuntime)' == 'True' " Include="%(_TargetLibDir.Identity)\libxamarin-debug-app-helper.so" />
<FrameworkNativeLibrary Include="%(_TargetLibDir.Identity)\libmono-android.debug.so" Condition=" '$(AndroidIncludeDebugSymbols)' == 'True' " ArchiveFileName="libmonodroid.so" />
<FrameworkNativeLibrary Include="%(_TargetLibDir.Identity)\libmono-android.release.so" Condition=" '$(AndroidIncludeDebugSymbols)' != 'True' " ArchiveFileName="libmonodroid.so" />
<FrameworkNativeLibrary Include="%(_TargetLibInterpreterDir.Identity)\libxa-internal-api.so" />
<FrameworkNativeLibrary Include="%(_TargetLibInterpreterDir.Identity)\libmono-btls-shared.so" />
<FrameworkNativeLibrary Include="%(_TargetLibInterpreterDir.Identity)\libmono-profiler-aot.so" Condition=" @(_EmbedProfilers->Count()) > 0 and (@(_EmbedProfilers->AnyHaveMetadataValue('Identity', 'aot')) or @(_EmbedProfilers->AnyHaveMetadataValue('Identity', 'all'))) " />
<FrameworkNativeLibrary Include="%(_TargetLibInterpreterDir.Identity)\libmono-profiler-log.so" Condition=" '$(AndroidIncludeDebugSymbols)' == 'True' or (@(_EmbedProfilers->Count()) > 0 and (@(_EmbedProfilers->AnyHaveMetadataValue('Identity', 'log')) or @(_EmbedProfilers->AnyHaveMetadataValue('Identity', 'all')))) " />
Expand Down
20 changes: 18 additions & 2 deletions src/monodroid/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ else()
endif()
endif()

string(STRIP "${EXTRA_LINKER_FLAGS}" EXTRA_LINKER_FLAGS)

if (ENABLE_TIMING)
add_definitions("-DMONODROID_TIMING=1")
endif()
Expand Down Expand Up @@ -285,11 +287,10 @@ set(MONODROID_SOURCES
${SOURCES_DIR}/debug-constants.cc
${SOURCES_DIR}/embedded-assemblies.cc
${SOURCES_DIR}/embedded-assemblies-zip.cc
${SOURCES_DIR}/external-api.cc
${SOURCES_DIR}/globals.cc
${SOURCES_DIR}/jni.c
${SOURCES_DIR}/logger.cc
${SOURCES_DIR}/monodroid-glue.cc
${SOURCES_DIR}/xa-internal-api.cc
${SOURCES_DIR}/osbridge.cc
${SOURCES_DIR}/shared-constants.cc
${SOURCES_DIR}/timezones.cc
Expand All @@ -299,6 +300,12 @@ set(MONODROID_SOURCES
${JAVA_INTEROP_SRC_PATH}/java-interop-util.cc
)

set(XA_INTERNAL_API_SOURCES
${SOURCES_DIR}/jni.c
${SOURCES_DIR}/internal-pinvoke-api.cc
${JAVA_INTEROP_SRC_PATH}/java-interop-util.cc
)

if(ENABLE_NDK)
set(MONODROID_SOURCES
${MONODROID_SOURCES}
Expand All @@ -314,6 +321,15 @@ if(UNIX)
)
endif()

add_library(xa-internal-api SHARED ${XA_INTERNAL_API_SOURCES})
target_link_libraries(xa-internal-api ${EXTRA_LINKER_FLAGS})
set_target_properties(
xa-internal-api
PROPERTIES
COMPILE_FLAGS -fvisibility=default
LINK_FLAGS -fvisibility=default
)

set(XAMARIN_APP_STUB_SOURCES ${SOURCES_DIR}/application_dso_stub.cc)
add_library(xamarin-app SHARED ${XAMARIN_APP_STUB_SOURCES})
if (ENABLE_NDK)
Expand Down
2 changes: 1 addition & 1 deletion src/monodroid/jni/cpu-arch-detect.cc
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ get_running_on_cpu (unsigned short *running_on_cpu)
*running_on_cpu = CPU_KIND_UNKNOWN;
}

MONO_API void
void
_monodroid_detect_cpu_and_architecture (unsigned short *built_for_cpu, unsigned short *running_on_cpu, unsigned char *is64bit)
{
assert (built_for_cpu);
Expand Down
2 changes: 1 addition & 1 deletion src/monodroid/jni/embedded-assemblies.cc
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ EmbeddedAssemblies::md_mmap_apk_file (int fd, uint32_t offset, uint32_t size, co
md_mmap_info file_info;
md_mmap_info mmap_info;

size_t pageSize = static_cast<size_t>(monodroid_getpagesize());
size_t pageSize = static_cast<size_t>(utils.monodroid_getpagesize ());
uint32_t offsetFromPage = static_cast<uint32_t>(offset % pageSize);
uint32_t offsetPage = offset - offsetFromPage;
uint32_t offsetSize = size + offsetFromPage;
Expand Down
Loading