diff options
author | Andon Andonov <andon.andonov@microsoft.com> | 2017-12-05 06:29:10 +0300 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2017-12-05 06:29:10 +0300 |
commit | a35d222bc2b2cbd7041d88f452dcb98459d6cc5f (patch) | |
tree | 8050a7087a731d3e89ae31cc658b7604b0315a69 | |
parent | 59d386d036fe9974bbbe9930ba34bcf190b2a33e (diff) |
ILCompiler nuget package support (#4983)
-rw-r--r-- | buildpipeline/DotNet-CoreRT-Publish.json | 6 | ||||
-rw-r--r-- | dir.props | 2 | ||||
-rw-r--r-- | pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.builds | 12 | ||||
-rw-r--r-- | pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.pkgproj | 56 | ||||
-rw-r--r-- | pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.targets | 7 | ||||
-rw-r--r-- | pkg/packageIndex.json | 4 | ||||
-rw-r--r-- | pkg/packages.proj | 12 | ||||
-rw-r--r-- | src/BuildIntegration/Microsoft.NETCore.Native.targets | 3 |
8 files changed, 71 insertions, 31 deletions
diff --git a/buildpipeline/DotNet-CoreRT-Publish.json b/buildpipeline/DotNet-CoreRT-Publish.json index c0b3486bc..ed451610e 100644 --- a/buildpipeline/DotNet-CoreRT-Publish.json +++ b/buildpipeline/DotNet-CoreRT-Publish.json @@ -94,7 +94,7 @@ "scriptType": "inlineScript", "scriptName": "", "arguments": "", - "inlineScript": "if ($env:Configuration -ne \"Release\") { exit }\n\n& $env:Build_SourcesDirectory\\scripts\\DotNet-Trusted-Publish\\Embed-Index.ps1 `\n $env:Pipeline_SourcesDirectory\\packages\\AzureTransfer\\Windows_NT.x64.$env:Configuration\\Microsoft.TargetingPack.Private.CoreRT\\$env:AzureContainerSymbolPackageGlob `\n $env:Build_StagingDirectory\\IndexedSymbolPackages", + "inlineScript": "if ($env:Configuration -ne \"Release\") { exit }\n\n& $env:Build_SourcesDirectory\\scripts\\DotNet-Trusted-Publish\\Embed-Index.ps1 `\n $env:Pipeline_SourcesDirectory\\packages\\AzureTransfer\\Windows_NT.x64.$env:Configuration\\$env:AzureContainerSymbolPackageGlob `\n $env:Build_StagingDirectory\\IndexedSymbolPackages", "workingFolder": "", "failOnStandardError": "true" } @@ -152,7 +152,7 @@ "scriptType": "inlineScript", "scriptName": "", "arguments": "$(MyGetApiKey)", - "inlineScript": "param($ApiKey)\nif ($env:Configuration -ne \"Release\") { exit }\n& $env:CustomNuGetPath push $env:Pipeline_SourcesDirectory\\packages\\AzureTransfer\\Windows_NT.x64.$env:Configuration\\Microsoft.TargetingPack.Private.CoreRT\\$env:AzureContainerPackageGlob $ApiKey -Source $env:MyGetFeedUrl -Timeout 3600", + "inlineScript": "param($ApiKey)\nif ($env:Configuration -ne \"Release\") { exit }\n& $env:CustomNuGetPath push $env:Pipeline_SourcesDirectory\\packages\\AzureTransfer\\Windows_NT.x64.$env:Configuration\\$env:AzureContainerPackageGlob $ApiKey -Source $env:MyGetFeedUrl -Timeout 3600", "workingFolder": "", "failOnStandardError": "true" } @@ -192,7 +192,7 @@ "scriptType": "inlineScript", "scriptName": "", "arguments": "-gitHubAuthToken $(UpdatePublishedVersions.AuthToken) -root $(Pipeline.SourcesDirectory)", - "inlineScript": "param($gitHubAuthToken, $root)\nif ($env:Configuration -ne \"Release\") { exit }\ncd $root\n. $root\\buildscripts\\UpdatePublishedVersions.ps1 `\n -gitHubUser dotnet-build-bot -gitHubEmail dotnet-build-bot@microsoft.com `\n -gitHubAuthToken $gitHubAuthToken `\n -versionsRepoOwner $env:VersionsRepoOwner -versionsRepo $env:VersionsRepo `\n -versionsRepoPath build-info/dotnet/$env:GitHubRepositoryName/$env:SourceBranch `\n -nupkgPath $root\\packages\\AzureTransfer\\Windows_NT.x64.$env:Configuration\\Microsoft.TargetingPack.Private.CoreRT\\$env:AzureContainerPackageGlob", + "inlineScript": "param($gitHubAuthToken, $root)\nif ($env:Configuration -ne \"Release\") { exit }\ncd $root\n. $root\\buildscripts\\UpdatePublishedVersions.ps1 `\n -gitHubUser dotnet-build-bot -gitHubEmail dotnet-build-bot@microsoft.com `\n -gitHubAuthToken $gitHubAuthToken `\n -versionsRepoOwner $env:VersionsRepoOwner -versionsRepo $env:VersionsRepo `\n -versionsRepoPath build-info/dotnet/$env:GitHubRepositoryName/$env:SourceBranch `\n -nupkgPath $root\\packages\\AzureTransfer\\Windows_NT.x64.$env:Configuration\\$env:AzureContainerPackageGlob", "workingFolder": "", "failOnStandardError": "true" } @@ -135,7 +135,7 @@ <!-- Use the shared tools host and runtime for testing --> <TestHostRootPath Condition="'$(TestHostRootPath)' == ''">$(DotnetCliPath)</TestHostRootPath> - <PackageOutputPath Condition="'$(PackageOutputPath)'==''">$(PackageOutputRoot)$(OSPlatformConfig)/$(MSBuildProjectName)/</PackageOutputPath> + <PackageOutputPath Condition="'$(PackageOutputPath)'==''">$(PackageOutputRoot)$(OSPlatformConfig)/</PackageOutputPath> <SymbolPackageOutputPath Condition="'$(SymbolPackageOutputPath)'==''">$(PackageOutputPath)symbols/</SymbolPackageOutputPath> <!-- Folder where we will drop the Nuget package for the toolchain --> diff --git a/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.builds b/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.builds new file mode 100644 index 000000000..841203881 --- /dev/null +++ b/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.builds @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> + <ItemGroup> + <Project Include="Microsoft.DotNet.ILCompiler.pkgproj" > + <OSGroup>Windows_NT</OSGroup> + <OSGroup>Linux</OSGroup> + <OSGroup>Mac</OSGroup> + </Project> + </ItemGroup> + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" /> +</Project> diff --git a/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.pkgproj b/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.pkgproj index 03098cb7c..b437e405c 100644 --- a/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.pkgproj +++ b/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.pkgproj @@ -1,37 +1,49 @@ <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> <PropertyGroup> - <PackageTargetRuntime/> - </PropertyGroup> - - <PropertyGroup> <SkipPackageFileCheck>true</SkipPackageFileCheck> <BaseLinePackageDependencies>false</BaseLinePackageDependencies> <PackagePlatforms>x64;</PackagePlatforms> <PreventImplementationReference>true</PreventImplementationReference> <SkipValidatePackage>true</SkipValidatePackage> + <IncludeSymbolsInPackage Condition="'$(IncludeSymbolsInPackage)' == ''">true</IncludeSymbolsInPackage> + <!-- Override this property so that the package name won't look like runtime.[RID].[TFM].[ID] --> + <PackageTargetRuntime></PackageTargetRuntime> </PropertyGroup> - <ItemGroup> - <ProjectReference Include="$(PackageSourceDirectory)ILCompiler\src\ILCompiler.csproj"/> - <ProjectReference Include="$(PackageSourceDirectory)ILCompiler.Compiler\src\ILCompiler.Compiler.csproj"/> - <ProjectReference Include="$(PackageSourceDirectory)ILCompiler.DependencyAnalysisFramework\src\ILCompiler.DependencyAnalysisFramework.csproj"/> - <ProjectReference Include="$(PackageSourceDirectory)ILCompiler.MetadataTransform\src\ILCompiler.MetadataTransform.csproj"/> - <ProjectReference Include="$(PackageSourceDirectory)ILCompiler.MetadataWriter\src\ILCompiler.MetadataWriter.csproj"/> - <ProjectReference Include="$(PackageSourceDirectory)ILCompiler.TypeSystem\src\ILCompiler.TypeSystem.csproj"/> - - <Dependency Include="Microsoft.DotNet.ObjectWriter"> - <Version>1.0.13-prerelease-00001</Version> - </Dependency> - <Dependency Include="Microsoft.NetCore.Jit"> - <Version>1.2.0-beta-24815-03</Version> - </Dependency> - <Dependency Include="System.Collections.Immutable"> - <Version>1.2.0</Version> - </Dependency> - + <File Include="$(MSBuildThisFileDirectory)\Microsoft.DotNet.ILCompiler.targets" > + <TargetPath>build</TargetPath> + </File> + <File Include="$(PackageSourceDirectory)\BuildIntegration\*"> + <TargetPath>targets</TargetPath> + </File> + <File Include="$(BaseOutputPath)\$(OSPlatformConfig)\tools\*" Exclude="$(BaseOutputPath)\$(OSPlatformConfig)\tools\*.pdb"> + <TargetPath>tools</TargetPath> + </File> + <File Include="$(BaseOutputPath)\$(OSPlatformConfig)\sdk\*" Exclude="$(BaseOutputPath)\$(OSPlatformConfig)\sdk\*.pdb"> + <TargetPath>sdk</TargetPath> + </File> + <File Include="$(BaseOutputPath)\$(OSPlatformConfig)\framework\*.dll"> + <TargetPath>framework</TargetPath> + </File> + <!-- Workaround to avoid linker warnings - include all pdb files for static native libraries --> + <File Include="$(BaseOutputPath)\$(OSPlatformConfig)\sdk\bootstrapper.pdb"> + <TargetPath>sdk</TargetPath> + </File> + <File Include="$(BaseOutputPath)\$(OSPlatformConfig)\sdk\bootstrappercpp.pdb"> + <TargetPath>sdk</TargetPath> + </File> + <File Include="$(BaseOutputPath)\$(OSPlatformConfig)\sdk\bootstrapperdll.pdb"> + <TargetPath>sdk</TargetPath> + </File> + <File Include="$(BaseOutputPath)\$(OSPlatformConfig)\sdk\Runtime.pdb"> + <TargetPath>sdk</TargetPath> + </File> + <File Include="$(BaseOutputPath)\$(OSPlatformConfig)\sdk\PortableRuntime.pdb"> + <TargetPath>sdk</TargetPath> + </File> </ItemGroup> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\src\dir.targets" /> diff --git a/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.targets b/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.targets new file mode 100644 index 000000000..28e6f9aa7 --- /dev/null +++ b/pkg/Microsoft.DotNet.ILCompiler/Microsoft.DotNet.ILCompiler.targets @@ -0,0 +1,7 @@ +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <_ILCompilerRootDir>$(MSBuildThisFileDirectory)../</_ILCompilerRootDir> + <IlCompilerTargetsDir>$(_ILCompilerRootDir)targets/</IlCompilerTargetsDir> + </PropertyGroup> + <Import Project="$(IlCompilerTargetsDir)/Microsoft.NETCore.Native.targets"/> +</Project> diff --git a/pkg/packageIndex.json b/pkg/packageIndex.json index 1b47ad468..f1839ab66 100644 --- a/pkg/packageIndex.json +++ b/pkg/packageIndex.json @@ -4,6 +4,10 @@ "StableVersions": [], "BaselineVersion": "1.0.0", }, + "Microsoft.DotNet.ILCompiler" : { + "StableVersions": [], + "BaselineVersion": "1.0.0", + }, "Microsoft.TargetingPack.Private.CoreRT" : { "StableVersions": [], "BaselineVersion": "1.0.0", diff --git a/pkg/packages.proj b/pkg/packages.proj index 80f05e92f..83764c693 100644 --- a/pkg/packages.proj +++ b/pkg/packages.proj @@ -1,18 +1,20 @@ <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> - + <PropertyGroup> <PackageReportDir Condition="'$(PackageReportDir)' == ''">$(BinDir)pkg/reports/</PackageReportDir> <BuildAllOSGroups Condition="'$(FilterToOSGroup)' != ''">false</BuildAllOSGroups> </PropertyGroup> - <ItemGroup> - <Project Include="$(MSBuildThisFileDirectory)Microsoft.TargetingPack.Private.CoreRT\Microsoft.TargetingPack.Private.CoreRT.builds" Condition="'$(SkipManagedPackageBuild)' != 'true'"> + <ItemGroup Condition="'$(SkipManagedPackageBuild)' != 'true'"> + <Project Include="$(MSBuildThisFileDirectory)Microsoft.TargetingPack.Private.CoreRT\Microsoft.TargetingPack.Private.CoreRT.builds"> + <OSGroup>AnyOS</OSGroup> + </Project> + <Project Include="$(MSBuildThisFileDirectory)Microsoft.DotNet.ILCompiler\Microsoft.DotNet.ILCompiler.builds"> <OSGroup>AnyOS</OSGroup> </Project> - <Project Include="$(MSBuildThisFileDirectory)Microsoft.DotNet.ILCompiler\Microsoft.DotNet.ILCompiler.pkgproj" Condition="'$(SkipManagedPackageBuild)' != 'true'"/> </ItemGroup> - + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" /> </Project> diff --git a/src/BuildIntegration/Microsoft.NETCore.Native.targets b/src/BuildIntegration/Microsoft.NETCore.Native.targets index 5489fbbc5..20065cdc8 100644 --- a/src/BuildIntegration/Microsoft.NETCore.Native.targets +++ b/src/BuildIntegration/Microsoft.NETCore.Native.targets @@ -22,7 +22,10 @@ See the LICENSE file in the project root for more information. <NativeCompilationDuringPublish Condition="'$(NativeCompilationDuringPublish)' == ''">true</NativeCompilationDuringPublish> <!-- Workaround for lack of current host OS detection - https://github.com/Microsoft/msbuild/issues/539 --> <TargetOS Condition="'$(TargetOS)' == '' and '$(OS)' == 'Unix' and Exists('/Applications')">OSX</TargetOS> + <!-- The correct OS detection code. Uncomment once CI machines are upgraded to the latest version of MSBuild --> + <!-- <TargetOS Condition="'$([MSBuild]::IsOSPlatform(OSX))' == 'true'">OSX</TargetOS> --> <TargetOS Condition="'$(TargetOS)' == ''">$(OS)</TargetOS> + <IlcPath Condition="'$(IlcPath)' == ''"> $(MSBuildThisFileDirectory)/.. </IlcPath> </PropertyGroup> <PropertyGroup> |