From be8d681108a4ba940ebb294118ed804c9f51b454 Mon Sep 17 00:00:00 2001
From: Adeel <3840695+am11@users.noreply.github.com>
Date: Thu, 13 Jun 2024 10:25:43 +0300
Subject: [PATCH] Consolidate LocateNativeCompiler target
---
eng/internal-nativeaot-build.targets | 40 ++++++++++++
eng/testing/linker/project.csproj.template | 27 +-------
eng/testing/tests.singlefile.targets | 57 +----------------
.../tools/aot/ILCompiler/ILCompiler.csproj | 63 +------------------
.../aot/crossgen2/crossgen2_publish.csproj | 53 +---------------
src/native/managed/compile-native.proj | 23 +------
src/native/managed/native-library.props | 5 --
src/native/managed/native-library.targets | 2 +
src/tests/Directory.Build.targets | 23 +------
9 files changed, 49 insertions(+), 244 deletions(-)
create mode 100644 eng/internal-nativeaot-build.targets
diff --git a/eng/internal-nativeaot-build.targets b/eng/internal-nativeaot-build.targets
new file mode 100644
index 00000000000000..5cc770c4f12d38
--- /dev/null
+++ b/eng/internal-nativeaot-build.targets
@@ -0,0 +1,40 @@
+
+
+
+
+ clang
+ $(ROOTFS_DIR)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(_CC_LDFLAGS.SubString(0, $(_CC_LDFLAGS.IndexOf(';'))))
+ <_LDFLAGS>$(_CC_LDFLAGS.SubString($([MSBuild]::Add($(_CC_LDFLAGS.IndexOf(';')), 1))))
+ lld
+
+
+
diff --git a/eng/testing/linker/project.csproj.template b/eng/testing/linker/project.csproj.template
index d31c8df9c9271e..fe02c121c86280 100644
--- a/eng/testing/linker/project.csproj.template
+++ b/eng/testing/linker/project.csproj.template
@@ -59,14 +59,9 @@
{IlcSdkPath}
{IlcFrameworkPath}
{IlcFrameworkNativePath}
- $(ROOTFS_DIR)
{CoreCLRBuildIntegrationDir}
-
-
-
-
{RuntimeHostConfigurationOptions}
@@ -81,27 +76,7 @@
-
-
- clang
-
-
-
-
-
-
-
- $(_CC_LDFLAGS.SubString(0, $(_CC_LDFLAGS.IndexOf(';'))))
- <_LDFLAGS>$(_CC_LDFLAGS.SubString($([MSBuild]::Add($(_CC_LDFLAGS.IndexOf(';')), 1))))
- lld
-
-
-
+
diff --git a/eng/testing/tests.singlefile.targets b/eng/testing/tests.singlefile.targets
index 9e6e4d0b3589e4..3867e1fde42ddb 100644
--- a/eng/testing/tests.singlefile.targets
+++ b/eng/testing/tests.singlefile.targets
@@ -24,7 +24,6 @@
$(CoreCLRILCompilerDir)
$(CoreCLRCrossILCompilerDir)
- $(ROOTFS_DIR)
$(CoreCLRILCompilerDir)netstandard/ILCompiler.Build.Tasks.dll
$(CoreCLRAotSdkDir)
$(NetCoreAppCurrentTestHostSharedFrameworkPath)
@@ -38,34 +37,6 @@
true
-
-
-
-
- $(RuntimeIdentifier)
-
-
- x86_64
- aarch64
- arm64
-
-
- $(CrossCompileArch)-linux-gnu
- $(CrossCompileArch)-alpine-linux-musl
- $(CrossCompileArch)-unknown-freebsd12
-
-
-
-
-
-
-
-
-
-
-
$(DefineConstants);SINGLE_FILE_TEST_RUNNER
@@ -229,33 +200,7 @@
-
-
-
- clang
-
-
-
-
-
-
-
- $(_CC_LDFLAGS.SubString(0, $(_CC_LDFLAGS.IndexOf(';'))))
- <_LDFLAGS>$(_CC_LDFLAGS.SubString($([MSBuild]::Add($(_CC_LDFLAGS.IndexOf(';')), 1))))
- lld
-
-
+
$(RuntimeBinDir)ilc-published/
true
- $(ROOTFS_DIR)
true
true
true
@@ -23,67 +22,7 @@
-
-
-
-
- $(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
-
-
-
-
-
-
+
$(CoreCLRILCompilerDir)
$(CoreCLRCrossILCompilerDir)
- $(ROOTFS_DIR)
$(CoreCLRILCompilerDir)netstandard/ILCompiler.Build.Tasks.dll
$(CoreCLRAotSdkDir)
$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)
$(MicrosoftNetCoreAppRuntimePackNativeDir)
false
-
- .dwarf
- --flat
-
-
-
-
-
-
-
-
- $(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/native/managed/compile-native.proj b/src/native/managed/compile-native.proj
index ef7b427944efca..037fdcf641e001 100644
--- a/src/native/managed/compile-native.proj
+++ b/src/native/managed/compile-native.proj
@@ -1,10 +1,7 @@
-
- shared
-
-
- $(TraversalPublishGlobalProperties);_IsPublishing=true
+
+ $(TraversalPublishGlobalProperties);_IsPublishing=true
@@ -13,22 +10,6 @@
-
-
- $(ROOTFS_DIR)
- lld
- --gcc-toolchain=$(ROOTFS_DIR)/usr
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/native/managed/native-library.props b/src/native/managed/native-library.props
index 7acadfa32d4247..3a1b9b195792f6 100644
--- a/src/native/managed/native-library.props
+++ b/src/native/managed/native-library.props
@@ -29,11 +29,6 @@
true
-
-
-
-
-
diff --git a/src/native/managed/native-library.targets b/src/native/managed/native-library.targets
index 298da3c50ce786..c1210d73acc3fb 100644
--- a/src/native/managed/native-library.targets
+++ b/src/native/managed/native-library.targets
@@ -29,6 +29,8 @@
+
+
@@ -614,25 +612,6 @@
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
-
-
+