Skip to content
This repository was archived by the owner on Nov 1, 2020. It is now read-only.
Merged
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
6 changes: 3 additions & 3 deletions buildpipeline/DotNet-CoreRT-Publish.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\\$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\\$env:Configuration\\$env:AzureContainerSymbolPackageGlob `\n $env:Build_StagingDirectory\\IndexedSymbolPackages",
"workingFolder": "",
"failOnStandardError": "true"
}
Expand Down Expand Up @@ -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\\$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\\$env:Configuration\\$env:AzureContainerPackageGlob $ApiKey -Source $env:MyGetFeedUrl -Timeout 3600",
"workingFolder": "",
"failOnStandardError": "true"
}
Expand Down Expand Up @@ -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\\$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\\$env:Configuration\\$env:AzureContainerPackageGlob",
"workingFolder": "",
"failOnStandardError": "true"
}
Expand Down
2 changes: 1 addition & 1 deletion dir.props
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
<!-- Use the shared tools host and runtime for testing -->
<TestHostRootPath Condition="'$(TestHostRootPath)' == ''">$(DotnetCliPath)</TestHostRootPath>

<PackageOutputPath Condition="'$(PackageOutputPath)'==''">$(PackageOutputRoot)$(OSPlatformConfig)/</PackageOutputPath>
<PackageOutputPath Condition="'$(PackageOutputPath)'==''">$(PackageOutputRoot)$(BinDirConfiguration)/</PackageOutputPath>
<SymbolPackageOutputPath Condition="'$(SymbolPackageOutputPath)'==''">$(PackageOutputPath)symbols/</SymbolPackageOutputPath>

<!-- Folder where we will drop the Nuget package for the toolchain -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<?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>
<OSGroup>AnyOS</OSGroup>
</Project>

<!-- Include this to force a build of platform-specific packages-->
<Project Include="$(MSBuildThisFileDirectory)\TargetSpecific\Microsoft.DotNet.ILCompiler.pkgproj" />

</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,23 @@
<BaseLinePackageDependencies>false</BaseLinePackageDependencies>
<PackagePlatforms>x64;</PackagePlatforms>
<PreventImplementationReference>true</PreventImplementationReference>
<RestorePackages>true</RestorePackages>
<SkipValidatePackage>true</SkipValidatePackage>
<IncludeSymbolsInPackage Condition="'$(IncludeSymbolsInPackage)' == ''">true</IncludeSymbolsInPackage>

<!-- Mark this package as a lineup (meta-) package -->
<IsLineupPackage Condition="'$(IsLineupPackage)' == ''">true</IsLineupPackage>
<!-- Override this property so that the package name won't look like runtime.[RID].[TFM].[ID] -->
<PackageTargetRuntime></PackageTargetRuntime>
</PropertyGroup>

<ItemGroup>
<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>
<TargetPath>build</TargetPath>
</File>

<!-- Workaround to avoid linker warnings on Windows - include all pdb files for static native libraries -->
<File Condition="Exists('$(BaseOutputPath)\$(OSPlatformConfig)\sdk\bootstrapper.pdb')" Include="$(BaseOutputPath)\$(OSPlatformConfig)\sdk\bootstrapper.pdb">
<TargetPath>sdk</TargetPath>
</File>
<File Condition="Exists('$(BaseOutputPath)\$(OSPlatformConfig)\sdk\bootstrappercpp.pdb')" Include="$(BaseOutputPath)\$(OSPlatformConfig)\sdk\bootstrappercpp.pdb">
<TargetPath>sdk</TargetPath>
</File>
<File Condition="Exists('$(BaseOutputPath)\$(OSPlatformConfig)\sdk\bootstrapperdll.pdb')" Include="$(BaseOutputPath)\$(OSPlatformConfig)\sdk\bootstrapperdll.pdb">
<TargetPath>sdk</TargetPath>
</File>
<File Condition="Exists('$(BaseOutputPath)\$(OSPlatformConfig)\sdk\Runtime.pdb')" Include="$(BaseOutputPath)\$(OSPlatformConfig)\sdk\Runtime.pdb">
<TargetPath>sdk</TargetPath>
</File>
<File Condition="Exists('$(BaseOutputPath)\$(OSPlatformConfig)\sdk\PortableRuntime.pdb')" Include="$(BaseOutputPath)\$(OSPlatformConfig)\sdk\PortableRuntime.pdb">
<TargetPath>sdk</TargetPath>
<!-- This assembly is needed so the build tasks can be resolved and run from the metapackage -->
<File Include="$(BaseOutputPath)\$(OSPlatformConfig)\tools\\ILCompiler.Build.Tasks.dll" Exclude="$(BaseOutputPath)\$(OSPlatformConfig)\tools\*.pdb">
<TargetPath>tools</TargetPath>
</File>
</ItemGroup>

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />

<PropertyGroup>
<PackageTargetRuntime Condition="'$(OSGroup)' == 'Windows_NT'">win-x64</PackageTargetRuntime>
<PackageTargetRuntime Condition="'$(OSGroup)' == 'Linux'">linux-x64</PackageTargetRuntime>
<PackageTargetRuntime Condition="'$(OSGroup)' == 'OSX'">osx-x64</PackageTargetRuntime>
</PropertyGroup>

<!-- This target defines files and properties that need to be included in the package regardless of platform -->
<PropertyGroup>
<SkipPackageFileCheck>true</SkipPackageFileCheck>
<BaseLinePackageDependencies>false</BaseLinePackageDependencies>
<PackagePlatforms>x64;</PackagePlatforms>
<PreventImplementationReference>true</PreventImplementationReference>
<SkipValidatePackage>true</SkipValidatePackage>
<IncludeSymbolsInPackage Condition="'$(IncludeSymbolsInPackage)' == ''">true</IncludeSymbolsInPackage>
</PropertyGroup>

<ItemGroup>
<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\*">
<TargetPath>framework</TargetPath>
</File>
<!-- Workaround to avoid linker warnings on Windows - include all pdb files for static native libraries -->
<File Condition="Exists('$(BaseOutputPath)\$(OSPlatformConfig)\sdk\bootstrapper.pdb')" Include="$(BaseOutputPath)\$(OSPlatformConfig)\sdk\bootstrapper.pdb">
<TargetPath>sdk</TargetPath>
</File>
<File Condition="Exists('$(BaseOutputPath)\$(OSPlatformConfig)\sdk\bootstrappercpp.pdb')" Include="$(BaseOutputPath)\$(OSPlatformConfig)\sdk\bootstrappercpp.pdb">
<TargetPath>sdk</TargetPath>
</File>
<File Condition="Exists('$(BaseOutputPath)\$(OSPlatformConfig)\sdk\bootstrapperdll.pdb')" Include="$(BaseOutputPath)\$(OSPlatformConfig)\sdk\bootstrapperdll.pdb">
<TargetPath>sdk</TargetPath>
</File>
<File Condition="Exists('$(BaseOutputPath)\$(OSPlatformConfig)\sdk\Runtime.pdb')" Include="$(BaseOutputPath)\$(OSPlatformConfig)\sdk\Runtime.pdb">
<TargetPath>sdk</TargetPath>
</File>
<File Condition="Exists('$(BaseOutputPath)\$(OSPlatformConfig)\sdk\PortableRuntime.pdb')" Include="$(BaseOutputPath)\$(OSPlatformConfig)\sdk\PortableRuntime.pdb">
<TargetPath>sdk</TargetPath>
</File>
</ItemGroup>
<Target Name="GetPackageDependencies"/>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\src\dir.targets" />
</Project>
4 changes: 3 additions & 1 deletion src/BuildIntegration/BuildFrameworkNativeObjects.proj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
<BuildingFrameworkLibrary>true</BuildingFrameworkLibrary>
</PropertyGroup>

<Import Project="Microsoft.NETCore.Native.targets" />
<!-- Part of workaround for lack of secondary build artifact import - https://github.com/Microsoft/msbuild/issues/2807 -->
<Import Project="$(MSBuildThisFileDirectory)\Microsoft.DotNet.ILCompiler.targets" Condition="'$(IlcCalledViaPackage)' == 'true'"/>
<Import Project="Microsoft.NETCore.Native.targets" Condition="'$(IlcCalledViaPackage)' == ''"/>

<Target Name="BuildAllFrameworkLibraries"
Inputs="@(DefaultFrameworkAssemblies)"
Expand Down
32 changes: 32 additions & 0 deletions src/BuildIntegration/Microsoft.DotNet.ILCompiler.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<Project
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<DeployAppHost>false</DeployAppHost>

<!-- Part of workaround for lack of secondary build artifact import - https://github.com/Microsoft/msbuild/issues/2807 -->
<!-- Define the name of the runtime specific compiler package to import -->
<RuntimeIlcPackageName Condition="'$(RuntimeIdentifier)' != ''">runtime.$(RuntimeIdentifier).Microsoft.DotNet.ILCompiler</RuntimeIlcPackageName>
<IlcCalledViaPackage>true</IlcCalledViaPackage>

<!-- If CoreRT is being consumed via its package, runtime-specific properties must be set before compilation can proceed -->
<ImportRuntimeIlcPackageTargetDependsOn>RunResolvePackageDependencies</ImportRuntimeIlcPackageTargetDependsOn>
<IlcSetupPropertiesDependsOn>ImportRuntimeIlcPackageTarget</IlcSetupPropertiesDependsOn>
<IlcDynamicBuildPropertyDependencies>SetupProperties</IlcDynamicBuildPropertyDependencies>

</PropertyGroup>

<!-- Part of workaround for lack of secondary build artifact import - https://github.com/Microsoft/msbuild/issues/2807 -->
<!-- Locate the runtime package according to the current target runtime -->
<Target Name="ImportRuntimeIlcPackageTarget" Condition="'$(BuildingFrameworkLibrary)' != 'true' AND $(IlcCalledViaPackage) == 'true'" DependsOnTargets="$(ImportRuntimeIlcPackageTargetDependsOn)" BeforeTargets="Publish">
<!-- CoreRT SDK and Framework Assemblies need to be defined to avoid CoreCLR implementations being set as compiler inputs -->
<Error Condition="'@(PackageDefinitions)' == ''" Text="The PackageDefinitions ItemGroup is required for target ImportRuntimeIlcPackageTarget" />
<ItemGroup>
<RuntimePackage Include="@(PackageDefinitions)" Condition="'%(PackageDefinitions.Name)' == '$(RuntimeIlcPackageName)'" />
</ItemGroup>
<CreateProperty Value="%(RuntimePackage.ResolvedPath)">
<Output TaskParameter="Value" PropertyName="RuntimePackagePath"/>
</CreateProperty>
</Target>

<Import Project="$(MSBuildThisFileDirectory)\Microsoft.NETCore.Native.targets" />
</Project>
9 changes: 5 additions & 4 deletions src/BuildIntegration/Microsoft.NETCore.Native.Publish.targets
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<BuildTasksPath Condition="'$(BuildTasksPath)' == ''">$(MSBuildThisFileDirectory)..\tools\ILCompiler.Build.Tasks.dll</BuildTasksPath>
<IlcBuildTasksPath Condition="'$(IlcBuildTasksPath)' == ''">$(MSBuildThisFileDirectory)..\tools\ILCompiler.Build.Tasks.dll</IlcBuildTasksPath>

<!--
Prevent dotnet CLI from deploying the CoreCLR shim executable since we produce
Expand All @@ -11,7 +11,8 @@
</PropertyGroup>

<Target Name="_ComputeIlcCompileInputs"
BeforeTargets="ComputeIlcCompileInputs">
BeforeTargets="ComputeIlcCompileInputs"
DependsOnTargets="$(IlcDynamicBuildPropertyDependencies)">
<ItemGroup>
<IlcReference Include="@(_ManagedResolvedAssembliesToPublish)" />
</ItemGroup>
Expand Down Expand Up @@ -46,8 +47,8 @@
pipeline we don't want to see in the output (native images, CoreCLR artifacts)
until we get a proper AOT NetCore app package.
-->
<UsingTask TaskName="ComputeManagedAssemblies" AssemblyFile="$(BuildTasksPath)" />
<Target Name="_ComputeAssembliesToCompileToNative">
<UsingTask TaskName="ComputeManagedAssemblies" AssemblyFile="$(IlcBuildTasksPath)" />
<Target Name="_ComputeAssembliesToCompileToNative" DependsOnTargets="$(IlcDynamicBuildPropertyDependencies)">

<!-- CoreRT SDK and Framework Assemblies need to be defined to avoid CoreCLR implementations being set as compiler inputs -->
<Error Condition="'@(PrivateSdkAssemblies)' == ''" Text="The PrivateSdkAssemblies ItemGroup is required for _ComputeAssembliesToCompileToNative" />
Expand Down
Loading