Skip to content

Commit

Permalink
Remove references to PlatformAbstractions
Browse files Browse the repository at this point in the history
PlatformAbstractions is being obsoleted and will be removed from dotnet/runtime.

Contributes to dotnet/runtime#3470
  • Loading branch information
eerhardt committed May 14, 2020
1 parent 363de02 commit 6649419
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 154 deletions.
23 changes: 17 additions & 6 deletions dir.props
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@
<DarcInstallDir>$(DotNetCliToolDir)tools/</DarcInstallDir>
<DarcVersion>$([System.IO.File]::ReadAllText('$(ProjectDir)DarcVersion.txt').Trim())</DarcVersion>
<DarcDll>$(DotNetCliToolDir)tools/.store/microsoft.dotnet.darc/$(DarcVersion)/microsoft.dotnet.darc/$(DarcVersion)/tools/netcoreapp3.0/any/Microsoft.DotNet.Darc.dll</DarcDll>
<TasksBinDir>$(TaskDirectory)Microsoft.DotNet.SourceBuild.Tasks/bin/Debug/netstandard2.0/</TasksBinDir>
<SourceBuildTasksAssembly>$(TasksBinDir)Microsoft.DotNet.SourceBuild.Tasks.dll</SourceBuildTasksAssembly>
<XPlatTasksBinDir>$(TaskDirectory)Microsoft.DotNet.SourceBuild.Tasks.XPlat/bin/Debug/netstandard2.0/</XPlatTasksBinDir>
<XPlatSourceBuildTasksAssembly>$(XPlatTasksBinDir)Microsoft.DotNet.SourceBuild.Tasks.XPlat.dll</XPlatSourceBuildTasksAssembly>
<LeakDetectionTasksBinDir>$(TaskDirectory)Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/</LeakDetectionTasksBinDir>
Expand All @@ -93,7 +91,6 @@
<SourceBuiltToolsetDir>$(LocalBlobStorageRoot)Toolset/</SourceBuiltToolsetDir>
<SourceBuiltRuntimeDir>$(LocalBlobStorageRoot)Runtime/</SourceBuiltRuntimeDir>
<SourceBuiltAspNetCoreRuntime>$(LocalBlobStorageRoot)aspnetcore/Runtime/</SourceBuiltAspNetCoreRuntime>
<TargetInfoProps>$(IntermediatePath)TargetInfo.props</TargetInfoProps>
<RestoreSourcePropsPath>$(IntermediatePath)RestoreSources.props</RestoreSourcePropsPath>
<PackageVersionPropsPath>$(IntermediatePath)PackageVersions.props</PackageVersionPropsPath>
<GennedPackageVersionPropsPath Condition="'$(OfflineBuild)' == 'true'">$(IntermediatePath)GennedPackageVersions.props</GennedPackageVersionPropsPath>
Expand Down Expand Up @@ -154,10 +151,24 @@
<PropertyGroup>
<ArmEnvironmentVariables Condition="'$(ArmEnvironmentVariables)' == ''">ROOTFS_DIR=$(BaseIntermediatePath)crossrootfs/arm</ArmEnvironmentVariables>
<ArmEnvironmentVariables Condition="'$(Platform)' == 'armel'">ROOTFS_DIR=$(BaseIntermediatePath)crossrootfs/armel</ArmEnvironmentVariables>
</PropertyGroup>
</PropertyGroup>

<Import Project="$(TargetInfoProps)" Condition="$(GeneratingStaticPropertiesFile) != 'true' AND Exists('$(TargetInfoProps)')" />
<PropertyGroup>
<TargetRid Condition="'$(TargetRid)' == ''">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</TargetRid>

<TargetOS Condition="'$(TargetOS)' == '' AND $([MSBuild]::IsOSPlatform('WINDOWS'))">Windows_NT</TargetOS>
<TargetOS Condition="'$(TargetOS)' == '' AND $([MSBuild]::IsOSPlatform('OSX'))">OSX</TargetOS>
<TargetOS Condition="'$(TargetOS)' == '' AND $([MSBuild]::IsOSPlatform('LINUX'))">Linux</TargetOS>
<TargetOS Condition="'$(TargetOS)' == '' AND $([MSBuild]::IsOSPlatform('FREEBSD'))">FreeBSD</TargetOS>
</PropertyGroup>

<PropertyGroup Condition="'$(PortableBuild)' == 'true'">
<TargetRid Condition="'$(TargetOS)' == 'FreeBSD'">freebsd-$(Platform)</TargetRid>
<TargetRid Condition="'$(TargetOS)' == 'OSX'">osx-$(Platform)</TargetRid>
<TargetRid Condition="'$(TargetOS)' == 'Linux'">linux-$(Platform)</TargetRid>
<TargetRid Condition="'$(TargetOS)' == 'Windows_NT'">win-$(Platform)</TargetRid>
</PropertyGroup>

<PropertyGroup>
<!-- known-good (repos/known-good.proj) conditionally includes submodules based on the platform,
so this will not always correspond to the same repos - see that file for details.
Expand Down Expand Up @@ -213,4 +224,4 @@
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftSourceLinkVersion" Version="%24(MicrosoftSourceLinkCommonPackageVersion)" />
</ItemGroup>

</Project>
</Project>
46 changes: 3 additions & 43 deletions tools-local/init-build.proj
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- Don't try to import the target info file when building this project -->
<GeneratingStaticPropertiesFile>true</GeneratingStaticPropertiesFile>
</PropertyGroup>
<Import Project="..\dir.props" />
<Import Project="$(OfflineAllRepoPropsFile)" Condition="Exists('$(OfflineAllRepoPropsFile)')" />

<UsingTask AssemblyFile="$(SourceBuildTasksAssembly)" TaskName="GetHostInformation" />
<UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="WriteSourceRepoProperties" />
<UsingTask AssemblyFile="$(LeakDetectionTasksAssembly)" TaskName="MarkAndCatalogPackages" />
<UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="NuGetPack" />
Expand All @@ -23,7 +18,7 @@
Inputs="$(TargetInfoProps)"
Outputs="$(BuildCompetedSuccessSemaphore)"
>
<CallTarget Targets="UnpackTarballs;BuildXPlatTasks;AcquireDarc;FetchSources;WriteSourceLinkMetadata;BuildTasks;ExtractToolPackage;InstallSourceBuildSdkResolver;WriteDynamicPropsToStaticPropsFiles;GenerateRootFs;ApplyPatches;PoisonPrebuiltPackages" />
<CallTarget Targets="UnpackTarballs;BuildXPlatTasks;AcquireDarc;FetchSources;WriteSourceLinkMetadata;ExtractToolPackage;InstallSourceBuildSdkResolver;GenerateRootFs;ApplyPatches;PoisonPrebuiltPackages" />
<Touch Files="$(BuildCompetedSuccessSemaphore)" AlwaysCreate="true" />
</Target>

Expand Down Expand Up @@ -51,13 +46,6 @@
<Copy SourceFiles="$(PrebuiltSourceBuiltPackagesPath)PackageVersions.props" DestinationFiles="$(IntermediatePath)SourceBuiltPackageVersions.props" />
</Target>

<Target Name="BuildTasks">
<PropertyGroup Condition="'$(OfflineBuild)' == 'true'">
<OfflineSources>&quot;$(ReferencePackagesDir)%3B$(PrebuiltPackagesPath)&quot;</OfflineSources>
</PropertyGroup>
<Exec Command="$(DotNetCliToolDir)dotnet build tasks\Microsoft.DotNet.SourceBuild.Tasks\Microsoft.DotNet.SourceBuild.Tasks.csproj /p:RestoreSources=$(OfflineSources) /p:OfflineBuild=$(OfflineBuild)" />
</Target>

<Target Name="BuildXPlatTasks" DependsOnTargets="UnpackTarballs">
<PropertyGroup Condition="'$(OfflineBuild)' == 'true'">
<OfflineSources>&quot;$(ReferencePackagesDir)%3B$(PrebuiltPackagesPath)&quot;</OfflineSources>
Expand All @@ -82,41 +70,13 @@
</Target>

<Target Name="ExtractToolPackage"
DependsOnTargets="UnpackTarballs;BuildTasks"
DependsOnTargets="UnpackTarballs"
Condition="'$(OfflineBuild)' == 'true'">
<ZipFileExtractToDirectory SourceArchive="$(PrebuiltSourceBuiltPackagesPath)Microsoft.DotNet.Arcade.Sdk.$(ARCADE_BOOTSTRAP_VERSION).nupkg"
DestinationDirectory="$(ArcadeBootstrapPackageDir)microsoft.dotnet.arcade.sdk/$(ARCADE_BOOTSTRAP_VERSION)/"
OverwriteDestination="true" />
</Target>

<Target Name="WriteDynamicPropsToStaticPropsFiles" DependsOnTargets="BuildTasks">
<GetHostInformation Condition="'$(TargetRid)' == ''">
<Output PropertyName="TargetRid" TaskParameter="Rid" />
</GetHostInformation>

<GetHostInformation Condition="'$(TargetOS)' == ''">
<Output PropertyName="TargetOS" TaskParameter="OSName" />
</GetHostInformation>

<PropertyGroup Condition="'$(PortableBuild)' == 'true'">
<TargetRid Condition="'$(TargetOS)' == 'FreeBSD'">freebsd-$(Platform)</TargetRid>
<TargetRid Condition="'$(TargetOS)' == 'OSX'">osx-$(Platform)</TargetRid>
<TargetRid Condition="'$(TargetOS)' == 'Linux'">linux-$(Platform)</TargetRid>
<TargetRid Condition="'$(TargetOS)' == 'Windows_NT'">win-$(Platform)</TargetRid>
</PropertyGroup>

<PropertyGroup>
<TargetInfoPropsContent>&lt;Project ToolsVersion=&quot;15.0&quot;&gt;
&lt;PropertyGroup&gt;
&lt;TargetRid&gt;$(TargetRid)&lt;/TargetRid&gt;
&lt;TargetOS&gt;$(TargetOS)&lt;/TargetOS&gt;
&lt;/PropertyGroup&gt;
&lt;/Project&gt;</TargetInfoPropsContent>
</PropertyGroup>
<MakeDir Directories="$(IntermediatePath)" Condition="!Exists('$(IntermediatePath)')" />
<WriteLinesToFile File="$(TargetInfoProps)" Lines="$(TargetInfoPropsContent)" Overwrite="True" />
</Target>

<Target Name="PoisonPrebuiltPackages" Condition="'$(EnablePoison)' == 'true' and '$(OfflineBuild)' == 'true'">
<ItemGroup>
<PrebuiltPackages Include="$(PrebuiltPackagesPath)**/*.nupkg" />
Expand Down Expand Up @@ -171,4 +131,4 @@
<Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Done writing out SourceLink metadata." />
</Target>

</Project>
</Project>

This file was deleted.

This file was deleted.

Empty file.

0 comments on commit 6649419

Please sign in to comment.