Skip to content

Commit f76aa3b

Browse files
committed
Don't enable runtime linking in debug builds
It seems `$(AndroidIncludeDebugSymbols)` isn't defined yet by the time `src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.DefaultProperties.targets` is evaluated, so we need to move `$(_AndroidEnableNativeRuntimeLinking)` to src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets in order to disable linking in Debug builds.
1 parent c57dc43 commit f76aa3b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.DefaultProperties.targets

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@
5252
When changing this default, change the value of `DefaultZipAlignment` in `src/Xamarin.Android.Build.Tasks/Tasks/AndroidZipAlign.cs` as well
5353
-->
5454
<AndroidZipAlignment Condition=" '$(AndroidZipAlignment)' == '' ">16</AndroidZipAlignment>
55-
56-
<!-- Native runtime -->
57-
<_AndroidEnableNativeRuntimeLinking Condition=" '$(_AndroidEnableNativeRuntimeLinking)' == '' and '$(AndroidIncludeDebugSymbols)' != 'true' ">true</_AndroidEnableNativeRuntimeLinking>
5855
</PropertyGroup>
5956

6057
<!-- User-facing configuration-specific defaults -->

src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,9 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
327327
<AndroidEnableMarshalMethods Condition=" '$(AndroidEnableMarshalMethods)' == '' ">False</AndroidEnableMarshalMethods>
328328
<_AndroidUseMarshalMethods Condition=" '$(AndroidIncludeDebugSymbols)' == 'True' ">False</_AndroidUseMarshalMethods>
329329
<_AndroidUseMarshalMethods Condition=" '$(AndroidIncludeDebugSymbols)' != 'True' ">$(AndroidEnableMarshalMethods)</_AndroidUseMarshalMethods>
330+
331+
<!-- Native runtime linking during app build -->
332+
<_AndroidEnableNativeRuntimeLinking Condition=" '$(_AndroidEnableNativeRuntimeLinking)' == '' and '$(AndroidIncludeDebugSymbols)' != 'true' ">true</_AndroidEnableNativeRuntimeLinking>
330333
</PropertyGroup>
331334

332335
<!-- Do not resolve from the GAC under any circumstances in Mobile -->

0 commit comments

Comments
 (0)