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
2 changes: 0 additions & 2 deletions build-tools/create-packs/Microsoft.Android.Runtime.proj
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ projects that use the Microsoft.Android.Runtimes framework in .NET 6+.
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libnet-android.debug.so') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libnet-android.debug.so" />
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libnet-android.release-static-release.a') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libnet-android.release-static-release.a" />
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libnet-android.release.so') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libnet-android.release.so" />
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libpinvoke-override-dynamic-debug.a') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libpinvoke-override-dynamic-debug.a" />
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libpinvoke-override-dynamic-release.a') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libpinvoke-override-dynamic-release.a" />
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libruntime-base-debug.a') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libruntime-base-debug.a" />
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libruntime-base-release.a') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libruntime-base-release.a" />
<NativeRuntimeAsset Condition=" Exists('$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libruntime-base-common-debug.a') " Include="$(NativeRuntimeOutputRootDir)$(_RuntimeFlavorDirName)\$(AndroidRID)\libruntime-base-common-debug.a" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ public NativeRuntimeComponents (ITaskItem[]? monoComponents)

// .NET for Android
new AndroidArchive ("libnet-android.release-static-release.a", wholeArchive: true),
new AndroidArchive ("libpinvoke-override-dynamic-release.a", wholeArchive: true),
new AndroidArchive ("libruntime-base-common-release.a"),
new AndroidArchive ("libruntime-base-release.a"),
new AndroidArchive ("libxa-java-interop-release.a"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,6 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.

<_AndroidUseManagedMarshalMethodsLookup Condition=" '$(_AndroidUseManagedMarshalMethodsLookup)' == '' and '$(_AndroidUseMarshalMethods)' == 'True' and '$(_AndroidRuntime)' != 'MonoVM' ">True</_AndroidUseManagedMarshalMethodsLookup>
<_AndroidUseManagedMarshalMethodsLookup Condition=" '$(_AndroidUseManagedMarshalMethodsLookup)' == '' ">False</_AndroidUseManagedMarshalMethodsLookup>

<!-- Native runtime linking during app build -->
<_AndroidEnableNativeRuntimeLinking Condition=" '$(_AndroidRuntime)' != 'CoreCLR' ">false</_AndroidEnableNativeRuntimeLinking>
<_AndroidEnableNativeRuntimeLinking Condition=" '$(AndroidIncludeDebugSymbols)' == 'true' And '$(_AndroidRuntime)' == 'CoreCLR' ">false</_AndroidEnableNativeRuntimeLinking>
</PropertyGroup>

<!-- Do not resolve from the GAC under any circumstances in Mobile -->
Expand Down
9 changes: 0 additions & 9 deletions src/native/clr/pinvoke-override/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
set(LIB_NAME_PRECOMPILED pinvoke-override-precompiled)
set(LIB_ALIAS_PRECOMPILED xa::pinvoke-override-precompiled)

set(LIB_NAME_DYNAMIC pinvoke-override-dynamic)
set(LIB_ALIAS_DYNAMIC xa::pinvoke-override-dynamic)

set(XA_PINVOKE_OVERRIDE_PRECOMPILED_SOURCES
precompiled.cc
)
add_clang_check_sources("${XA_PINVOKE_OVERRIDE_PRECOMPILED_SOURCES}")

set(XA_PINVOKE_OVERRIDE_DYNAMIC_SOURCES
dynamic.cc
)
add_clang_check_sources("${XA_PINVOKE_OVERRIDE_DYNAMIC_SOURCES}")

list(APPEND POTENTIAL_LOCAL_COMPILER_ARGS
-ffunction-sections
-fdata-sections
Expand Down Expand Up @@ -77,7 +69,6 @@ macro(create_library _libname _alias _sources)
endmacro()

create_library(${LIB_NAME_PRECOMPILED} ${LIB_ALIAS_PRECOMPILED} ${XA_PINVOKE_OVERRIDE_PRECOMPILED_SOURCES})
create_library(${LIB_NAME_DYNAMIC} ${LIB_ALIAS_DYNAMIC} ${XA_PINVOKE_OVERRIDE_DYNAMIC_SOURCES})

target_compile_definitions(
${LIB_NAME_PRECOMPILED}
Expand Down
103 changes: 0 additions & 103 deletions src/native/clr/pinvoke-override/dynamic.cc

This file was deleted.

4 changes: 0 additions & 4 deletions src/native/clr/pinvoke-override/precompiled.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ auto PinvokeOverride::monodroid_pinvoke_override (const char *library_name, cons
// Measurements on a physical device showed the table provides no measurable startup benefit, so
// we return `nullptr` for these libraries and let CoreCLR's own resolver handle them, removing
// the whole class of drift bugs.
//
// NOTE: this only affects the precompiled override used by the default separate-`.so` layout.
// The unified-DSO layout uses the generated `find_pinvoke` table in `dynamic.cc`, where these
// symbols are hidden inside a single DSO and therefore must still be resolved by the override.
if (library_name_hash == system_native_library_hash ||
library_name_hash == system_security_cryptography_native_android_library_hash ||
library_name_hash == system_io_compression_native_library_hash ||
Expand Down
Loading