Browse Source

Generate an arm32 shared framework without crossgen (#1037)

Nate McMaster 8 years ago
parent
commit
50ce20f0f9
4 changed files with 15 additions and 3 deletions
  1. 2 0
      README.md
  2. 2 1
      build/SharedFx.props
  3. 9 2
      build/SharedFx.targets
  4. 2 0
      build/repo.props

+ 2 - 0
README.md

@@ -55,6 +55,7 @@ Microsoft.AspNetCore              | [![][metapackage-myget-badge]][metapackage-m
 [win-x86-zip]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/master/aspnetcore-runtime-latest-win-x86.zip
 [win-x86-exe]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/master/aspnetcore-runtime-latest-win-x86.exe
 [linux-x64-tar]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/master/aspnetcore-runtime-latest-linux-x64.tar.gz
+[linux-arm-tar]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/master/aspnetcore-runtime-latest-linux-arm.tar.gz
 [osx-x64-tar]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/master/aspnetcore-runtime-latest-osx-x64.tar.gz
 [debian-x64-deb]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/master/aspnetcore-runtime-latest-x64.deb
 [redhat-x64-rpm]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/master/aspnetcore-runtime-latest-x64.rpm
@@ -77,6 +78,7 @@ Windows (x64)         | [Installer (exe)][win-x64-exe]<br>[Archive (zip)][win-x6
 Windows (x86)         | [Installer (exe)][win-x86-exe]<br>[Archive (zip)][win-x86-zip]   | [Installer (exe)][win-x86-exe-rel-21]<br>[Archive (zip)][win-x86-zip-rel-21]
 macOS (x64)           | [Archive (tar.gz)][osx-x64-tar]                                  | [Archive (tar.gz)][osx-x64-tar-rel-21]
 Linux (x64)           | [Archive (tar.gz)][linux-x64-tar]                                | [Archive (tar.gz)][linux-x64-tar-rel-21]
+Linux (arm32)         | [Archive (tar.gz)][linux-arm-tar]                                | (not available yet)
 Debian/Ubuntu (x64)   | [Installer (deb)][debian-x64-deb]                                | [Installer (deb)][debian-x64-deb-rel-21]
 RedHat/Fedora (x64)   | [Installer (rpm)][redhat-x64-rpm]                                | [Installer (rpm)][redhat-x64-rpm-rel-21]
 Alpine Linux 3.6 (x64)| [Archive (tar.gz)][alpine.3.6-x64-tar]                           | [Archive (tar.gz)][alpine.3.6-x64-tar-rel-21]

+ 2 - 1
build/SharedFx.props

@@ -56,9 +56,10 @@
 
   <ItemGroup>
     <WindowsSharedFxRIDs Include="win-x64;win-x86"/>
-    <NonWindowsSharedFxRIDs Include="osx-x64" CrossgenSymbolsSupported="false" />
+    <NonWindowsSharedFxRIDs Include="osx-x64" CrossgenSymbols="false" />
     <NonWindowsSharedFxRIDs Include="linux-x64" />
     <NonWindowsSharedFxRIDs Include="alpine.3.6-x64" />
+    <NonWindowsSharedFxRIDs Include="linux-arm" CrossGen="false" Condition="'$(IsLinuxArmSupported)' == 'true'" />
     <AllSharedFxRIDs Include="@(WindowsSharedFxRIDs);@(NonWindowsSharedFxRIDs)"/>
   </ItemGroup>
 </Project>

+ 9 - 2
build/SharedFx.targets

@@ -25,7 +25,7 @@
 
     <ItemGroup>
       <!-- Cartesian products in MSBuild are fun :) -->
-      <_SharedFrameworkSymbolsPackage Include="@(SharedFrameworkName)" Condition="'%(AllSharedFxRIDs.CrossgenSymbolsSupported)' != 'false'">
+      <_SharedFrameworkSymbolsPackage Include="@(SharedFrameworkName)" Condition="'%(AllSharedFxRIDs.CrossgenSymbols)' != 'false' AND '%(AllSharedFxRIDs.Crossgen)' != 'false'">
         <Rid>%(AllSharedFxRIDs.Identity)</Rid>
       </_SharedFrameworkSymbolsPackage>
       <_SharedFrameworkSymbolsPackage Update="@(_SharedFrameworkSymbolsPackage)" PackageId="runtime.%(Rid).%(Identity)" />
@@ -117,6 +117,8 @@
   <Target Name="DefineSharedFxPrerequisites">
     <PropertyGroup>
       <RIDIsAcceptable Condition="'%(AllSharedFxRIDs.Identity)' == '$(SharedFxRID)'">true</RIDIsAcceptable>
+      <CrossGenSharedFx>false</CrossGenSharedFx>
+      <CrossGenSharedFx Condition="'%(AllSharedFxRIDs.Identity)' == '$(SharedFxRID)' AND '%(AllSharedFxRIDs.Crossgen)' != 'false' ">true</CrossGenSharedFx>
     </PropertyGroup>
 
     <Error Text="&quot;$(SharedFxRID)&quot; not acceptable as a SharedFxRID, please specify an acceptable value: {@(AllSharedFxRIDs)}." Condition="'$(RIDIsAcceptable)' != 'true'"/>
@@ -366,7 +368,12 @@
     <MakeDir Directories="$([System.IO.Path]::GetDirectoryName('%(AssembliesToCrossgen.Destination)'))" />
     <WriteLinesToFile File="%(AssembliesToCrossgen.Rsp)" Lines="@(CrossGenArgs)" Overwrite="true" />
 
-    <Exec Command="$(SharedFxCrossGenToolDirectory)$(CrossGenTool) @%(AssembliesToCrossgen.Rsp)" EnvironmentVariables="COMPlus_PartialNGen=0" />
+    <Copy Condition="'$(CrossGenSharedFx)' == 'false'"
+          SourceFiles="%(AssembliesToCrossgen.Source)"
+          DestinationFiles="%(AssembliesToCrossgen.Destination)" />
+    <Exec Condition="'$(CrossGenSharedFx)' != 'false'"
+          Command="$(SharedFxCrossGenToolDirectory)$(CrossGenTool) @%(AssembliesToCrossgen.Rsp)"
+          EnvironmentVariables="COMPlus_PartialNGen=0" />
   </Target>
 
   <Target Name="CrossGenSymbols"

+ 2 - 0
build/repo.props

@@ -22,6 +22,7 @@
     <IntermediateInstaller Include="win-x64" FileExt=".wixlib" />
     <IntermediateInstaller Include="osx-x64" FileExt=".tar.gz" />
     <IntermediateInstaller Include="linux-x64" FileExt=".tar.gz" />
+    <IntermediateInstaller Include="linux-arm" FileExt=".tar.gz" Condition="'$(IsLinuxArmSupported)' == 'true'" />
     <IntermediateInstaller Include="alpine.3.6-x64" FileExt=".tar.gz" />
 
     <NativeInstaller Include="win-x86" FileExt=".exe" />
@@ -30,6 +31,7 @@
     <NativeInstaller Include="win-x64" FileExt=".zip" />
     <NativeInstaller Include="osx-x64" FileExt=".tar.gz" />
     <NativeInstaller Include="linux-x64" FileExt=".tar.gz" />
+    <NativeInstaller Include="linux-arm" FileExt=".tar.gz" Condition="'$(IsLinuxArmSupported)' == 'true'" />
     <NativeInstaller Include="alpine.3.6-x64" FileExt=".tar.gz" />
     <NativeInstaller Include="x64" FileExt=".deb" />
     <NativeInstaller Include="x64" FileExt=".rpm" />