Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebuild csc #51345

Merged
merged 8 commits into from
Feb 23, 2021
Merged

Rebuild csc #51345

merged 8 commits into from
Feb 23, 2021

Conversation

RikkiGibson
Copy link
Contributor

@RikkiGibson RikkiGibson commented Feb 19, 2021

Modifications to the rebuilder which enable us to build csc in the netcoreapp3.1 target. Additional changes related to copying over the win32 resources are needed to enable us to build the net472 target.

@RikkiGibson RikkiGibson marked this pull request as ready for review February 20, 2021 18:30
@RikkiGibson RikkiGibson requested review from a team as code owners February 20, 2021 18:30
" --debugPath `"$ArtifactsDir/BuildValidator`"" +
" --sourcePath `"$RepoRoot`"" +
" --referencesPath `"$ArtifactsDir/bin`"" +
" --referencesPath `"$dotnetInstallDir/packs/Microsoft.AspNetCore.App.Ref`"" +
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extracting these folders out to command line arguments was necessary to build on Helix agents where dotnet is typically not found under C:\Program Files\dotnet.

@@ -88,7 +88,10 @@ void logResolvedSources()
{
var sourceFileInfo = resolvedSource.SourceFileInfo;
var hash = BitConverter.ToString(sourceFileInfo.Hash).Replace("-", "");
_logger.LogInformation($@"""{resolvedSource.DisplayPath}"" - {sourceFileInfo.HashAlgorithm} - {hash}");
var embeddedCompressedHash = sourceFileInfo.EmbeddedCompressedHash is { } compressedHash
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was needed to verify that compression of embedded sources was producing equivalent results in the rebuild.

@@ -141,6 +146,26 @@ private CompilationDiff(ImmutableArray<Diagnostic> diagnostics, string originalP
writeVisualization(originalPeMdvPath, optionsReader.PeReader.GetMetadataReader());
writeVisualization(originalPdbMdvPath, optionsReader.PdbReader);

var originalPdbXmlPath = Path.Combine(originalPath, assemblyName + ".pdb.xml");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This didn't end up helping in practice, but using pdb2xml was an attempt to determine if PDB differences were "significant" versus being merely differences of the offsets of various resources in the assembly.

It could help in the future, so I'd like to leave it here unless it introduces a problem.

@@ -215,7 +215,8 @@ jobs:

- job: Correctness_Rebuild
pool:
vmImage: windows-2019
name: NetCorePublic-Pool
queue: BuildPool.Windows.10.Amd64.Open
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What motivated this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this pool is faster.

azure-pipelines.yml Outdated Show resolved Hide resolved
eng/test-rebuild.ps1 Outdated Show resolved Hide resolved
RikkiGibson and others added 2 commits February 22, 2021 13:00
Co-authored-by: Jared Parsons <jaredpparsons@gmail.com>
@@ -333,7 +333,7 @@ function Make-BootstrapBuild([switch]$force32 = $false) {

Run-MSBuild $projectPath "/restore /t:Pack /p:RoslynEnforceCodeStyle=false /p:RunAnalyzersDuringBuild=false /p:DotNetUseShippingVersions=true /p:InitialDefineConstants=BOOTSTRAP /p:PackageOutputPath=`"$dir`" /p:EnableNgenOptimization=false /p:PublishWindowsPdb=false $force32Flag" -logFileName "Bootstrap" -configuration $bootstrapConfiguration -runAnalyzers
$packageFile = Get-ChildItem -Path $dir -Filter "$packageName.*.nupkg"
Unzip (Join-Path $dir $packageFile) $dir
Unzip (Join-Path $dir $packageFile.Name) $dir
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change makes the script work on both Windows PowerShell and PowerShell Core.

@RikkiGibson RikkiGibson merged commit aabac7a into dotnet:master Feb 23, 2021
@ghost ghost added this to the Next milestone Feb 23, 2021
@RikkiGibson RikkiGibson deleted the rebuild-csc branch February 24, 2021 22:07
@allisonchou allisonchou modified the milestones: Next, 16.10.P2 Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants