Skip to content

Commit 6bae14c

Browse files
authored
Revert "[NativeAOT] Do not strip exported symbols from executables on Apple platforms (#85293)" (#85601)
This reverts commit 32ecd85.
1 parent fbdf54c commit 6bae14c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,7 @@ The .NET Foundation licenses this file to you under the MIT license.
335335
<PropertyGroup>
336336
<_IgnoreLinkerWarnings>false</_IgnoreLinkerWarnings>
337337
<_IgnoreLinkerWarnings Condition="'$(_IsApplePlatform)' == 'true'">true</_IgnoreLinkerWarnings>
338-
<_StripFlag Condition="'$(_IsApplePlatform)' == 'true' and '$(NativeLib)' == 'Shared'">-x</_StripFlag> <!-- keep global symbols in dylib -->
339-
<_StripFlag Condition="'$(_IsApplePlatform)' == 'true' and '$(NativeLib)' != 'Shared' and '$(IlcExportUnmanagedEntrypoints)' == 'true'">-i -s $(ExportsFile)</_StripFlag> <!-- keep global symbols when explicitly specified -->
338+
<StripFlag Condition="'$(_IsApplePlatform)' == 'true' and '$(NativeLib)' == 'Shared'">-x</StripFlag> <!-- keep global symbols in dylib -->
340339
</PropertyGroup>
341340

342341
<!-- write linker script for lld (13+) to retain the __modules section -->
@@ -363,7 +362,7 @@ The .NET Foundation licenses this file to you under the MIT license.
363362
<Exec Condition="'$(StripSymbols)' == 'true' and '$(_IsApplePlatform)' == 'true' and '$(NativeLib)' != 'Static'"
364363
Command="
365364
dsymutil $(DsymUtilOptions) &quot;$(NativeBinary)&quot; &amp;&amp;
366-
strip -no_code_signature_warning $(_StripFlag) &quot;$(NativeBinary)&quot;" />
365+
strip -no_code_signature_warning $(StripFlag) &quot;$(NativeBinary)&quot;" />
367366
</Target>
368367

369368
<Target Name="CreateLib"

src/tests/nativeaot/GenerateUnmanagedEntryPoints/GenerateUnmanagedEntryPoints.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
<CLRTestKind>BuildAndRun</CLRTestKind>
55
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
66
<IlcExportUnmanagedEntrypoints>true</IlcExportUnmanagedEntrypoints>
7+
8+
<!-- Stripping symbols causes problems for running the test on macOS -->
9+
<StripSymbols>false</StripSymbols>
710
</PropertyGroup>
811

912
<ItemGroup>

0 commit comments

Comments
 (0)