Skip to content

Commit

Permalink
Add llvm-project to source-build. (#14184) (#14314)
Browse files Browse the repository at this point in the history
* Add llvm-project to source-build.

* Add repo references to llvm-project.

* Add source-build metadata.

* Upgrade CI to CentOS Stream 8.

* Fix the image name in the right place.

* Patch llvm to use an MS.Build.Traversal that we have.

* Add backport PR to patch.

* Revert "Upgrade CI to CentOS Stream 8."

This reverts commit 6bc2754.

* Update to avoid new MSBuild warning that causes build failure.

* We use code out of the LLVM directory.  Copy the license file from there to the root to satisfy the license checker.

* Add SourceBuild.props to llvm.

* Update patches with backport PR pointers.
  • Loading branch information
crummel authored Aug 19, 2022
1 parent 475a85f commit 84d26a0
Show file tree
Hide file tree
Showing 10 changed files with 406 additions and 5 deletions.
5 changes: 5 additions & 0 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
<Uri>https://github.com/dotnet/windowsdesktop</Uri>
<Sha>d5046afdd2d0e6234ae3fc5bd4ae878594079cc7</Sha>
</Dependency>
<Dependency Name="runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter" Version="1.0.0-alpha.1.22364.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/llvm-project</Uri>
<Sha>75e182c26dbf5d9f8ccca0ac68ee63b0bebb17b8</Sha>
<SourceBuildTarball RepoName="llvm-project" ManagedOnly="true" />
</Dependency>
<Dependency Name="VS.Redist.Common.NetCore.SharedFramework.x64.7.0" Version="7.0.0-rc.1.22411.12" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>f52d8c59bb49360eb2cbeeb863c5856ebd62adda</Sha>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ parameters:

# The following parameters aren't expected to be passed in rather they are used for encapsulation
# -----------------------------------------------------------------------------------------------
centOS7Container: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-source-build-20210714125450-5d87b80
centOSStream8Container: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8-20220809204800-17a4aab
centOS8Container: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-8-source-build-20211118190102-9355e7b
centOSStream9Container: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9-20220107135047-4cd394c
debian9Container: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-stretch-20211001171226-047508b
Expand All @@ -38,16 +38,16 @@ jobs:
excludeSdkContentTests: true
installerBuildResourceId: ${{ parameters.installerBuildResourceId }}
matrix:
CentOS7-Online:
CentOSStream8-Online:
_BootstrapPrep: false
_Container: ${{ parameters.centOS7Container }}
_Container: ${{ parameters.centOSStream8Container }}
_EnablePoison: false
_ExcludeOmniSharpTests: true
_RunOnline: true
${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
CentOS7-Offline:
CentOSStream8-Offline:
_BootstrapPrep: false
_Container: ${{ parameters.centOS7Container }}
_Container: ${{ parameters.centOSStream8Container }}
_EnablePoison: false
_ExcludeOmniSharpTests: true
_RunOnline: false
Expand Down
1 change: 1 addition & 0 deletions src/SourceBuild/tarball/content/repos/known-good.proj
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<!-- Tier 1 -->
<RepositoryReference Include="command-line-api" />
<RepositoryReference Include="diagnostics" />
<RepositoryReference Include="llvm-project" />
<RepositoryReference Include="razor-compiler" />
<RepositoryReference Include="roslyn" />
<RepositoryReference Include="source-build-externals" />
Expand Down
21 changes: 21 additions & 0 deletions src/SourceBuild/tarball/content/repos/llvm-project.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />

<PropertyGroup>
<BuildCommand>$(ProjectDirectory)build$(ShellExtension) $(StandardSourceBuildArgs)</BuildCommand>

<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
<OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
</PropertyGroup>

<ItemGroup>
<RepositoryReference Include="arcade" />
</ItemGroup>

<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
</ItemGroup>

<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<ItemGroup>
<RepositoryReference Include="arcade" />
<RepositoryReference Include="linker" />
<RepositoryReference Include="llvm-project" />
<RepositoryReference Include="source-build-externals" />
<RepositoryReference Include="roslyn" />
</ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/SourceBuild/tarball/content/repos/runtime.proj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<RepositoryReference Include="arcade" />
<RepositoryReference Include="symreader" />
<RepositoryReference Include="linker" />
<RepositoryReference Include="llvm-project" />
<RepositoryReference Include="source-build-externals" />
<RepositoryReference Include="roslyn" />
<RepositoryReference Include="runtime-portable" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Chris Rummel <[email protected]>
Date: Wed, 10 Aug 2022 13:44:31 -0500
Subject: [PATCH] Upgrade to an MS.Build.Traversal version we have a ref
package for.

Backport PR is https://github.com/dotnet/llvm-project/pull/241.

---
global.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/global.json b/global.json
index df77e9a199d6..19b99be1f71b 100644
--- a/global.json
+++ b/global.json
@@ -5,6 +5,6 @@
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22367.1",
"Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22367.1",
- "Microsoft.Build.Traversal": "2.0.2"
+ "Microsoft.Build.Traversal": "2.0.34"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Chris Rummel <[email protected]>
Date: Wed, 10 Aug 2022 21:30:49 -0500
Subject: [PATCH] Update for new MSBuild warning.

Backport PR: https://github.com/dotnet/llvm-project/pull/241.

---
nuget/packages.builds | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nuget/packages.builds b/nuget/packages.builds
index a4d2bc03d454..85d860081e53 100644
--- a/nuget/packages.builds
+++ b/nuget/packages.builds
@@ -31,7 +31,7 @@
<ItemGroup>
<!-- Pass the FileVersion calculated by _InitializeAssemblyVersion to referenced projects -->
<ProjectReference Update="@(ProjectReference)"
- AdditionalProperties="%(AdditionalProperties);FileVersion=$(FileVersion)" />
+ AdditionalProperties="%(ProjectReference.AdditionalProperties);FileVersion=$(FileVersion)" />
</ItemGroup>
</Target>
</Project>
Loading

0 comments on commit 84d26a0

Please sign in to comment.