From b8f1f5eead15b2c82cced4a238a89713e4d2ee72 Mon Sep 17 00:00:00 2001 From: Jackson Schuster <36744439+jtschuster@users.noreply.github.com> Date: Fri, 1 Aug 2025 17:07:18 -0700 Subject: [PATCH 1/2] Add _UseNativeLibPrefix option for nativeaot shared lib Change IntermediateAssembly update to use the NativeBinary property --- .../Microsoft.NETCore.Native.Publish.targets | 3 +-- .../BuildIntegration/Microsoft.NETCore.Native.targets | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets index d03686a45a2203..60e701938eb0a6 100644 --- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets +++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets @@ -28,9 +28,8 @@ - <_NativeIntermediateAssembly Include="@(IntermediateAssembly->'$(NativeOutputPath)%(Filename)$(NativeBinaryExt)')" /> - + diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets index c1a3aee2d3c86a..e625f9c55bc5c4 100644 --- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets +++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets @@ -71,6 +71,9 @@ The .NET Foundation licenses this file to you under the MIT license. .lib .a + <_UseNativeLibPrefix Condition="'$(_UseNativeLibPrefix)' == ''">false + lib + .dSYM .pdb .dbg @@ -79,7 +82,7 @@ The .NET Foundation licenses this file to you under the MIT license. .exports $(NativeIntermediateOutputPath)$(TargetName)$(NativeObjectExt) - $(NativeOutputPath)$(TargetName)$(NativeBinaryExt) + $(NativeOutputPath)$(NativeBinaryPrefix)$(TargetName)$(NativeBinaryExt) true $(NativeIntermediateOutputPath)$(TargetName)$(ExportsFileExt) From 705cd320321e30ccaba388ddab6514c3951fbc15 Mon Sep 17 00:00:00 2001 From: Jackson Schuster <36744439+jtschuster@users.noreply.github.com> Date: Tue, 5 Aug 2025 13:12:56 -0700 Subject: [PATCH 2/2] NativeBinary is a property; remove default assignment to 'false' --- .../BuildIntegration/Microsoft.NETCore.Native.Publish.targets | 2 +- .../nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets index 60e701938eb0a6..1ba44cff534e5a 100644 --- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets +++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets @@ -29,7 +29,7 @@ - + diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets index e625f9c55bc5c4..5bc7d308a0c37c 100644 --- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets +++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets @@ -71,7 +71,6 @@ The .NET Foundation licenses this file to you under the MIT license. .lib .a - <_UseNativeLibPrefix Condition="'$(_UseNativeLibPrefix)' == ''">false lib .dSYM