Skip to content

Commit 9e93f42

Browse files
authored
[mono][ios] Add support for stripping during AOT compilation on iOS (#87728)
* Add support for stripping debug symbols and enabling IL stripping during AOT compilation on iOS
1 parent 919d316 commit 9e93f42

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

src/mono/msbuild/apple/build/AppleBuild.props

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
<UseMonoRuntime>true</UseMonoRuntime>
1616
<UseMonoJustInterp Condition="'$(RunAOTCompilation)' == 'true' and '$(MonoForceInterpreter)' == 'true'">true</UseMonoJustInterp>
1717

18-
<!--<ShouldILStrip Condition="'$(RunAOTCompilation)' == 'true' and '$(MonoForceInterpreter)' != 'true'">true</ShouldILStrip>-->
18+
<StripDebugSymbols Condition="'$(StripDebugSymbols)' == ''" >false</StripDebugSymbols>
19+
<!-- Tracking issue: https://github.com/dotnet/runtime/issues/87740 -->
20+
<!-- <ShouldILStrip Condition="'$(RunAOTCompilation)' == 'true' and '$(MonoForceInterpreter)' != 'true'">true</ShouldILStrip> -->
1921

2022
<_IsLibraryMode Condition="'$(NativeLib)' != ''">true</_IsLibraryMode>
2123

src/mono/msbuild/apple/build/AppleBuild.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@
261261
ProjectName="$(AppName)"
262262
RuntimeComponents="$(RuntimeComponents)"
263263
TargetOS="$(TargetOS)"
264+
StripSymbolTable="$(StripDebugSymbols)"
264265
ExcludeFromAppDir="@(_ExcludeFromAppDir)"
265266
UseConsoleUITemplate="$(UseConsoleUITemplate)">
266267
<Output TaskParameter="AppBundlePath" PropertyName="AppBundlePath" />

src/mono/sample/iOS/Program.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<PublishTrimmed>true</PublishTrimmed>
1414
<TrimMode>Link</TrimMode>
1515
<Optimized Condition="'$(Configuration)' == 'Release'">true</Optimized>
16+
<ShouldILStrip Condition="'$(RunAOTCompilation)' == 'true' and '$(MonoForceInterpreter)' != 'true'">true</ShouldILStrip>
1617

1718
<EnableDefaultAssembliesToBundle>true</EnableDefaultAssembliesToBundle>
1819
<AppleGenerateAppBundle>true</AppleGenerateAppBundle>

0 commit comments

Comments
 (0)