Skip to content

Commit

Permalink
[Xamarin.Android.Build.Tasks] Switch to use $(Optimize) to control wh…
Browse files Browse the repository at this point in the history
…ich runtime is installed. (#528)

Context: https://bugzilla.xamarin.com/show_bug.cgi?id=53787
Context: https://bugzilla.xamarin.com/show_bug.cgi?id=53900

In mono 4.9 `$(DebugType)` Full|Portable|PdbOnly are all the same
thing, so we cannot reliably use those values to control which 
runtime is installed in the package.

Instead we should use `$(Optimize)` which is only used on Release
configurations (why Optimize a debug build!).

This commit switches over to using `$(Optimize)` to control the
debug/release runtime selection.
  • Loading branch information
dellis1972 authored and jonpryor committed Mar 24, 2017
1 parent 2df286b commit 1e0e083
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
<AndroidUseSharedRuntime Condition=" '$(AndroidUseSharedRuntime)' == ''">False</AndroidUseSharedRuntime>

<AndroidExplicitCrunch Condition=" '$(AndroidExplicitCrunch)' == '' ">False</AndroidExplicitCrunch>
<AndroidUseDebugRuntime Condition="'$(AndroidUseDebugRuntime)' == '' And '$(AndroidUseSharedRuntime)' == 'False' And '$(EmbedAssembliesIntoApk)' == 'True' And ('$(DebugSymbols)' != 'True' Or '$(DebugType)' != 'Full' Or '$(DebugType)' != 'Embedded')" >False</AndroidUseDebugRuntime>
<AndroidUseDebugRuntime Condition="'$(AndroidUseDebugRuntime)' == '' And '$(Optimize)' == 'True'" >False</AndroidUseDebugRuntime>
<AndroidUseDebugRuntime Condition="'$(AndroidUseDebugRuntime)' == ''" >True</AndroidUseDebugRuntime>

<MonoSymbolArchive Condition=" '$(MonoSymbolArchive)' == '' And '$(AndroidUseSharedRuntime)' == 'False' And '$(EmbedAssembliesIntoApk)' == 'True' And '$(DebugSymbols)' == 'True' And ('$(DebugType)' == 'PdbOnly' Or '$(DebugType)' == 'Portable')" >True</MonoSymbolArchive>
<MonoSymbolArchive Condition=" '$(MonoSymbolArchive)' == '' And '$(AndroidUseSharedRuntime)' == 'False' And '$(EmbedAssembliesIntoApk)' == 'True' And '$(DebugSymbols)' == 'True' And '$(Optimize)' == 'True'" >True</MonoSymbolArchive>
<MonoSymbolArchive Condition=" '$(MonoSymbolArchive)' == '' ">False</MonoSymbolArchive>

<BundleAssemblies Condition="'$(BundleAssemblies)' == ''">False</BundleAssemblies>
Expand Down Expand Up @@ -263,7 +263,7 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
</PropertyGroup>

<Choose>
<When Condition=" '$(DebugSymbols)' != '' And $(DebugSymbols) And '$(DebugType)' != '' And ('$(DebugType)' == 'Full' Or '$(DebugType)' == 'Embedded') ">
<When Condition=" '$(DebugSymbols)' != '' And $(DebugSymbols) And '$(DebugType)' != '' And '$(Optimize)' == 'False' ">
<PropertyGroup>
<AndroidIncludeDebugSymbols>True</AndroidIncludeDebugSymbols>
</PropertyGroup>
Expand Down

0 comments on commit 1e0e083

Please sign in to comment.