|
48 | 48 | </PropertyGroup> |
49 | 49 | <PropertyGroup Condition="'$(TrimMode)' == ''"> |
50 | 50 | <!-- Linking is always on for all assemblies when using NativeAOT - this is because we need to modify all assemblies in the linker for them to be compatible with NativeAOT --> |
51 | | - <_DefaultLinkMode Condition="'$(_UseNativeAot)' == 'true'">Full</_DefaultLinkMode> |
52 | | - |
53 | | - <_DefaultLinkMode Condition="'$(_UseNativeAot)' != 'true' And '$(_PlatformName)' == 'macOS'">None</_DefaultLinkMode> <!-- Linking is off by default for macOS apps --> |
54 | | - <_DefaultLinkMode Condition="'$(_UseNativeAot)' != 'true' And '$(_PlatformName)' == 'MacCatalyst' And '$(Configuration)' == 'Release'">SdkOnly</_DefaultLinkMode> <!-- Default linking is on for release builds for Mac Catalyst apps --> |
55 | | - <_DefaultLinkMode Condition="'$(_UseNativeAot)' != 'true' And '$(_PlatformName)' == 'MacCatalyst' And '$(Configuration)' != 'Release' And $(RuntimeIdentifier.Contains('arm64'))">SdkOnly</_DefaultLinkMode> <!-- Default linking is on for non-release builds for Mac Catalyst apps when building for arm64 --> |
56 | | - <_DefaultLinkMode Condition="'$(_UseNativeAot)' != 'true' And '$(_PlatformName)' == 'MacCatalyst' And '$(Configuration)' != 'Release' And !$(RuntimeIdentifier.Contains('arm64'))">None</_DefaultLinkMode> <!-- Default linking is off for non-release builds for Mac Catalyst apps when not building for arm64 --> |
57 | | - <_DefaultLinkMode Condition="'$(_UseNativeAot)' != 'true' And '$(_PlatformName)' != 'macOS' And '$(_PlatformName)' != 'MacCatalyst' And '$(_SdkIsSimulator)' == 'true' And $(RuntimeIdentifier.Contains('arm64')) And '$(MtouchInterpreter)' == ''">SdkOnly</_DefaultLinkMode> <!-- Linking is on by default in the simulator when building for arm64, as long as the interpreter is not enabled --> |
58 | | - <_DefaultLinkMode Condition="'$(_UseNativeAot)' != 'true' And '$(_PlatformName)' != 'macOS' And '$(_PlatformName)' != 'MacCatalyst' And '$(_SdkIsSimulator)' == 'true' And (!$(RuntimeIdentifier.Contains('arm64')) Or '$(MtouchInterpreter)' != '')">None</_DefaultLinkMode> <!-- Linking is off by default in the simulator when not building for arm64 --> |
59 | | - <_DefaultLinkMode Condition="'$(_UseNativeAot)' != 'true' And '$(_PlatformName)' != 'macOS' And '$(_PlatformName)' != 'MacCatalyst' And '$(_SdkIsSimulator)' != 'true'">SdkOnly</_DefaultLinkMode> <!-- Linking is SdkOnly for iOS/tvOS apps on device --> |
| 51 | + <_DefaultLinkMode Condition="'$(_DefaultLinkMode)' == '' And '$(_UseNativeAot)' == 'true'">Full</_DefaultLinkMode> |
| 52 | + |
| 53 | + <!-- Linking is off by default when using CoreCLR --> |
| 54 | + <_DefaultLinkMode Condition="'$(_DefaultLinkMode)' == '' And '$(UseMonoRuntime)' != 'true'">None</_DefaultLinkMode> |
| 55 | + |
| 56 | + <!-- Default linking is on for release builds for Mac Catalyst apps --> |
| 57 | + <_DefaultLinkMode Condition="'$(_DefaultLinkMode)' == '' And '$(_PlatformName)' == 'MacCatalyst' And '$(Configuration)' == 'Release'">SdkOnly</_DefaultLinkMode> |
| 58 | + <!-- Default linking is on for non-release builds for Mac Catalyst apps when building for arm64 --> |
| 59 | + <_DefaultLinkMode Condition="'$(_DefaultLinkMode)' == '' And '$(_PlatformName)' == 'MacCatalyst' And '$(Configuration)' != 'Release' And $(RuntimeIdentifier.Contains('arm64'))">SdkOnly</_DefaultLinkMode> |
| 60 | + <!-- Default linking is off for non-release builds for Mac Catalyst apps when not building for arm64 --> |
| 61 | + <_DefaultLinkMode Condition="'$(_DefaultLinkMode)' == '' And '$(_PlatformName)' == 'MacCatalyst' And '$(Configuration)' != 'Release' And !$(RuntimeIdentifier.Contains('arm64'))">None</_DefaultLinkMode> |
| 62 | + <!-- Otherwise, default linking is off for Mac Catalyst (this is just a safety net, because all possible scenarios should be handled already) --> |
| 63 | + <_DefaultLinkMode Condition="'$(_DefaultLinkMode)' == '' And '$(_PlatformName)' == 'MacCatalyst'">None</_DefaultLinkMode> |
| 64 | + |
| 65 | + <!-- Linking is on by default in the simulator when building for arm64, as long as the interpreter is not enabled --> |
| 66 | + <_DefaultLinkMode Condition="'$(_DefaultLinkMode)' == '' And '$(_SdkIsSimulator)' == 'true' And $(RuntimeIdentifier.Contains('arm64')) And '$(MtouchInterpreter)' == ''">SdkOnly</_DefaultLinkMode> |
| 67 | + <!-- Linking is off by default in the simulator when not building for arm64 --> |
| 68 | + <_DefaultLinkMode Condition="'$(_DefaultLinkMode)' == '' And '$(_SdkIsSimulator)' == 'true' And (!$(RuntimeIdentifier.Contains('arm64')) Or '$(MtouchInterpreter)' != '')">None</_DefaultLinkMode> |
| 69 | + <!-- Otherwise, default linking is SdkOnly for iOS/tvOS apps --> |
| 70 | + <_DefaultLinkMode Condition="'$(_DefaultLinkMode)' == ''">SdkOnly</_DefaultLinkMode> |
| 71 | + |
60 | 72 | </PropertyGroup> |
61 | 73 | <PropertyGroup> |
62 | 74 | <_LinkMode Condition="'$(_LinkMode)' == '' And '$(_PlatformName)' == 'macOS'">$(LinkMode)</_LinkMode> |
63 | 75 | <_LinkMode Condition="'$(_LinkMode)' == '' And '$(_PlatformName)' != 'macOS'">$(MtouchLink)</_LinkMode> |
64 | 76 | <_LinkMode Condition="'$(_LinkMode)' == ''">$(_DefaultLinkMode)</_LinkMode> |
65 | | - <_LinkMode Condition="'$(_LinkMode)' == '' And '$(_PlatformName)' == 'macOS'">None</_LinkMode> <!-- Linking is off by default for macOS apps --> |
66 | | - <_LinkMode Condition="'$(_LinkMode)' == '' And '$(_PlatformName)' != 'macOS'">SdkOnly</_LinkMode> <!-- Default linking is SdkOnly for iOS/tvOS apps --> |
| 77 | + <_LinkMode Condition="'$(_LinkMode)' == ''">SdkOnly</_LinkMode> <!-- We shouldn't ever hit this, but if we do, default to SdkOnly if no other scenario fits --> |
67 | 78 |
|
68 | 79 | <!-- TrimMode specifies what the linker will do with framework assemblies --> |
69 | 80 | <TrimMode Condition="'$(_LinkMode)' == 'TrimMode'">$(TrimMode)</TrimMode> |
|
0 commit comments