Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<RepositoryEngineeringDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'eng'))</RepositoryEngineeringDir>
<ArtifactsDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts'))</ArtifactsDir>
<ArtifactsBinDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin'))</ArtifactsBinDir>
<ArtifactsObjDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'obj'))</ArtifactsObjDir>
</PropertyGroup>

<!-- The TFMs to build and test against. -->
Expand Down Expand Up @@ -61,11 +62,18 @@
<GitHubRepositoryName>runtime</GitHubRepositoryName>
<RepositoryUrl>git://github.com/dotnet/runtime</RepositoryUrl>
<ProjectUrl>https://github.com/dotnet/runtime</ProjectUrl>
<LicenseUrl>https://github.com/dotnet/runtime/blob/master/LICENSE.TXT</LicenseUrl>
<RuntimeIdGraphDefinitionFile>$([MSBuild]::NormalizePath('$(LibrariesProjectRoot)', 'pkg', 'Microsoft.NETCore.Platforms', 'runtime.json'))</RuntimeIdGraphDefinitionFile>
<!-- Used by Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk -->
<LicenseFile>$(RepoRoot)LICENSE.TXT</LicenseFile>
<PackageThirdPartyNoticesFile>$(RepoRoot)THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile>
<ReleaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</ReleaseNotes>
<Copyright>$(CopyrightNetFoundation)</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>

<!-- Indicates this is not an officially supported release. Release branches should set this to false. -->
<!--
Indicates this is not an officially supported release. Release branches should set this to false.
Keep it in sync with PRERELEASE in clrdefinitions.cmake
-->
<IsPrerelease>true</IsPrerelease>

<!-- Experimental packages should not be stable -->
Expand All @@ -78,6 +86,7 @@

<!-- Language configuration -->
<PropertyGroup>
<Language Condition="'$(Language)' == '' and '$(MSBuildProjectExtension)' == '.ilproj'">IL</Language>
<!-- default to allowing all language features -->
<LangVersion>latest</LangVersion>
<LangVersion Condition="'$(Language)' == 'C#'">preview</LangVersion>
Expand All @@ -96,6 +105,10 @@
<BuildArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())</BuildArchitecture>
</PropertyGroup>

<PropertyGroup>
<RunningOnUnix Condition="'$(OS)' != 'Windows_NT'">true</RunningOnUnix>
</PropertyGroup>

<Import Project="$(RepositoryEngineeringDir)Analyzers.props" />

</Project>
7 changes: 5 additions & 2 deletions eng/Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,11 @@
</ItemGroup>

<MSBuild Projects="@(RepoTaskProjects)"
Properties="Configuration=Debug;Platform=AnyCPU"
Targets="Restore;Build"/>
Properties="Configuration=Debug;Platform=AnyCPU;__BuildPhase=Restore"
Targets="Restore" />
<MSBuild Projects="@(RepoTaskProjects)"
Properties="Configuration=Debug;Platform=AnyCPU;__BuildPhase=Build"
Targets="Build"/>

<WriteLinesToFile File="$(RepoTasksOutputFile)"
Lines="$(RepoTasksOutputFile)"
Expand Down
2 changes: 1 addition & 1 deletion eng/Signing.props
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

<!-- Sign api-ms-win-core-xstate-l2-1-0 binary as it is only catalog signed in the current SDK. -->
<ItemsToSign
Condition="'$(ConfigurationGroup)' == 'Release' and '$(TargetArchitecture)' == 'x86'"
Condition="('$(ConfigurationGroup)' == 'Release' or '$(Configuration)' == 'Release') and '$(TargetArchitecture)' == 'x86'"
Include="$(CoreCLRArtifactsPath)Redist\ucrt\DLLs\$(TargetArchitecture)\api-ms-win-core-xstate-l2-1-0.dll" />

<!-- Sign libraries. -->
Expand Down
9 changes: 8 additions & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@
<!-- CoreClr dependencies -->
<MicrosoftNETCoreILAsmVersion>5.0.0-alpha1.19563.3</MicrosoftNETCoreILAsmVersion>
<MicrosoftNETSdkILVersion>5.0.0-alpha1.19563.3</MicrosoftNETSdkILVersion>
<XunitPerformanceApiVersion>1.0.0-beta-build0015</XunitPerformanceApiVersion>
<MicrosoftDiagnosticsTracingTraceEventVersion>2.0.43</MicrosoftDiagnosticsTracingTraceEventVersion>
<MicrosoftDiagnosticsToolsRuntimeClientVersion>1.0.4-preview6.19326.1</MicrosoftDiagnosticsToolsRuntimeClientVersion>
<CommandLineParserVersion>2.2.0</CommandLineParserVersion>
<!-- Scenario tests install this version of Microsoft.NetCore.App, then patch coreclr binaries via xcopy. At the moment it is
updated manually whenever breaking changes require it to move forward, but it would be nice if we could update it automatically
as we do with many of the package versions above -->
<BaselineMicrosoftNetCoreAppVersion>2.1.0-preview3-26416-01</BaselineMicrosoftNetCoreAppVersion>
<!-- Libraries dependencies -->
<SystemTextJsonVersion>5.0.0-alpha.1.19563.6</SystemTextJsonVersion>
<SystemTextEncodingsWebVersion>5.0.0-alpha.1.19563.6</SystemTextEncodingsWebVersion>
Expand Down Expand Up @@ -87,7 +95,6 @@
<!-- Testing -->
<MicrosoftNETTestSdkVersion>16.5.0-preview-20200103-01</MicrosoftNETTestSdkVersion>
<XUnitVersion>2.4.1</XUnitVersion>
<TraceEventVersion>2.0.5</TraceEventVersion>
<NewtonsoftJsonVersion>12.0.3</NewtonsoftJsonVersion>
<XUnitXmlTestLoggerVersion>2.1.26</XUnitXmlTestLoggerVersion>
<MoqVersion>4.12.0</MoqVersion>
Expand Down
12 changes: 1 addition & 11 deletions eng/packaging.props
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
<Project>
<PropertyGroup>
<PackageDescriptionFile>$(PkgDir)descriptions.json</PackageDescriptionFile>
<PackageLicenseFile>$(RepoRoot)LICENSE.TXT</PackageLicenseFile>
<PackageThirdPartyNoticesFile>$(RepoRoot)THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile>
<ReleaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</ReleaseNotes>
<ProjectUrl Condition="'$(ProjectUrl)' == ''">https://github.com/dotnet/corefx</ProjectUrl>
<Copyright>$(CopyrightNetFoundation)</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>

<!-- defined in buildtools packaging.targets, but we need this before targets are imported -->
<PackagePlatform Condition="'$(PackagePlatform)' == ''">$(Platform)</PackagePlatform>
<PackagePlatform Condition="'$(PackagePlatform)' == 'amd64'">x64</PackagePlatform>
Expand Down Expand Up @@ -55,11 +50,6 @@
</PropertyGroup>

<ItemGroup Condition="'$(MSBuildProjectExtension)' == '.pkgproj'">
<!-- Add required legal files to packages -->
<File Condition="Exists('$(PackageLicenseFile)')"
Include="$(PackageLicenseFile)" >
<SkipPackageFileCheck>true</SkipPackageFileCheck>
</File>
<File Condition="Exists('$(PackageThirdPartyNoticesFile)')"
Include="$(PackageThirdPartyNoticesFile)" >
<SkipPackageFileCheck>true</SkipPackageFileCheck>
Expand Down
6 changes: 3 additions & 3 deletions eng/pipelines/coreclr/templates/build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ jobs:

# Sign on Windows
- ${{ if and(eq(parameters.osGroup, 'Windows_NT'), eq(parameters.signBinaries, 'true')) }}:
- powershell: eng\common\build.ps1 -ci -sign -restore -configuration:$(buildConfig) -warnaserror:0 /p:ArcadeBuild=true /p:OfficialBuild=true /p:BuildOS=$(osGroup) /p:BuildArch=$(archType) /p:BuildType=$(_BuildConfig) /p:DotNetSignType=$env:_SignType -projects $(Build.SourcesDirectory)\eng\empty.csproj
- powershell: eng\common\build.ps1 -ci -sign -restore -configuration:$(buildConfig) -warnaserror:0 /p:ArcadeBuild=true /p:OfficialBuild=true /p:OSGroup=$(osGroup) /p:Platform=$(archType) /p:Configuration=$(_BuildConfig) /p:DotNetSignType=$env:_SignType -projects $(Build.SourcesDirectory)\eng\empty.csproj
displayName: Sign Binaries

- task: PublishBuildArtifacts@1
Expand Down Expand Up @@ -205,7 +205,7 @@ jobs:
# Publish official build
- ${{ if eq(parameters.publishToBlobFeed, 'true') }}:
- ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
- script: $(Build.SourcesDirectory)/eng/common/build.sh --ci --restore --publish --configuration $(_BuildConfig) /p:DotNetPublishUsingPipelines=true /p:DotNetPublishToBlobFeed=true /p:DotNetPublishBlobFeedUrl=$(dotnetfeedUrl) /p:DotNetPublishBlobFeedKey=$(dotnetfeedPAT) /p:__BuildType=$(_BuildConfig) /p:__BuildArch=$(archType) /p:__BuildOS=$(osGroup) /p:OSIdentifier=$(osGroup)$(osSubgroup) /bl:"$(Build.SourcesDirectory)/artifacts/log/publish-pkgs.binlog" --projects $(Build.SourcesDirectory)/eng/empty.csproj
- script: $(Build.SourcesDirectory)/eng/common/build.sh --ci --restore --publish --configuration $(_BuildConfig) /p:DotNetPublishUsingPipelines=true /p:DotNetPublishToBlobFeed=true /p:DotNetPublishBlobFeedUrl=$(dotnetfeedUrl) /p:DotNetPublishBlobFeedKey=$(dotnetfeedPAT) /p:Configuration=$(_BuildConfig) /p:Platform=$(archType) /p:__BuildOS=$(osGroup) /p:OSIdentifier=$(osGroup)$(osSubgroup) /bl:"$(Build.SourcesDirectory)/artifacts/log/publish-pkgs.binlog" --projects $(Build.SourcesDirectory)/eng/empty.csproj
displayName: Publish packages to blob feed
env:
# TODO: remove NUGET_PACKAGES once https://github.com/dotnet/arcade/issues/1578 is fixed
Expand All @@ -215,7 +215,7 @@ jobs:
DotNetCoreSdkDir: /usr/local/dotnet
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
# TODO: pass publish feed url and access token in from the internal pipeline
- powershell: eng\common\build.ps1 -ci -restore -publish -configuration $(_BuildConfig) /p:DotNetPublishUsingPipelines=true /p:DotNetPublishToBlobFeed=true /p:DotNetPublishBlobFeedUrl=$(dotnetfeedUrl) /p:DotNetPublishBlobFeedKey=$(dotnetfeedPAT) /p:__BuildType=$(_BuildConfig) /p:__BuildArch=$(archType) /p:__BuildOS=$(osGroup) /p:OSIdentifier=$(osGroup)$(osSubgroup) /bl:"$(Build.SourcesDirectory)\artifacts\log\publish-pkgs.binlog" -projects $(Build.SourcesDirectory)\eng\empty.csproj
- powershell: eng\common\build.ps1 -ci -restore -publish -configuration $(_BuildConfig) /p:DotNetPublishUsingPipelines=true /p:DotNetPublishToBlobFeed=true /p:DotNetPublishBlobFeedUrl=$(dotnetfeedUrl) /p:DotNetPublishBlobFeedKey=$(dotnetfeedPAT) /p:Configuration=$(_BuildConfig) /p:Platform=$(archType) /p:__BuildOS=$(osGroup) /p:OSIdentifier=$(osGroup)$(osSubgroup) /bl:"$(Build.SourcesDirectory)\artifacts\log\publish-pkgs.binlog" -projects $(Build.SourcesDirectory)\eng\empty.csproj
displayName: Publish packages to blob feed
env:
# TODO: remove NUGET_PACKAGES once https://github.com/dotnet/arcade/issues/1578 is fixed
Expand Down
132 changes: 122 additions & 10 deletions src/coreclr/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,28 +1,140 @@
<Project>

<Import Project="..\..\Directory.Build.props" />

<!-- Set default Configuration and Platform -->
<PropertyGroup>
<SkipImportArcadeSdkFromRoot>true</SkipImportArcadeSdkFromRoot>
<Platform Condition="'$(__BuildArch)' != ''">$(__BuildArch)</Platform>
<!-- AnyCPU is set by default if platform isn't set. -->
<Platform Condition="'$(Platform)' == 'AnyCPU'" />
<Platform Condition="'$(Platform)' == '' or '$(Platform)' == 'amd64'">x64</Platform>
<Platform Condition="'$(Platform)' == 'armel'">arm</Platform>
<TargetArchitecture Condition="'$(TargetArchitecture)' == ''">$(Platform)</TargetArchitecture>

<OSGroup Condition="'$(__BuildOS)' != ''">$(__BuildOS)</OSGroup>
<OSGroup Condition="'$(OSGroup)' == '' and '$([MSBuild]::IsOSPlatform(Windows))' == 'true'">Windows_NT</OSGroup>
<OSGroup Condition="'$(OSGroup)' == '' and '$([MSBuild]::IsOSPlatform(Linux))' == 'true'">Linux</OSGroup>
<OSGroup Condition="'$(OSGroup)' == '' and '$([MSBuild]::IsOSPlatform(OSX))' == 'true'">OSX</OSGroup>
<OSGroup Condition="'$(OSGroup)' == ''">AnyOS</OSGroup>

<Configuration Condition="'$(__BuildType)' != ''">$(__BuildType)</Configuration>
<Configuration Condition="'$(Configuration)' == '' or '$(Configuration)' == 'debug'">Debug</Configuration>
<Configuration Condition="'$(Configuration)' == 'release'">Release</Configuration>
<Configuration Condition="'$(Configuration)' == 'checked'">Checked</Configuration>

<!-- Used by VS configuration manager. -->
<Configurations>Debug;Release;Checked</Configurations>
<Platforms>x64;x86;arm;arm64</Platforms>
</PropertyGroup>
<Import Project="..\..\Directory.Build.props" />

<!-- Ensure our properties are set before Arcade defines defaults -->
<Import Project="dir.common.props" />
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<!-- Setup Default symbol and optimization for Configuration -->
<PropertyGroup>
<!-- Ensure a portable PDB is emitted. A PDB is needed for crossgen. -->
<DebugType>Portable</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<Optimize Condition="'$(Optimize)' == ''">false</Optimize>
<DefineConstants>$(DefineConstants);DEBUG</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Checked'">
<Optimize Condition="'$(Optimize)' == ''">true</Optimize>
<DefineConstants>$(DefineConstants);DEBUG</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<Optimize Condition="'$(Optimize)' == ''">true</Optimize>
</PropertyGroup>

<!-- Setup properties per OS -->
<Choose>
<When Condition="'$(OSGroup)' == 'AnyOS'">
<PropertyGroup>
</PropertyGroup>
</When>
<When Condition="'$(OSGroup)' == 'Windows_NT'">
<PropertyGroup>
<!-- Since cross compilation of test builds on Windows is possible, the
TargetsWindows property may already be set. Only set the property if
it is not already defined -->
<TargetsWindows Condition="'$(TargetsWindows)' == ''">true</TargetsWindows>
<TestNugetRuntimeId>win-$(Platform)</TestNugetRuntimeId>
</PropertyGroup>
</When>
<When Condition="'$(OSGroup)' == 'Linux'">
<PropertyGroup>
<TargetsUnix>true</TargetsUnix>
<TargetsLinux>true</TargetsLinux>
<TestNugetRuntimeId>ubuntu.14.04-$(Platform)</TestNugetRuntimeId>
</PropertyGroup>
</When>
<When Condition="'$(OSGroup)' == 'OSX'">
<PropertyGroup>
<TargetsUnix>true</TargetsUnix>
<TargetsOSX>true</TargetsOSX>
<TestNugetRuntimeId>osx.10.12-$(Platform)</TestNugetRuntimeId>
</PropertyGroup>
</When>
<When Condition="'$(OSGroup)' == 'FreeBSD'">
<PropertyGroup>
<TargetsUnix>true</TargetsUnix>
<TargetsFreeBSD>true</TargetsFreeBSD>
<TestNugetRuntimeId>ubuntu.14.04-$(Platform)</TestNugetRuntimeId>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<ConfigurationErrorMsg>$(ConfigurationErrorMsg);Unknown OSGroup [$(OSGroup)] specificed in your project.</ConfigurationErrorMsg>
</PropertyGroup>
</Otherwise>
</Choose>

<!-- Set up common target properties that we use to conditionally include sources -->
<PropertyGroup>
<!-- We are only tracking Linux Distributions for Nuget RID mapping -->
<DistroRid Condition="'$(TargetsLinux)' == 'true'">$(__DistroRid)</DistroRid>

<TargetRid>$(__RuntimeId)</TargetRid>
<TargetRid Condition="'$(TargetRid)' == ''">$(TestNugetRuntimeId)</TargetRid>

<PropertyGroup Condition="'$(CopyrightNetFoundation)' != ''">
<Copyright>$(CopyrightNetFoundation)</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<!-- Folder for cross target components -->
<CrossTargetComponentFolder Condition="'$(Platform)' == 'arm64'">x64</CrossTargetComponentFolder>
<CrossTargetComponentFolder Condition="'$(Platform)' == 'arm' and '$(TargetsWindows)' == 'true'">x86</CrossTargetComponentFolder>
<CrossTargetComponentFolder Condition="'$(Platform)' == 'arm' and '$(TargetsLinux)' == 'true'">x64</CrossTargetComponentFolder>
</PropertyGroup>

<PropertyGroup>
<SignAssembly Condition="'$(UsingMicrosoftNETSdk)'!='true'">false</SignAssembly>
<OSPlatformConfig>$(OSGroup).$(Platform).$(Configuration)</OSPlatformConfig>

<BinDir>$(ArtifactsBinDir)coreclr\$(OSPlatformConfig)\</BinDir>
<SourceDir>$(MSBuildThisFileDirectory)src\</SourceDir>
<PackagesBinDir>$(BinDir).nuget\</PackagesBinDir>

<BaseRootOutputPath>$(BinDir)</BaseRootOutputPath>
<BaseOutputPath>$(BaseRootOutputPath)$(MSBuildProjectName)\</BaseOutputPath>
<OutputPath>$(BaseOutputPath)</OutputPath>
<BaseRootIntermediateOutputPath>$(ArtifactsObjDir)coreclr\$(OSPlatformConfig)\</BaseRootIntermediateOutputPath>
<BaseIntermediateOutputPath>$(BaseRootIntermediateOutputPath)$(MSBuildProjectName)\</BaseIntermediateOutputPath>
<IntermediateOutputPath>$(BaseIntermediateOutputPath)</IntermediateOutputPath>
</PropertyGroup>

<!--
The IL SDK adds a packagereference to the native ilasm package,
but does not detect musl or rhel, so we set the RID
ourselves. If we passed in a proper host RID from the build
scripts, we could also use that instead of relying on the IL
SDK RID detection.
-->
<PropertyGroup>
<CL_MPCount>$(NumberOfCores)</CL_MPCount>
<MicrosoftNetCoreIlasmPackageRuntimeId Condition=" '$(TargetRid)' == 'linux-musl-x64' ">$(TargetRid)</MicrosoftNetCoreIlasmPackageRuntimeId>
</PropertyGroup>

<PropertyGroup>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<CL_MPCount>$(NumberOfCores)</CL_MPCount>
<!-- Enables Strict mode for Roslyn compiler -->
<Features>strict;nullablePublicOnly</Features>
</PropertyGroup>

<Import Project="$(MSBuildThisFileDirectory)clr.featuredefines.props" />

</Project>
5 changes: 2 additions & 3 deletions src/coreclr/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Import Project="..\..\Directory.Build.targets" />

<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<Import Project="..\..\Directory.Build.targets" />

<PropertyGroup>
<!-- SDK sets product to assembly but we want it to be our product name -->
Expand All @@ -12,4 +10,5 @@
<InformationalVersion>$(ProductVersion)</InformationalVersion>
<InformationalVersion Condition="'$(VersionSuffix)' != ''">$(InformationalVersion)-$(VersionSuffix)</InformationalVersion>
</PropertyGroup>

</Project>
2 changes: 1 addition & 1 deletion src/coreclr/build-packages.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%eng\
-r -b -projects %__ProjectDir%src\.nuget\packages.builds^
-verbosity minimal /bl:%logFile% /nodeReuse:false^
/p:__BuildOS=Windows_NT^
/p:PortableBuild=true /p:FilterToOSGroup=Windows_NT^
/p:FilterToOSGroup=Windows_NT^
%__MSBuildArgs% %unprocessedArgs%

if NOT [!ERRORLEVEL!]==[0] (
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/build-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ logFile=$__RepoRootDir/artifacts/log/build-packages.binlog
$__RepoRootDir/eng/common/build.sh -r -b -projects $__ProjectRoot/src/.nuget/packages.builds \
-verbosity minimal -bl:$logFile \
/p:__BuildOS=$__BuildOS \
/p:PortableBuild=true /p:__DistroRid=$__DistroRid \
/p:__DistroRid=$__DistroRid \
$buildArgs $unprocessedBuildArgs
if [ $? -ne 0 ]
then
Expand Down
Loading