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

Remove Crossgen2's -O option in Test Builds Wherever Possible #89223

Merged
merged 8 commits into from
Aug 1, 2023
1 change: 0 additions & 1 deletion src/coreclr/crossgen-corelib.proj
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@
<CrossGenDllCmd>$(CrossGenDllCmd) --targetarch:$(TargetArchitecture)</CrossGenDllCmd>
<CrossGenDllCmd>$(CrossGenDllCmd) --targetos:$(TargetOS)</CrossGenDllCmd>
<CrossGenDllCmd Condition="'$(UsingToolIbcOptimization)' != 'true' and '$(EnableNgenOptimization)' == 'true'">$(CrossGenDllCmd) -m:$(MergedMibcPath) --embed-pgo-data</CrossGenDllCmd>
<CrossGenDllCmd>$(CrossGenDllCmd) -O</CrossGenDllCmd>
<CrossGenDllCmd Condition="'$(Configuration)' == 'Debug' or '$(Configuration)' == 'Checked'">$(CrossGenDllCmd) --verify-type-and-field-layout</CrossGenDllCmd>
<CrossGenDllCmd>$(CrossGenDllCmd) @(CoreLib)</CrossGenDllCmd>
</PropertyGroup>
Expand Down
2 changes: 0 additions & 2 deletions src/tasks/Crossgen2Tasks/RunReadyToRunCompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,6 @@ private string GenerateCrossgen2ResponseFile()
result.AppendLine($"--targetarch:{Crossgen2Tool.GetMetadata(MetadataKeys.TargetArch)}");
}

result.AppendLine("-O");

// 5.0 Crossgen2 doesn't support PDB generation.
if (!Crossgen2IsVersion5 && _emitSymbols)
{
Expand Down
4 changes: 1 addition & 3 deletions src/tests/Common/CLRTest.CrossGen.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
***********************************************************************************************
CLRTest.Execute.targets
CLRTest.CrossGen.targets

WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
Expand Down Expand Up @@ -113,7 +113,6 @@ if [ ! -z ${RunCrossGen2+x} ]%3B then
fi
echo --targetarch:$(TargetArchitecture)>>$__ResponseFile
echo --targetos:$(TargetOS)>>$__ResponseFile
echo -O>>$__ResponseFile

echo "Response file: $__ResponseFile"
cat $__ResponseFile
Expand Down Expand Up @@ -263,7 +262,6 @@ if defined RunCrossGen2 (
echo -r:!CORE_ROOT!\xunit.*.dll>>!__ResponseFile!
echo -r:!CORE_ROOT!\mscorlib.dll>>!__ResponseFile!
echo -r:!CORE_ROOT!\netstandard.dll>>!__ResponseFile!
echo -O>>!__ResponseFile!

if not "$(__CreatePdb)" == "" (
echo --pdb>>!__ResponseFile!
Expand Down
1 change: 0 additions & 1 deletion src/tests/Common/scripts/crossgen2_comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,6 @@ def _build_args_crossgen_il_file(self, il_filename, ni_filename, platform_assemb
args.append(self.crossgen_executable_filename)
args.append('-r')
args.append('"' + platform_assemblies_paths + self.platform_directory_sep + '*.dll"' )
args.append('-O')
args.append('--determinism-stress')
args.append('6')
args.append('--map')
Expand Down