1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-09 09:34:49 +09:00

Mdhwang/reduce mobile checks (#35105)

* [eng] Add TargetsMobile Property to Subsets.props

* Replace TargetOS mobile conditions with TargetsMobile Property

* [libraries] Remove leftover condition`

Co-authored-by: Mitchell Hwang <mihw@microsoft.com>
This commit is contained in:
Mitchell Hwang 2020-04-22 17:00:47 -04:00 committed by GitHub
parent 6dfab97cf0
commit 5179706b74
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 16 additions and 17 deletions

View file

@ -48,6 +48,10 @@
<LibrariesTargetOS Condition="'$(LibrariesTargetOS)' == ''">$(TargetOS)</LibrariesTargetOS>
</PropertyGroup>
<PropertyGroup>
<TargetsMobile Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'tvOS'">true</TargetsMobile>
</PropertyGroup>
<!--Feature switches -->
<PropertyGroup>
<EnableNgenOptimization Condition="'$(EnableNgenOptimization)' == '' and '$(Configuration)' == 'Release'">true</EnableNgenOptimization>

View file

@ -38,7 +38,7 @@
<PropertyGroup>
<DefaultSubsets>clr+mono+libs+installer</DefaultSubsets>
<DefaultSubsets Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'tvOS'">mono+libs+installer</DefaultSubsets>
<DefaultSubsets Condition="'$(TargetsMobile)' == 'true'">mono+libs+installer</DefaultSubsets>
<DefaultSubsets Condition="'$(TargetOS)' == 'WebAssembly'">mono+libs</DefaultSubsets>
</PropertyGroup>
@ -49,7 +49,7 @@
</PropertyGroup>
<PropertyGroup>
<RuntimeFlavor Condition="'$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'WebAssembly'">Mono</RuntimeFlavor>
<RuntimeFlavor Condition="'$(TargetsMobile)' == 'true' or '$(TargetOS)' == 'WebAssembly'">Mono</RuntimeFlavor>
<RuntimeFlavor Condition="'$(RuntimeFlavor)' == '' and ($(_subset.Contains('+mono+')) or $(_subset.Contains('+mono.runtime+'))) and (!$(_subset.Contains('+clr+')) and !$(_subset.Contains('+clr.runtime+')))">Mono</RuntimeFlavor>
<RuntimeFlavor Condition="'$(RuntimeFlavor)' == ''">CoreCLR</RuntimeFlavor>
</PropertyGroup>

View file

@ -9,7 +9,7 @@
IBCMerge optimizations on Mac for now to unblock the offical build.
See issue https://github.com/dotnet/runtime/issues/33303
-->
<IsEligibleForNgenOptimization Condition="'$(TargetOS)' == 'OSX' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'Android'">false</IsEligibleForNgenOptimization>
<IsEligibleForNgenOptimization Condition="'$(TargetOS)' == 'OSX' or '$(TargetsMobile)' == 'true'">false</IsEligibleForNgenOptimization>
</PropertyGroup>
<Target Name="SetApplyNgenOptimization"

View file

@ -133,9 +133,9 @@
<IsNative>true</IsNative>
</RuntimeFiles>
<MonoCrossFiles Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'tvOS'"
<MonoCrossFiles Condition="'$(TargetsMobile)' == 'true'"
Include="$(MonoArtifactsPath)\cross\*.*" />
<MonoIncludeFiles Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'tvOS'"
<MonoIncludeFiles Condition="'$(TargetsMobile)' == 'true'"
Include="$(MonoArtifactsPath)\include\**\*.*" />
</ItemGroup>

View file

@ -357,7 +357,7 @@
<CrossGenSymbolExtension>.map</CrossGenSymbolExtension>
<CrossGenSymbolExtension Condition="'$(TargetOS)' == 'Windows_NT'">.ni.pdb</CrossGenSymbolExtension>
<!-- OSX doesn't have crossgen symbols, yet -->
<CrossGenSymbolExtension Condition="'$(TargetOS)' == 'OSX' or '$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'Android'"></CrossGenSymbolExtension>
<CrossGenSymbolExtension Condition="'$(TargetOS)' == 'OSX' or '$(TargetsMobile)' == 'true'"></CrossGenSymbolExtension>
</PropertyGroup>
</Project>

View file

@ -67,11 +67,11 @@
<TargetPath>tools</TargetPath>
</RuntimeFiles>
<RuntimeFiles Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'Android'"
<RuntimeFiles Condition="'$(TargetsMobile)' == 'true'"
Include="@(MonoCrossFiles)">
<TargetPath>runtimes/$(PackageRID)/native/cross</TargetPath>
</RuntimeFiles>
<RuntimeFiles Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'Android'"
<RuntimeFiles Condition="'$(TargetsMobile)' == 'true'"
Include="@(MonoIncludeFiles)">
<TargetPath>runtimes/$(PackageRID)/native/include/%(RecursiveDir)</TargetPath>
</RuntimeFiles>

View file

@ -35,17 +35,12 @@
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(HostArch)' == 'arm'">arm</TargetArchitecture>
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(HostArch)' == 'arm64'">arm64</TargetArchitecture>
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(TargetOS)' == 'WebAssembly'">wasm</TargetArchitecture>
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(TargetOS)' == 'iOS'">x64</TargetArchitecture>
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(TargetOS)' == 'tvOS'">x64</TargetArchitecture>
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(TargetOS)' == 'Android'">x64</TargetArchitecture>
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(TargetsMobile)' == 'true'">x64</TargetArchitecture>
<TargetArchitecture Condition="'$(TargetArchitecture)' == ''">x64</TargetArchitecture>
<!-- RuntimeOS is calculated based on the build system OS, however if building for WebAssembly/iOS/Android we need to let
the build system to use webassembly/ios/android as the RuntimeOS for produced package RIDs. -->
<RuntimeOS Condition="'$(TargetOS)' == 'WebAssembly'">$(TargetOS.ToLowerInvariant())</RuntimeOS>
<RuntimeOS Condition="'$(TargetOS)' == 'iOS'">$(TargetOS.ToLowerInvariant())</RuntimeOS>
<RuntimeOS Condition="'$(TargetOS)' == 'tvOS'">$(TargetOS.ToLowerInvariant())</RuntimeOS>
<RuntimeOS Condition="'$(TargetOS)' == 'Android'">$(TargetOS.ToLowerInvariant())</RuntimeOS>
<RuntimeOS Condition="'$(TargetOS)' == 'WebAssembly' or '$(TargetsMobile)' == 'true'">$(TargetOS.ToLowerInvariant())</RuntimeOS>
<!-- Initialize BuildSettings from the individual properties if it wasn't already explicitly set -->
<Configuration Condition="'$(Configuration)'==''">Debug</Configuration>
@ -309,10 +304,10 @@
<PropertyGroup Condition="'$(BuildAllConfigurations)' != 'true'">
<!-- We add extra binplacing for the test shared framework until we can get hardlinking with the runtime directory working on all platforms -->
<BinPlaceTestSharedFramework Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' and '$(TargetsMobile)' != 'true'">true</BinPlaceTestSharedFramework>
<BinPlaceTestSharedFramework Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)'">true</BinPlaceTestSharedFramework>
<BinPlaceNETFXRuntime Condition="'$(BuildTargetFramework)' == '$(NetFrameworkCurrent)'">true</BinPlaceNETFXRuntime>
<BinPlaceTestRuntimePack Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'Android'">true</BinPlaceTestRuntimePack>
<BinPlaceTestRuntimePack Condition="'$(TargetsMobile)' == 'true'">true</BinPlaceTestRuntimePack>
<NETCoreAppTestSharedFrameworkPath>$([MSBuild]::NormalizeDirectory('$(TestHostRootPath)', 'shared', 'Microsoft.NETCore.App', '$(ProductVersion)'))</NETCoreAppTestSharedFrameworkPath>