diff --git a/Directory.Build.targets b/Directory.Build.targets
index 279184d1eb0c4..51b456006e6fc 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -10,6 +10,7 @@
+
diff --git a/eng/Subsets.props b/eng/Subsets.props
index 488b8c43847c0..902dc35db359a 100644
--- a/eng/Subsets.props
+++ b/eng/Subsets.props
@@ -357,13 +357,14 @@
$(CoreClrProjectRoot)tools\r2rtest\R2RTest.csproj;
$(CoreClrProjectRoot)tools\PdbChecker\PdbChecker.csproj;
$(CoreClrProjectRoot)tools\AssemblyChecker\AssemblyChecker.csproj" Category="clr" Condition="'$(DotNetBuildSourceOnly)' != 'true'"/>
-
-
+
+
+
diff --git a/eng/liveBuilds.targets b/eng/liveBuilds.targets
index 8a70af36f27e7..bf3d66971d4d8 100644
--- a/eng/liveBuilds.targets
+++ b/eng/liveBuilds.targets
@@ -28,7 +28,8 @@
$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'aotsdk'))
$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'build'))
- $([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', '$(BuildArchitecture)', 'crossgen2'))
+ $([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'crossgen2-published'))
+ $([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', '$(BuildArchitecture)', 'crossgen2'))
$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'ILLink.Tasks', '$(ToolsConfiguration)'))
@@ -58,15 +59,6 @@
$([MSBuild]::NormalizePath('$(CoreCLRArtifactsPath)', 'corehost', 'singlefilehost$(ExeSuffix)'))
-
-
- true
-
-
-
-
-
-
diff --git a/eng/targetingpacks.targets b/eng/targetingpacks.targets
index c61a849d87a56..f7fa62b71f58a 100644
--- a/eng/targetingpacks.targets
+++ b/eng/targetingpacks.targets
@@ -141,7 +141,7 @@
NuGetPackageVersion="$(ProductVersion)" />
-
+
-
-
-
-
-
-
-
-
-
diff --git a/eng/testing/tests.singlefile.targets b/eng/testing/tests.singlefile.targets
index f40703bac41c3..0360f17c87c9f 100644
--- a/eng/testing/tests.singlefile.targets
+++ b/eng/testing/tests.singlefile.targets
@@ -38,34 +38,6 @@
true
-
-
-
-
- $(RuntimeIdentifier)
-
-
- x86_64
- aarch64
- arm64
-
-
- $(CrossCompileArch)-linux-gnu
- $(CrossCompileArch)-alpine-linux-musl
- $(CrossCompileArch)-unknown-freebsd12
-
-
-
-
-
-
-
-
-
-
-
$(DefineConstants);SINGLE_FILE_TEST_RUNNER
@@ -229,34 +201,6 @@
-
-
-
- clang
-
-
-
-
-
-
-
- $(_CC_LDFLAGS.SubString(0, $(_CC_LDFLAGS.IndexOf(';'))))
- <_LDFLAGS>$(_CC_LDFLAGS.SubString($([MSBuild]::Add($(_CC_LDFLAGS.IndexOf(';')), 1))))
- lld
-
-
-
+
+
+
+ true
+
+ .dwarf
+ --flat
+
+
+
+ true
+ true
+
+ false
+
+ false
+ $(PublishReadyToRun)
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ $(RuntimeIdentifier)
+
+
+ x86_64
+ aarch64
+ arm64
+
+
+ $(CrossCompileArch)-linux-gnu
+ $(CrossCompileArch)-alpine-linux-musl
+ $(CrossCompileArch)-unknown-freebsd12
+
+
+
+
+
+
+
+
+
+
+
+
+
+ clang
+
+
+
+
+
+
+
+ $(_CC_LDFLAGS.SubString(0, $(_CC_LDFLAGS.IndexOf(';'))))
+ <_LDFLAGS>$(_CC_LDFLAGS.SubString($([MSBuild]::Add($(_CC_LDFLAGS.IndexOf(';')), 1))))
+ lld
+
+
+
+
+
+ lld
+ $(ROOTFS_DIR)
+
+
+
\ No newline at end of file
diff --git a/src/coreclr/crossgen-corelib.proj b/src/coreclr/crossgen-corelib.proj
index 1d0a6e2262ef2..714c1efafd55a 100644
--- a/src/coreclr/crossgen-corelib.proj
+++ b/src/coreclr/crossgen-corelib.proj
@@ -1,9 +1,5 @@
-
- true
-
-
@@ -99,10 +95,12 @@
- %(Crossgen2.RootDir)%(Crossgen2.Directory)
+ %(Crossgen2.RootDir)/%(Crossgen2.Directory)
-
+
+
+
diff --git a/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj b/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj
index 48c4f381d0864..fad922947bae1 100644
--- a/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj
+++ b/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj
@@ -11,86 +11,14 @@
$(RuntimeBinDir)ilc-published/
true
- $(ROOTFS_DIR)
true
true
true
-
-
-
-
- $(RuntimeIdentifier)
-
-
- x86_64
- aarch64
- arm64
-
-
- $(CrossCompileArch)-linux-gnu
- $(CrossCompileArch)-alpine-linux-musl
- $(CrossCompileArch)-unknown-freebsd12
-
-
-
-
-
-
-
-
-
- clang
-
-
-
-
-
-
-
-
-
-
-
-
- <_XcodeVersion>$([System.Text.RegularExpressions.Regex]::Match($(_XcodeVersionString), '[1-9]\d*'))
-
-
-
-
-
-
-
- $(_CC_LDFLAGS.SubString(0, $(_CC_LDFLAGS.IndexOf(';'))))
- <_LDFLAGS>$(_CC_LDFLAGS.SubString($([MSBuild]::Add($(_CC_LDFLAGS.IndexOf(';')), 1))))
- lld
-
-
-
-
-
-
-
+ DependsOnTargets="Publish" />
-
-
-
-
-
-
-
diff --git a/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj b/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj
new file mode 100644
index 0000000000000..c48b1aa3fb7af
--- /dev/null
+++ b/src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj
@@ -0,0 +1,14 @@
+
+
+
+ <_IsPublishing>true
+ $(PackageRID)
+ $(RuntimeBinDir)ilc-published/
+ true
+ true
+ false
+ true
+
+
+
+
diff --git a/src/coreclr/tools/aot/crossgen2/crossgen2.csproj b/src/coreclr/tools/aot/crossgen2/crossgen2.csproj
index 6f8578b26b969..62d2448414f63 100644
--- a/src/coreclr/tools/aot/crossgen2/crossgen2.csproj
+++ b/src/coreclr/tools/aot/crossgen2/crossgen2.csproj
@@ -1,14 +1,7 @@
+ $(BuildArchitecture)
$(RuntimeBinDir)/crossgen2
- false
-
- $(NetCoreAppToolCurrent)
diff --git a/src/coreclr/tools/aot/crossgen2/crossgen2.props b/src/coreclr/tools/aot/crossgen2/crossgen2.props
index f96f22934a8a9..0c2555a477fff 100644
--- a/src/coreclr/tools/aot/crossgen2/crossgen2.props
+++ b/src/coreclr/tools/aot/crossgen2/crossgen2.props
@@ -1,5 +1,7 @@
+
+ $(NetCoreAppToolCurrent)
crossgen2
true
Exe
diff --git a/src/coreclr/tools/aot/crossgen2/crossgen2_inbuild.csproj b/src/coreclr/tools/aot/crossgen2/crossgen2_inbuild.csproj
index 2ee5778d9e818..bf997aa8ebb03 100644
--- a/src/coreclr/tools/aot/crossgen2/crossgen2_inbuild.csproj
+++ b/src/coreclr/tools/aot/crossgen2/crossgen2_inbuild.csproj
@@ -1,8 +1,9 @@
$(BuildArchitecture)
- $(RuntimeBinDir)/$(BuildArchitecture)/crossgen2/tools
+ $(RuntimeBinDir)/$(BuildArchitecture)/crossgen2/
$(NetCoreAppToolCurrent)
+ false
diff --git a/src/coreclr/tools/aot/crossgen2/crossgen2_publish.csproj b/src/coreclr/tools/aot/crossgen2/crossgen2_publish.csproj
index 25bfcc096d934..c7041857e0857 100644
--- a/src/coreclr/tools/aot/crossgen2/crossgen2_publish.csproj
+++ b/src/coreclr/tools/aot/crossgen2/crossgen2_publish.csproj
@@ -1,110 +1,14 @@
-
-
+
+
<_IsPublishing>true
-
-
-
-
-
- true
$(PackageRID)
+ $(RuntimeBinDir)crossgen2-published/
true
- $(NetCoreAppCurrent)
- true
-
-
-
-
-
- true
- true
-
- false
-
- false
- $(PublishReadyToRun)
-
-
-
-
-
-
-
-
-
-
-
-
-
- true
- $(CoreCLRILCompilerDir)
- $(CoreCLRCrossILCompilerDir)
- $(ROOTFS_DIR)
- $(CoreCLRILCompilerDir)netstandard/ILCompiler.Build.Tasks.dll
- $(CoreCLRAotSdkDir)
- $(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)
- $(MicrosoftNetCoreAppRuntimePackNativeDir)
+ true
false
-
- .dwarf
- --flat
-
- false
+ true
-
-
-
-
-
-
-
-
-
-
-
- $(RuntimeIdentifier)
-
-
- x86_64
- aarch64
- arm64
-
-
- $(CrossCompileArch)-linux-gnu
- $(CrossCompileArch)-alpine-linux-musl
- $(CrossCompileArch)-unknown-freebsd12
-
-
-
-
-
-
-
-
-
- clang
-
-
-
-
-
-
-
- $(_CC_LDFLAGS.SubString(0, $(_CC_LDFLAGS.IndexOf(';'))))
- <_LDFLAGS>$(_CC_LDFLAGS.SubString($([MSBuild]::Add($(_CC_LDFLAGS.IndexOf(';')), 1))))
- lld
-
-
-
+
diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/ReadyToRun.targets b/src/installer/pkg/sfx/Microsoft.NETCore.App/ReadyToRun.targets
index 436b95b37dcc8..09730ed226502 100644
--- a/src/installer/pkg/sfx/Microsoft.NETCore.App/ReadyToRun.targets
+++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/ReadyToRun.targets
@@ -1,15 +1,16 @@
- $([MSBuild]::NormalizePath('$(Crossgen2Dir)', 'tools', 'crossgen2.dll'))
1
+ $([MSBuild]::NormalizePath('$(Crossgen2InBuildDir)', 'crossgen2.dll'))
+ $(DotNetTool)
-
diff --git a/src/native/managed/compile-native.proj b/src/native/managed/compile-native.proj
index bcda8c5d6b57b..bf0372f01cc63 100644
--- a/src/native/managed/compile-native.proj
+++ b/src/native/managed/compile-native.proj
@@ -28,13 +28,6 @@
false
-
-
- $(ROOTFS_DIR)
- lld
- --gcc-toolchain=$(ROOTFS_DIR)/usr
-
-
@@ -45,7 +38,7 @@
-
+
+
false
diff --git a/src/tests/Common/XUnitLogChecker/XUnitLogChecker.csproj b/src/tests/Common/XUnitLogChecker/XUnitLogChecker.csproj
index e1b5822a4fbff..0075ff8baa97e 100644
--- a/src/tests/Common/XUnitLogChecker/XUnitLogChecker.csproj
+++ b/src/tests/Common/XUnitLogChecker/XUnitLogChecker.csproj
@@ -7,12 +7,9 @@
true
true
false
- lld
- $(ROOTFS_DIR)
-
diff --git a/src/tests/Directory.Build.targets b/src/tests/Directory.Build.targets
index fc22c6bc4f705..8e7b97442b55b 100644
--- a/src/tests/Directory.Build.targets
+++ b/src/tests/Directory.Build.targets
@@ -527,6 +527,7 @@
+
@@ -571,7 +572,6 @@
$(MicrosoftNetCoreAppRuntimePackNativeDir)
$(OutputRID)
- $(ROOTFS_DIR)
true
true
$(IlcSdkPath)
@@ -619,25 +619,4 @@
Condition="'$(_WillCLRTestProjectBuild)' == 'true' and '$(CLRTestKind)' == 'BuildAndRun'"
DependsOnTargets="ComputeResolvedFilesToPublishList;LinkNative" />
-
-
- clang
-
-
-
-
-
-
-
- $(_CC_LDFLAGS.SubString(0, $(_CC_LDFLAGS.IndexOf(';'))))
- <_LDFLAGS>$(_CC_LDFLAGS.SubString($([MSBuild]::Add($(_CC_LDFLAGS.IndexOf(';')), 1))))
- lld
-
-
-