Skip to content

Commit 4f5249b

Browse files
Copilotsbomer
andcommitted
Use lib prefix by default on Unix for NativeAOT; introduce UseNativeLibPrefix opt-out
Co-authored-by: sbomer <787361+sbomer@users.noreply.github.com>
1 parent 79f9997 commit 4f5249b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

eng/testing/tests.android.targets

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
</ItemGroup>
2727
<PropertyGroup Condition="'$(TestNativeAOT)' == 'true'">
2828
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
29-
<_UseNativeLibPrefix>true</_UseNativeLibPrefix>
3029
<_SuppressNativeLibEventSourceWarning>true</_SuppressNativeLibEventSourceWarning>
3130
</PropertyGroup>
3231

src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ The .NET Foundation licenses this file to you under the MIT license.
2929
<IlcPgoOptimize Condition="'$(IlcPgoOptimize)' == '' and '$(OptimizationPreference)' == 'Speed'">true</IlcPgoOptimize>
3030
<RunILLink>false</RunILLink>
3131
<IlcTreatWarningsAsErrors Condition="'$(IlcTreatWarningsAsErrors)' == ''">$(TreatWarningsAsErrors)</IlcTreatWarningsAsErrors>
32+
<UseNativeLibPrefix Condition="'$(UseNativeLibPrefix)' == '' and '$(_targetOS)' != 'win'">true</UseNativeLibPrefix>
3233
<_IsiOSLikePlatform Condition="'$(_targetOS)' == 'maccatalyst' or $(_targetOS.StartsWith('ios')) or $(_targetOS.StartsWith('tvos'))">true</_IsiOSLikePlatform>
3334
<_IsApplePlatform Condition="'$(_targetOS)' == 'osx' or '$(_IsiOSLikePlatform)' == 'true'">true</_IsApplePlatform>
3435
</PropertyGroup>
@@ -71,7 +72,7 @@ The .NET Foundation licenses this file to you under the MIT license.
7172
<NativeBinaryExt Condition="'$(IsNativeExecutable)' != 'true' and '$(_targetOS)' == 'win' and '$(NativeLib)' == 'Static'">.lib</NativeBinaryExt>
7273
<NativeBinaryExt Condition="'$(IsNativeExecutable)' != 'true' and '$(_targetOS)' != 'win' and '$(NativeLib)' == 'Static'">.a</NativeBinaryExt>
7374

74-
<NativeBinaryPrefix Condition="'$(_UseNativeLibPrefix)' == 'true' and '$(IsNativeExecutable)' != 'true' and '$(_targetOS)' != 'win'">lib</NativeBinaryPrefix>
75+
<NativeBinaryPrefix Condition="'$(UseNativeLibPrefix)' == 'true' and '$(IsNativeExecutable)' != 'true' and '$(_targetOS)' != 'win'">lib</NativeBinaryPrefix>
7576

7677
<NativeSymbolExt Condition="'$(NativeSymbolExt)' == '' and '$(_IsApplePlatform)' == 'true'">.dSYM</NativeSymbolExt>
7778
<NativeSymbolExt Condition="'$(NativeSymbolExt)' == '' and '$(_targetOS)' == 'win'">.pdb</NativeSymbolExt>

0 commit comments

Comments
 (0)