From 04f086acda4fd8a1a330928466c804e12f2d8386 Mon Sep 17 00:00:00 2001 From: Adeel <3840695+am11@users.noreply.github.com> Date: Sun, 13 Oct 2024 00:19:27 +0300 Subject: [PATCH 1/3] Consolidate LocateNativeCompiler target --- eng/testing/linker/project.csproj.template | 32 +++--------------- eng/testing/linker/trimmingTests.targets | 2 +- eng/toolAot.targets | 33 ++----------------- src/native/managed/compile-native.proj | 4 --- src/native/managed/native-library.props | 19 ----------- .../XUnitLogChecker/XUnitLogChecker.csproj | 2 +- 6 files changed, 9 insertions(+), 83 deletions(-) diff --git a/eng/testing/linker/project.csproj.template b/eng/testing/linker/project.csproj.template index f62317e7eba16..9c8e4ff7e06b3 100644 --- a/eng/testing/linker/project.csproj.template +++ b/eng/testing/linker/project.csproj.template @@ -25,11 +25,14 @@ {NetCoreAppMaximumVersion} {UseMonoRuntime} {RuntimeIdentifier} - {PublishAot} {AppHostSourcePath} {SingleFileHostSourcePath} true + + {PublishAot} + true + {MonoAOTCompilerDir} {MonoProjectRoot} @@ -59,14 +62,9 @@ {IlcSdkPath} {IlcFrameworkPath} {IlcFrameworkNativePath} - $(ROOTFS_DIR) {CoreCLRBuildIntegrationDir} - - - - {RuntimeHostConfigurationOptions} @@ -81,28 +79,8 @@ - - - clang - - - - - - - - $(_CC_LDFLAGS.SubString(0, $(_CC_LDFLAGS.IndexOf(';')))) - <_LDFLAGS>$(_CC_LDFLAGS.SubString($([MSBuild]::Add($(_CC_LDFLAGS.IndexOf(';')), 1)))) - lld - - - + diff --git a/eng/testing/linker/trimmingTests.targets b/eng/testing/linker/trimmingTests.targets index 7ff8fccc2c017..c1bf7bae8e875 100644 --- a/eng/testing/linker/trimmingTests.targets +++ b/eng/testing/linker/trimmingTests.targets @@ -151,7 +151,7 @@ + Properties="Configuration=$(Configuration);BuildProjectReferences=false;HostOS=$(HostOS);TargetOS=$(TargetOS);TargetArchitecture=$(TargetArchitecture);_IsPublishing=true" /> - - - - - $(RuntimeIdentifier) - - - x86_64 - aarch64 - arm64 - - - $(CrossCompileArch)-linux-gnu - $(CrossCompileArch)-alpine-linux-musl - $(CrossCompileArch)-unknown-freebsd12 - - - - - - - @@ -61,6 +37,7 @@ BeforeTargets="SetupOSSpecificProps"> clang + $(ROOTFS_DIR) - - - lld - $(ROOTFS_DIR) - - - \ No newline at end of file + diff --git a/src/native/managed/compile-native.proj b/src/native/managed/compile-native.proj index 4123d47c34bb2..f8715efce8e82 100644 --- a/src/native/managed/compile-native.proj +++ b/src/native/managed/compile-native.proj @@ -31,10 +31,6 @@ - - - - diff --git a/src/native/managed/native-library.props b/src/native/managed/native-library.props index 41c7d3d6b897d..a38ee419d3282 100644 --- a/src/native/managed/native-library.props +++ b/src/native/managed/native-library.props @@ -9,28 +9,9 @@ Guard - - - - @rpath/$(MSBuildProjectName).dylib - - - - - - - - - true - - - - diff --git a/src/tests/Common/XUnitLogChecker/XUnitLogChecker.csproj b/src/tests/Common/XUnitLogChecker/XUnitLogChecker.csproj index 0075ff8baa97e..0c7731b95696e 100644 --- a/src/tests/Common/XUnitLogChecker/XUnitLogChecker.csproj +++ b/src/tests/Common/XUnitLogChecker/XUnitLogChecker.csproj @@ -5,7 +5,7 @@ $(NetCoreAppToolCurrent) true true - true + true false From 9a97e5e5958150fbd748b930fc70e05614a8da8c Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Sun, 13 Oct 2024 21:01:58 +0300 Subject: [PATCH 2/3] Set install_name on all Apple platforms --- .../BuildIntegration/Microsoft.NETCore.Native.Unix.targets | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets index efd3cfddaf2ad..f27318cc56540 100644 --- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets +++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets @@ -64,6 +64,8 @@ The .NET Foundation licenses this file to you under the MIT license. $ORIGIN @executable_path + @rpath/$(TargetName)$(NativeBinaryExt) + libeventpipe-disabled libeventpipe-enabled @@ -92,7 +94,6 @@ The .NET Foundation licenses this file to you under the MIT license. <_AppleTripleAbi Condition="$(_targetOS.EndsWith('simulator'))">simulator $(CrossCompileArch)-apple-$(_AppleTripleOS)$(AppleMinOSVersion)-$(_AppleTripleAbi) - @rpath/$(TargetName)$(NativeBinaryExt) @@ -214,7 +215,7 @@ The .NET Foundation licenses this file to you under the MIT license. - + From 6297fdf8072bbdfa56b2b3363acf37041e2d1a01 Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Wed, 16 Oct 2024 09:46:48 +0300 Subject: [PATCH 3/3] Update src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets Co-authored-by: Jan Kotas --- .../BuildIntegration/Microsoft.NETCore.Native.Unix.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets index f27318cc56540..1551672eeb308 100644 --- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets +++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets @@ -215,7 +215,7 @@ The .NET Foundation licenses this file to you under the MIT license. - +