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

Copy published crossgen2 in artifacts/tests #80154

Merged
merged 52 commits into from
Aug 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
948f3d8
Copy published crossgen2 in artifacts/tests
am11 Apr 3, 2023
472a2e4
Merge branch 'main' into feature/tests/published-crossgen2
am11 Apr 18, 2023
2a98bc1
Merge dotnet/main into feature/tests/published-crossgen2
am11 Aug 29, 2023
2687e51
Delete --nometadatablocking workaround
am11 Aug 29, 2023
7b8631e
Merge branch 'main' into feature/tests/published-crossgen2
am11 Jan 22, 2024
2dec281
Resolve merge conflicts
am11 Jan 23, 2024
b9d3c25
Update src/tests/Common/Directory.Build.targets
am11 Jan 23, 2024
98df15d
Merge branch 'main' into feature/tests/published-crossgen2
am11 Feb 27, 2024
0458af4
Build crossgen2_publish and enable arm AOT
am11 Feb 27, 2024
f01dac6
Pass NativeAotSupported
am11 Feb 27, 2024
2488e46
Skip apphost when PublishAot set
am11 Feb 27, 2024
00689c8
Merge dotnet/main into feature/tests/published-crossgen2
am11 Apr 17, 2024
f07d980
Address CR feedback
am11 Apr 17, 2024
7c45ab8
Merge branch 'main' into feature/tests/published-crossgen2
am11 Apr 17, 2024
7ccd4d8
Update crossgen2_publish.csproj
am11 Apr 17, 2024
0e059b3
Add `alpine` to target triplet for crossbuild
am11 Apr 17, 2024
1391809
Update Microsoft.NETCore.Native.Unix.targets
am11 Apr 17, 2024
31f6693
Use_OrNotToUse_AppHost
am11 Apr 18, 2024
7f14b61
Update src/coreclr/tools/aot/crossgen2/crossgen2_publish.csproj
am11 Apr 18, 2024
6563640
Merge branch 'main' into feature/tests/published-crossgen2
am11 Apr 18, 2024
3683999
.
am11 Apr 18, 2024
aece0d5
Update src/coreclr/tools/aot/crossgen2/crossgen2_publish.csproj
am11 Apr 18, 2024
d4c5e6f
Revert apphost experiment
am11 Apr 18, 2024
4ef28bc
Split <MSBuild> task invocation for restore/publish
am11 Apr 18, 2024
f3dbd75
Update src/tests/Common/Directory.Build.targets
am11 Apr 19, 2024
ea688c8
Update src/tests/Common/Directory.Build.targets
am11 Apr 19, 2024
734199f
Merge branch 'main' into feature/tests/published-crossgen2
am11 Apr 19, 2024
2a41ca0
revert
am11 Apr 19, 2024
f443875
Merge branch 'main' into feature/tests/published-crossgen2
am11 Aug 15, 2024
a0bee39
Simplify Crossgen2Runner
am11 Aug 15, 2024
39ea8f8
Add missing overrides
am11 Aug 15, 2024
def8aa2
Account for new properties
am11 Aug 15, 2024
463213e
Require apphost in non-Aot branch
am11 Aug 15, 2024
aa47096
Keep requiring apphost
am11 Aug 16, 2024
9dc7214
Manually copy apphost to crossgen2 obj dir
am11 Aug 17, 2024
84e1abe
Merge dotnet/main into feature/tests/published-crossgen2
am11 Aug 17, 2024
0d2a34a
Fix paths
am11 Aug 17, 2024
76d1b9e
Account for tools configurations
am11 Aug 18, 2024
f1331dc
Remove redundant double quotes
am11 Aug 18, 2024
feb1eaf
Update src/tests/Common/CLRTest.CrossGen.targets
am11 Aug 19, 2024
06637f5
Update src/tests/Common/CLRTest.CrossGen.targets
am11 Aug 19, 2024
93e78e9
Update src/tests/Common/CLRTest.CrossGen.targets
am11 Aug 19, 2024
804406f
Update src/tests/Common/CLRTest.CrossGen.targets
am11 Aug 19, 2024
a9e539b
Update src/tests/Common/CLRTest.CrossGen.targets
am11 Aug 19, 2024
9c64604
Merge branch 'main' into feature/tests/published-crossgen2
am11 Aug 20, 2024
c1a6883
Keep defining __DotNet
am11 Aug 22, 2024
dd8d9bc
Merge branch 'main' into feature/tests/published-crossgen2
am11 Aug 22, 2024
2065108
dummy change in jit
am11 Aug 22, 2024
592865b
revert dummy change
am11 Aug 23, 2024
6481ee4
Merge branch 'main' into feature/tests/published-crossgen2
am11 Aug 23, 2024
fcc3e9f
Use coreroot in CrossgenFramework target
am11 Aug 23, 2024
2324602
Support cross CG2 which is not running on helix
am11 Aug 24, 2024
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
2 changes: 1 addition & 1 deletion eng/pipelines/common/templates/runtimes/run-test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ jobs:
# Compose the Core_Root folder containing all artifacts needed for running
# CoreCLR tests. This step also compiles the framework using Crossgen2
# in ReadyToRun jobs.
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) generatelayoutonly $(logRootNameArg)Layout $(runtimeFlavorArgs) $(crossgenArg) $(buildConfig) $(archType) $(crossArg) $(priorityArg) $(librariesOverrideArg) $(runtimeVariantArg)
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) generatelayoutonly $(logRootNameArg)Layout $(runtimeFlavorArgs) $(crossgenArg) $(buildConfig) $(archType) $(crossArg) $(priorityArg) $(librariesOverrideArg) $(runtimeVariantArg) -ci
displayName: Generate CORE_ROOT

# Build a Mono LLVM AOT cross-compiler for non-amd64 targets (in this case, just arm64)
Expand Down
15 changes: 4 additions & 11 deletions src/coreclr/scripts/superpmi.py
Original file line number Diff line number Diff line change
Expand Up @@ -693,14 +693,6 @@ def __init__(self, coreclr_args):
self.pmi_location = determine_pmi_location(coreclr_args)
self.corerun = os.path.join(self.core_root, self.corerun_tool_name)

if coreclr_args.crossgen2:
self.corerun = os.path.join(self.core_root, self.corerun_tool_name)
if coreclr_args.dotnet_tool_path is None:
self.crossgen2_driver_tool = self.corerun
else:
self.crossgen2_driver_tool = coreclr_args.dotnet_tool_path
logging.debug("Using crossgen2 driver tool %s", self.crossgen2_driver_tool)

if coreclr_args.pmi or coreclr_args.crossgen2:
self.assemblies = coreclr_args.assemblies
self.exclude = coreclr_args.exclude
Expand Down Expand Up @@ -1066,7 +1058,7 @@ async def run_crossgen2(print_prefix, assembly, self):
#
# invoke with:
#
# dotnet <Core_Root>\crossgen2\crossgen2.dll @<temp.rsp>
# <Core_Root>\crossgen2\crossgen2.exe @<temp.rsp>
#
# where "dotnet" is one of:
# 1. <runtime_root>\dotnet.cmd/sh
Expand All @@ -1089,7 +1081,7 @@ async def run_crossgen2(print_prefix, assembly, self):
# Log what is in the response file
write_file_to_log(rsp_filepath)

command = [self.crossgen2_driver_tool, self.coreclr_args.crossgen2_tool_path, "@" + rsp_filepath]
command = [self.coreclr_args.crossgen2_tool_path, "@" + rsp_filepath]
command_string = " ".join(command)
logging.debug("%s%s", print_prefix, command_string)

Expand Down Expand Up @@ -4913,7 +4905,8 @@ def verify_base_diff_args():

if coreclr_args.crossgen2:
# Can we find crossgen2?
crossgen2_tool_name = "crossgen2.dll"

crossgen2_tool_name = "crossgen2.exe" if platform.system() == "Windows" else "crossgen2"
crossgen2_tool_path = os.path.abspath(os.path.join(coreclr_args.core_root, "crossgen2", crossgen2_tool_name))
if not os.path.exists(crossgen2_tool_path):
print("`--crossgen2` is specified, but couldn't find " + crossgen2_tool_path + ". (Is it built?)")
Expand Down
1 change: 1 addition & 0 deletions src/coreclr/tools/aot/crossgen2/crossgen2_publish.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<Import Project="$(RepositoryEngineeringDir)codeOptimization.targets" />

<PropertyGroup Condition="'$(UseNativeAotForComponents)' == 'true'">
<PublishAot>true</PublishAot>
<IlcToolsPath>$(CoreCLRILCompilerDir)</IlcToolsPath>
<IlcToolsPath Condition="'$(CrossBuild)' == 'true' or '$(BuildArchitecture)' != '$(TargetArchitecture)' or '$(EnableNativeSanitizers)' != ''">$(CoreCLRCrossILCompilerDir)</IlcToolsPath>
<SysRoot Condition="('$(CrossBuild)' == 'true' or '$(BuildArchitecture)' != '$(TargetArchitecture)') and '$(HostOS)' != 'windows'">$(ROOTFS_DIR)</SysRoot>
Expand Down
19 changes: 13 additions & 6 deletions src/coreclr/tools/r2rtest/Crossgen2Runner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,19 @@ class Crossgen2RunnerOptions
class Crossgen2Runner : CompilerRunner
{
private Crossgen2RunnerOptions Crossgen2RunnerOptions;
public override CompilerIndex Index => CompilerIndex.CPAOT;
private bool IsAssembly => _options.Crossgen2Path != null && _options.Crossgen2Path.FullName.EndsWith(".dll");

// Crossgen2 runs on top of corerun.
// Crossgen2 runs as a standalone binary
protected override string CompilerRelativePath => "";
protected override string CompilerFileName => "";

protected override string CompilerPath => IsAssembly ? _options.DotNetCli : _options.Crossgen2Path?.FullName
?? Path.Combine(_options.CoreRootDirectory.FullName, "crossgen2", RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "crossgen2.exe" : "crossgen2");

public override CompilerIndex Index => CompilerIndex.CPAOT;

protected override string CompilerFileName => _options.DotNetCli;
protected readonly List<string> _referenceFiles = new List<string>();
protected readonly List<string> _referenceFiles = new();

private string Crossgen2Path => _options.Crossgen2Path != null ? _options.Crossgen2Path.FullName : Path.Combine(_options.CoreRootDirectory.FullName, "crossgen2", "crossgen2.dll");
private bool CompositeMode => Crossgen2RunnerOptions != null ? Crossgen2RunnerOptions.Composite : _options.Composite;

public Crossgen2Runner(BuildOptions options, Crossgen2RunnerOptions crossgen2RunnerOptions, IEnumerable<string> references, string overrideOutputPath = null)
Expand Down Expand Up @@ -64,7 +68,9 @@ public Crossgen2Runner(BuildOptions options, Crossgen2RunnerOptions crossgen2Run
public override ProcessParameters CompilationProcess(string outputFileName, IEnumerable<string> inputAssemblyFileNames)
{
ProcessParameters processParameters = base.CompilationProcess(outputFileName, inputAssemblyFileNames);
processParameters.Arguments = $"{Crossgen2Path} {processParameters.Arguments}";
if (IsAssembly)
processParameters.Arguments = $"{_options.Crossgen2Path.FullName} {processParameters.Arguments}";

// DOTNET_ variables
processParameters.EnvironmentOverrides["DOTNET_GCStress"] = "";
processParameters.EnvironmentOverrides["DOTNET_HeapVerify"] = "";
Expand All @@ -76,6 +82,7 @@ public override ProcessParameters CompilationProcess(string outputFileName, IEnu
processParameters.EnvironmentOverrides["COMPlus_HeapVerify"] = "";
processParameters.EnvironmentOverrides["COMPlus_ReadyToRun"] = "";
processParameters.EnvironmentOverrides["COMPlus_GCName"] = "";

return processParameters;
}

Expand Down
18 changes: 9 additions & 9 deletions src/tests/Common/CLRTest.CrossGen.targets
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,17 @@ if [ ! -z ${RunCrossGen2+x} ]%3B then
__ResponseFile="$__OutputFile.rsp"
rm $__ResponseFile 2>/dev/null

__Command=$_DebuggerFullPath
__R2RDumpCommand=$_DebuggerFullPath
# Tests run locally need __TestDotNetCmd (set by runtest.py) or a compatible 5.0 dotnet runtime in the path
if [ ! -z ${__TestDotNetCmd+x} ] %3B then
__Command+=" $__TestDotNetCmd"
__R2RDumpCommand+=" $__TestDotNetCmd"
else
__Command+=" dotnet"
__R2RDumpCommand+=" dotnet"
fi
__R2RDumpCommand=$__Command" $CORE_ROOT/R2RDump/R2RDump.dll"
__R2RDumpCommand+=" $CORE_ROOT/R2RDump/R2RDump.dll"
__R2RDumpCommand+=" --header --sc --in $__OutputFile --out $__OutputFile.r2rdump --val"
__Command+=" $CORE_ROOT/crossgen2/crossgen2.dll"

__Command="$_DebuggerFullPath $CORE_ROOT/crossgen2/crossgen2"
__Command+=" @$__ResponseFile"
__Command+=" $ExtraCrossGen2Args"

Expand Down Expand Up @@ -247,11 +248,10 @@ if defined RunCrossGen2 (
) else (
set __DotNet="dotnet"
)
set __Command=!_DebuggerFullPath!
set __Command=!__Command! !__DotNet!
set __R2RDumpCommand=!__Command! "!CORE_ROOT!\r2rdump\r2rdump.dll"
set __R2RDumpCommand=!_DebuggerFullPath! !__DotNet! "!CORE_ROOT!\r2rdump\r2rdump.dll"
set __R2RDumpCommand=!__R2RDumpCommand! --header --sc --in !__OutputFile! --out !__OutputFile!.r2rdump --val
set __Command=!__Command! "!CORE_ROOT!\crossgen2\crossgen2.dll"

set __Command=!_DebuggerFullPath! "!CORE_ROOT!\crossgen2\crossgen2.exe"
set __Command=!__Command! @"!__ResponseFile!"
set __Command=!__Command! !ExtraCrossGen2Args!
echo !__InputFile!>>!__ResponseFile!
Expand Down
52 changes: 44 additions & 8 deletions src/tests/Common/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<CopyCoreDisToolsToCoreRoot Condition="$(GCStressDependsOnCoreDisTools) And '$(DotNetBuildSourceOnly)' != 'true'">true</CopyCoreDisToolsToCoreRoot>
<!-- Non-desktop OS's use a custom dotnet host, instead of corerun -->
<IsDesktopOS Condition="'$(TargetsBrowser)' != 'true' and '$(TargetsAndroid)' != 'true' and '$(TargetstvOS)' != 'true' and '$(TargetsiOS)' != 'true' and '$(TargetsMacCatalyst)' != 'true'">true</IsDesktopOS>
<Crossgen2Supported Condition="'$(RuntimeFlavor)' == 'coreclr' and '$(TestBuildMode)' != 'nativeaot'">true</Crossgen2Supported>
</PropertyGroup>

<Import Project="$(RepositoryEngineeringDir)coredistools.targets" Condition="$(CopyCoreDisToolsToCoreRoot)" />
Expand All @@ -34,7 +35,47 @@
</ItemDefinitionGroup>

<Target Name="CopyDependencyToCoreRoot"
DependsOnTargets="ResolveAssemblyReferences;ResolveRuntimeFilesFromLocalBuild">
DependsOnTargets="ResolveAssemblyReferences;ResolveRuntimeFilesFromLocalBuild">

<!-- Copy apphost to crossgen2_publish directory.
The default configuration between product and tests are flipped. When we build project like:
`build -c debug -rc checked`, the corresponding test command is `src/tests/build -checked -p:LibrariesConfiguration=debug`,
instead of `-debug -p:RuntimeConfiguration=checked`. That forces us to either pass the
`HostConfiguration=debug` explicitly or fix this disparity; both of which will break the dev workflow.

As a workaround, we will first check if the directory pointed by `HostConfiguration` exists, then check
`LibrariesConfiguration`.
-->
jkoritzinsky marked this conversation as resolved.
Show resolved Hide resolved

<PropertyGroup Condition="'$(Crossgen2Supported)' == 'true'">
<_targetOS>$(TargetOS)</_targetOS>
<_targetOS Condition="'$(_targetOS)' == 'windows'">win</_targetOS>
<_apphostPath Condition="Exists('$(ArtifactsBinDir)$(_targetOS)-$(TargetArchitecture).$(HostConfiguration)\corehost\apphost$(ExeSuffix)')">$(ArtifactsBinDir)$(_targetOS)-$(TargetArchitecture).$(HostConfiguration)\corehost\apphost$(ExeSuffix)</_apphostPath>
<_apphostPath Condition="'$(_apphostPath)' == '' and Exists('$(ArtifactsBinDir)$(_targetOS)-$(TargetArchitecture).$(LibrariesConfiguration)\corehost\apphost$(ExeSuffix)')">$(ArtifactsBinDir)$(_targetOS)-$(TargetArchitecture).$(LibrariesConfiguration)\corehost\apphost$(ExeSuffix)</_apphostPath>
<_toolsConfiguration Condition="Exists('$(ArtifactsBinDir)ILLink.Tasks\$(ToolsConfiguration)\$(NetCoreAppToolCurrent)\ILLink.Tasks.dll')">$(ToolsConfiguration)</_toolsConfiguration>
<_toolsConfiguration Condition="Exists('$(ArtifactsBinDir)ILLink.Tasks\$(LibrariesConfiguration)\$(NetCoreAppToolCurrent)\ILLink.Tasks.dll')">$(LibrariesConfiguration)</_toolsConfiguration>
</PropertyGroup>

<MakeDir Condition="'$(Crossgen2Supported)' == 'true'" Directories="$(ArtifactsObjDir)coreclr\crossgen2_publish\$(TargetOS).$(TargetArchitecture).$(RuntimeConfiguration)" />

<Copy
SourceFiles="$(_apphostPath)"
DestinationFiles="$(ArtifactsObjDir)coreclr\crossgen2_publish\$(TargetOS).$(TargetArchitecture).$(RuntimeConfiguration)\apphost$(ExeSuffix)"
Condition="'$(Crossgen2Supported)' == 'true'" />
jkoritzinsky marked this conversation as resolved.
Show resolved Hide resolved

<!-- Publish crossgen2 on supported platforms. -->

<MSBuild Condition="'$(Crossgen2Supported)' == 'true'"
Targets="Restore"
BuildInParallel="true"
Properties="NativeAotSupported=$(NativeAotSupported);UseNativeAotForComponents=$(UseNativeAotForComponents);ToolsConfiguration=$(_toolsConfiguration);MSBuildRestoreSessionId=$([System.Guid]::NewGuid());"
Projects="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Crossgen2.sfxproj" />

<MSBuild Condition="'$(Crossgen2Supported)' == 'true'"
Targets="PublishToDisk"
BuildInParallel="true"
Properties="NativeAotSupported=$(NativeAotSupported);UseNativeAotForComponents=$(UseNativeAotForComponents);ToolsConfiguration=$(_toolsConfiguration);OutputPath=$(CORE_ROOT)\crossgen2;"
Projects="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Crossgen2.sfxproj" />

<ItemGroup>
<RunTimeDependencyCopyLocal Include="@(RuntimeCopyLocalItems)" />
Expand Down Expand Up @@ -80,11 +121,6 @@
<!-- Used by the Crossgen comparison job -->
<RunTimeArtifactsIncludeFolders Include="IL/" TargetDir="IL/" />

<!-- Used for Crossgen2 R2R tests -->
<RunTimeArtifactsIncludeFolders Include="crossgen2/" TargetDir="crossgen2/">
<IncludeSubFolders>True</IncludeSubFolders>
</RunTimeArtifactsIncludeFolders>

<!-- Used for NativeAOT tests -->
<RunTimeArtifactsIncludeFolders Include="ilc-published/" TargetDir="ilc-published/">
<IncludeSubFolders>True</IncludeSubFolders>
Expand Down Expand Up @@ -135,7 +171,7 @@

<RunTimeDependencyCopyLocal
Condition="'%(RuntimeArtifactsIncludeFolders.IncludeSubFolders)' == 'True'"
Include="$(CoreCLRArtifactsPath)%(RunTimeArtifactsIncludeFolders.Identity)**/*"
Include="$(CoreCLRArtifactsPath)%(RunTimeArtifactsIncludeFolders.Identity)**\*"
Exclude="@(RunTimeArtifactsExcludeFiles -> '$(CoreCLRArtifactsPath)%(Identity)')"
TargetDir="%(RunTimeArtifactsIncludeFolders.TargetDir)" />
</ItemGroup>
Expand Down Expand Up @@ -223,7 +259,7 @@

<Copy
SourceFiles="@(RunTimeDependencyCopyLocal)"
DestinationFiles="@(RunTimeDependencyCopyLocal -> '$(CORE_ROOT)/%(TargetDir)%(RecursiveDir)%(Filename)%(Extension)')"
DestinationFiles="@(RunTimeDependencyCopyLocal -> '$(CORE_ROOT)\%(TargetDir)%(RecursiveDir)%(Filename)%(Extension)')"
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
Retries="$(CopyRetryCount)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ set "DOTNET_GCStress="
set "DOTNET_HeapVerify="
set "DOTNET_ReadyToRun="

"%CORE_ROOT%\corerun" %CORE_ROOT%\crossgen2\crossgen2.dll --out r2r\$(MSBuildProjectName).dll $(MSBuildProjectName).dll -r %CORE_ROOT%\*.dll
"%CORE_ROOT%\crossgen2\crossgen2.exe" --out r2r\$(MSBuildProjectName).dll $(MSBuildProjectName).dll -r %CORE_ROOT%\*.dll

endlocal
set CLRCustomTestLauncher=RunBasicTestWithMcj.cmd --runCustomTest
Expand All @@ -47,7 +47,7 @@ mkdir r2r
# Suppress some DOTNET variables for the duration of Crossgen2 execution
export -n DOTNET_GCName DOTNET_GCStress DOTNET_HeapVerify DOTNET_ReadyToRun

"$CORE_ROOT/corerun" $CORE_ROOT/crossgen2/crossgen2.dll --out r2r/$(MSBuildProjectName).dll $(MSBuildProjectName).dll -r $CORE_ROOT/*.dll
"$CORE_ROOT/crossgen2/crossgen2" --out r2r/$(MSBuildProjectName).dll $(MSBuildProjectName).dll -r $CORE_ROOT/*.dll

export DOTNET_GCName DOTNET_GCStress DOTNET_HeapVerify DOTNET_ReadyToRun
chmod +x ./RunBasicTestWithMcj.sh
Expand Down
4 changes: 1 addition & 3 deletions src/tests/build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -651,8 +651,6 @@
Condition="'$(__BuildTestWrappersOnly)' != '1' and '$(__CopyNativeTestBinaries)' != '1' and '$(__TestBuildMode)' == 'crossgen2' and !$(MonoAot) and !$(MonoFullAot)" >

<PropertyGroup>
<CrossgenDir>$(__BinDir)\$(BuildArchitecture)</CrossgenDir>

<CrossgenOutputDir>$(__TestIntermediatesDir)\crossgen.out</CrossgenOutputDir>

<CrossgenCmd>$(DotNetCli)</CrossgenCmd>
Expand All @@ -672,7 +670,7 @@
<CrossgenCmd Condition="'$(__CompositeBuildMode)' == ''">$(CrossgenCmd) --crossgen2-parallelism 1</CrossgenCmd>

<CrossgenCmd>$(CrossgenCmd) --verify-type-and-field-layout</CrossgenCmd>
<CrossgenCmd>$(CrossgenCmd) --crossgen2-path "$(CrossgenDir)\crossgen2\tools\crossgen2.dll"</CrossgenCmd>
<CrossgenCmd>$(CrossgenCmd) --crossgen2-path "$(__BinDir)\$(BuildArchitecture)\crossgen2\tools\crossgen2.dll"</CrossgenCmd>
</PropertyGroup>

<Message Importance="High" Text="$(MsgPrefix)Compiling framework using Crossgen2: $(CrossgenCmd)" />
Expand Down
10 changes: 5 additions & 5 deletions src/tests/readytorun/crossboundarylayout/buildcrossgen2image.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -48,36 +48,36 @@ goto Loop

if "%COMPOSITENAME%"=="" goto done

set BUILDCMD=%TESTBATCHROOT%\..\..\..\..\..\..\.dotnet\dotnet %CORE_ROOT%\crossgen2\crossgen2.dll -r %CORE_ROOT%\* -r %TESTINITIALBINPATH%\*.dll -o %TESTINITIALBINPATH%\%TESTTARGET_DIR%\%COMPOSITENAME%Composite.dll --composite %COMPILEARG%
set BUILDCMD=%CORE_ROOT%\crossgen2\crossgen2.exe -r %CORE_ROOT%\* -r %TESTINITIALBINPATH%\*.dll -o %TESTINITIALBINPATH%\%TESTTARGET_DIR%\%COMPOSITENAME%Composite.dll --composite %COMPILEARG%
echo %BUILDCMD% > %TESTINITIALBINPATH%\%TESTTARGET_DIR%\%COMPOSITENAME%Composite.dll.log
call %BUILDCMD% >> %TESTINITIALBINPATH%\%TESTTARGET_DIR%\%COMPOSITENAME%Composite.dll.log 2>&1
if NOT EXIST %TESTINITIALBINPATH%\%TESTTARGET_DIR%\%COMPOSITENAME%Composite.dll del %TESTINITIALBINPATH%\%TESTTARGET_DIR%\a.dll
goto done

:CG2Single
del %TESTINITIALBINPATH%\%TESTTARGET_DIR%\%COMPOSITENAME%.dll
set BUILDCMD=%TESTBATCHROOT%\..\..\..\..\..\..\.dotnet\dotnet %CORE_ROOT%\crossgen2\crossgen2.dll -r %CORE_ROOT%\* -r %TESTINITIALBINPATH%\*.dll -o %TESTINITIALBINPATH%\%TESTTARGET_DIR%\%COMPOSITENAME%.dll %TESTINITIALBINPATH%\%COMPOSITENAME%.dll
set BUILDCMD=%CORE_ROOT%\crossgen2\crossgen2.exe -r %CORE_ROOT%\* -r %TESTINITIALBINPATH%\*.dll -o %TESTINITIALBINPATH%\%TESTTARGET_DIR%\%COMPOSITENAME%.dll %TESTINITIALBINPATH%\%COMPOSITENAME%.dll
echo %BUILDCMD% > %TESTINITIALBINPATH%\%TESTTARGET_DIR%\%COMPOSITENAME%.dll.log
call %BUILDCMD% >> %TESTINITIALBINPATH%\%TESTTARGET_DIR%\%COMPOSITENAME%.dll.log 2>&1
goto done

:CG2NoMethods
del %TESTINITIALBINPATH%\%TESTTARGET_DIR%\%COMPOSITENAME%.dll
set BUILDCMD=%TESTBATCHROOT%\..\..\..\..\..\..\.dotnet\dotnet %CORE_ROOT%\crossgen2\crossgen2.dll --compile-no-methods -r %CORE_ROOT%\* -r %TESTINITIALBINPATH%\*.dll -o %TESTINITIALBINPATH%\%TESTTARGET_DIR%\%COMPOSITENAME%.dll %TESTINITIALBINPATH%\%COMPOSITENAME%.dll
set BUILDCMD=%CORE_ROOT%\crossgen2\crossgen2.exe --compile-no-methods -r %CORE_ROOT%\* -r %TESTINITIALBINPATH%\*.dll -o %TESTINITIALBINPATH%\%TESTTARGET_DIR%\%COMPOSITENAME%.dll %TESTINITIALBINPATH%\%COMPOSITENAME%.dll
echo %BUILDCMD% > %TESTINITIALBINPATH%\%TESTTARGET_DIR%\%COMPOSITENAME%.dll.log
call %BUILDCMD% >> %TESTINITIALBINPATH%\%TESTTARGET_DIR%\%COMPOSITENAME%.dll.log 2>&1
goto done

:CG2SingleInputBubble
del %TESTINITIALBINPATH%\%TESTTARGET_DIR%\%COMPOSITENAME%.dll
set BUILDCMD=%TESTBATCHROOT%\..\..\..\..\..\..\.dotnet\dotnet %CORE_ROOT%\crossgen2\crossgen2.dll -r %CORE_ROOT%\* -r %TESTINITIALBINPATH%\*.dll -o %TESTINITIALBINPATH%\%TESTTARGET_DIR%\%COMPOSITENAME%.dll --inputbubble %TESTINITIALBINPATH%\%COMPOSITENAME%.dll
set BUILDCMD=%CORE_ROOT%\crossgen2\crossgen2.exe -r %CORE_ROOT%\* -r %TESTINITIALBINPATH%\*.dll -o %TESTINITIALBINPATH%\%TESTTARGET_DIR%\%COMPOSITENAME%.dll --inputbubble %TESTINITIALBINPATH%\%COMPOSITENAME%.dll
echo %BUILDCMD% > %TESTINITIALBINPATH%\%TESTTARGET_DIR%\%COMPOSITENAME%.dll.log
call %BUILDCMD% >> %TESTINITIALBINPATH%\%TESTTARGET_DIR%\%COMPOSITENAME%.dll.log 2>&1
goto done

:CG2SingleBubbleADOnly
del %TESTINITIALBINPATH%\%TESTTARGET_DIR%\%COMPOSITENAME%.dll
set BUILDCMD=%TESTBATCHROOT%\..\..\..\..\..\..\.dotnet\dotnet %CORE_ROOT%\crossgen2\crossgen2.dll -r %CORE_ROOT%\* -r %TESTINITIALBINPATH%\d.dll -o %TESTINITIALBINPATH%\%TESTTARGET_DIR%\%COMPOSITENAME%.dll --inputbubble %TESTINITIALBINPATH%\%COMPOSITENAME%.dll
set BUILDCMD=%CORE_ROOT%\crossgen2\crossgen2.exe -r %CORE_ROOT%\* -r %TESTINITIALBINPATH%\d.dll -o %TESTINITIALBINPATH%\%TESTTARGET_DIR%\%COMPOSITENAME%.dll --inputbubble %TESTINITIALBINPATH%\%COMPOSITENAME%.dll
echo %BUILDCMD% > %TESTINITIALBINPATH%\%TESTTARGET_DIR%\%COMPOSITENAME%.dll.log
call %BUILDCMD% >> %TESTINITIALBINPATH%\%TESTTARGET_DIR%\%COMPOSITENAME%.dll.log 2>&1
goto done
Expand Down
Loading
Loading