Skip to content

Commit

Permalink
Remove references to PlatformAbstractions
Browse files Browse the repository at this point in the history
This will allow us to remove the PlatformAbstractions library from dotnet/runtime.

Contributes to dotnet/runtime#3470
  • Loading branch information
eerhardt committed May 14, 2020
1 parent 363de02 commit 6283bd1
Show file tree
Hide file tree
Showing 25 changed files with 38 additions and 152 deletions.
21 changes: 16 additions & 5 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
1 change: 1 addition & 0 deletions src/application-insights
Submodule application-insights added at 53b809
1 change: 1 addition & 0 deletions src/cli
Submodule cli added at 32f29b
1 change: 1 addition & 0 deletions src/cli-migrate
Submodule cli-migrate added at 1a3ffc
1 change: 1 addition & 0 deletions src/clicommandlineparser
Submodule clicommandlineparser added at 9885d8
1 change: 1 addition & 0 deletions src/common
Submodule common added at be9aca
1 change: 1 addition & 0 deletions src/core-setup
Submodule core-setup added at caa7b7
1 change: 1 addition & 0 deletions src/coreclr
Submodule coreclr added at d9d6f9
1 change: 1 addition & 0 deletions src/corefx
Submodule corefx added at 30ab65
1 change: 1 addition & 0 deletions src/fsharp
Submodule fsharp added at d3f024
1 change: 1 addition & 0 deletions src/msbuild
Submodule msbuild added at 766e04
1 change: 1 addition & 0 deletions src/newtonsoft-json
Submodule newtonsoft-json added at e5ac9a
1 change: 1 addition & 0 deletions src/nuget-client
Submodule nuget-client added at 924548
1 change: 1 addition & 0 deletions src/roslyn
Submodule roslyn added at 362ec0
1 change: 1 addition & 0 deletions src/roslyn-tools
Submodule roslyn-tools added at 47d48e
1 change: 1 addition & 0 deletions src/sdk
Submodule sdk added at dc8eef
1 change: 1 addition & 0 deletions src/standard
Submodule standard added at bb2c2c
1 change: 1 addition & 0 deletions src/templating
Submodule templating added at c0f84b
1 change: 1 addition & 0 deletions src/vstest
Submodule vstest added at ebef18
1 change: 1 addition & 0 deletions src/websdk
Submodule websdk added at 01175f
1 change: 1 addition & 0 deletions src/xliff-tasks
Submodule xliff-tasks added at 27d43b
44 changes: 2 additions & 42 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

This file was deleted.

This file was deleted.

Empty file.

0 comments on commit 6283bd1

Please sign in to comment.