Skip to content

Commit

Permalink
Revert "[NativeAOT] Do not strip exported symbols from executables on…
Browse files Browse the repository at this point in the history
… Apple platforms (#85293)" (#85601)

This reverts commit 32ecd85.
  • Loading branch information
jkotas authored May 4, 2023
1 parent fbdf54c commit 6bae14c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,7 @@ The .NET Foundation licenses this file to you under the MIT license.
<PropertyGroup>
<_IgnoreLinkerWarnings>false</_IgnoreLinkerWarnings>
<_IgnoreLinkerWarnings Condition="'$(_IsApplePlatform)' == 'true'">true</_IgnoreLinkerWarnings>
<_StripFlag Condition="'$(_IsApplePlatform)' == 'true' and '$(NativeLib)' == 'Shared'">-x</_StripFlag> <!-- keep global symbols in dylib -->
<_StripFlag Condition="'$(_IsApplePlatform)' == 'true' and '$(NativeLib)' != 'Shared' and '$(IlcExportUnmanagedEntrypoints)' == 'true'">-i -s $(ExportsFile)</_StripFlag> <!-- keep global symbols when explicitly specified -->
<StripFlag Condition="'$(_IsApplePlatform)' == 'true' and '$(NativeLib)' == 'Shared'">-x</StripFlag> <!-- keep global symbols in dylib -->
</PropertyGroup>

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

<Target Name="CreateLib"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<CLRTestKind>BuildAndRun</CLRTestKind>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IlcExportUnmanagedEntrypoints>true</IlcExportUnmanagedEntrypoints>

<!-- Stripping symbols causes problems for running the test on macOS -->
<StripSymbols>false</StripSymbols>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 6bae14c

Please sign in to comment.