Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatelyn Gadd <kg@luminance.org>2018-08-09 03:52:37 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2018-08-09 03:52:37 +0300
commit14d20074ffb298cc396916328897eac7f5f8c077 (patch)
tree62244a3aa5ae6c678b4ce0fa69b438c5fb8f6ccd /mcs/class/Mono.Security
parentbd50f070bd693f64b2ceede91f9470ba0deb0aa1 (diff)
Move to generating msbuild choose elements to get if-else selection behavior for sources in projects so that we don't get erroneous duplicate files in cases where there are both profile and host platform criteria (#9952)
A recent commit revealed that in cases where we select based on a mix of host platform and profile, genproj csproj files can end up with duplicate sources because the existing <ItemGroup Condition= approach could make multiple groups match for a given compile when we really just want one. This PR changes to generating a cascade of msbuild <Choose> elements, which give if-else selection to ensure that we only ever build a single set of files.
Diffstat (limited to 'mcs/class/Mono.Security')
-rw-r--r--mcs/class/Mono.Security/Mono.Security.csproj67
1 files changed, 47 insertions, 20 deletions
diff --git a/mcs/class/Mono.Security/Mono.Security.csproj b/mcs/class/Mono.Security/Mono.Security.csproj
index 81df4b9ba8f..ce1fc53605e 100644
--- a/mcs/class/Mono.Security/Mono.Security.csproj
+++ b/mcs/class/Mono.Security/Mono.Security.csproj
@@ -135,6 +135,7 @@
<Compile Include="..\corlib\CommonCrypto\MD4Managed.g.cs" />
</ItemGroup>
<!-- @BUILT_SOURCES@ -->
+ <!--Common files-->
<ItemGroup>
<Compile Include="..\..\build\common\AssemblyRef.cs" />
<Compile Include="..\..\build\common\Consts.cs" />
@@ -288,33 +289,59 @@
<Compile Include="Mono.Security\StrongName.cs" />
<Compile Include="Mono.Xml\MiniParser.cs" />
<Compile Include="Mono.Xml\SecurityParser.cs" />
+ <!--Genconsts dependency because this project includes Consts.cs-->
<ProjectReference Include="$(SolutionDir)\msvc\scripts\genconsts.csproj">
<Name>genconsts</Name>
<Project>{702AE2C0-71DD-4112-9A06-E4FABCA59986}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
- <Private>False</Private>
+ <Private>false</Private>
</ProjectReference>
</ItemGroup>
- <ItemGroup Condition=" '$(Platform)' == 'monodroid' "></ItemGroup>
- <ItemGroup Condition=" '$(Platform)' == 'monotouch' ">
- <Compile Include="..\corlib\CommonCrypto\CommonCrypto.cs" />
- <Compile Include="..\corlib\CommonCrypto\RC4CommonCrypto.cs" />
- </ItemGroup>
- <ItemGroup Condition=" '$(Platform)' == 'monotouch_tv' ">
- <Compile Include="..\corlib\CommonCrypto\CommonCrypto.cs" />
- <Compile Include="..\corlib\CommonCrypto\RC4CommonCrypto.cs" />
- </ItemGroup>
- <ItemGroup Condition=" '$(Platform)' == 'monotouch_watch' "></ItemGroup>
- <ItemGroup Condition=" '$(Platform)' == 'net_4_x' "></ItemGroup>
- <ItemGroup Condition=" '$(Platform)' == 'orbis' "></ItemGroup>
- <ItemGroup Condition=" '$(Platform)' == 'unreal' "></ItemGroup>
- <ItemGroup Condition=" '$(Platform)' == 'wasm' "></ItemGroup>
- <ItemGroup Condition=" '$(Platform)' == 'winaot' "></ItemGroup>
- <ItemGroup Condition=" '$(Platform)' == 'xammac' ">
- <Compile Include="..\corlib\CommonCrypto\CommonCrypto.cs" />
- <Compile Include="..\corlib\CommonCrypto\RC4CommonCrypto.cs" />
- </ItemGroup>
+ <!--End of common files-->
+ <!--Per-profile files-->
+ <Choose>
+ <When Condition="'$(Platform)' == 'xammac'">
+ <ItemGroup>
+ <Compile Include="..\corlib\CommonCrypto\CommonCrypto.cs" />
+ <Compile Include="..\corlib\CommonCrypto\RC4CommonCrypto.cs" />
+ </ItemGroup>
+ </When>
+ <When Condition="'$(Platform)' == 'winaot'">
+ <ItemGroup />
+ </When>
+ <When Condition="'$(Platform)' == 'wasm'">
+ <ItemGroup />
+ </When>
+ <When Condition="'$(Platform)' == 'unreal'">
+ <ItemGroup />
+ </When>
+ <When Condition="'$(Platform)' == 'orbis'">
+ <ItemGroup />
+ </When>
+ <When Condition="'$(Platform)' == 'net_4_x'">
+ <ItemGroup />
+ </When>
+ <When Condition="'$(Platform)' == 'monotouch_watch'">
+ <ItemGroup />
+ </When>
+ <When Condition="'$(Platform)' == 'monotouch_tv'">
+ <ItemGroup>
+ <Compile Include="..\corlib\CommonCrypto\CommonCrypto.cs" />
+ <Compile Include="..\corlib\CommonCrypto\RC4CommonCrypto.cs" />
+ </ItemGroup>
+ </When>
+ <When Condition="'$(Platform)' == 'monotouch'">
+ <ItemGroup>
+ <Compile Include="..\corlib\CommonCrypto\CommonCrypto.cs" />
+ <Compile Include="..\corlib\CommonCrypto\RC4CommonCrypto.cs" />
+ </ItemGroup>
+ </When>
+ <When Condition="'$(Platform)' == 'monodroid'">
+ <ItemGroup />
+ </When>
+ </Choose>
+ <!--End of per-profile files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../corlib/corlib.csproj" />