Set PublishTrimmed in NativeAOT targets (#87304)
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>
Fri, 9 Jun 2023 04:06:18 +0000 (13:06 +0900)
committerGitHub <noreply@github.com>
Fri, 9 Jun 2023 04:06:18 +0000 (21:06 -0700)
Looks like this is still needed. Fixes #87303.

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

index 1825711..88c0a7a 100644 (file)
@@ -25,6 +25,7 @@ The .NET Foundation licenses this file to you under the MIT license.
     <NativeDebugSymbols Condition="$(DebugSymbols) == 'true' or ($(DebugType) != 'none' and $(DebugType) != '')">true</NativeDebugSymbols>
     <!-- Workaround for https://github.com/dotnet/runtimelab/issues/771 -->
     <ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
+    <PublishTrimmed Condition="'$(PublishTrimmed)' == ''">true</PublishTrimmed>
     <IlcPgoOptimize Condition="'$(IlcPgoOptimize)' == '' and '$(OptimizationPreference)' == 'Speed'">true</IlcPgoOptimize>
     <RunILLink>false</RunILLink>
     <_IsiOSLikePlatform Condition="'$(_targetOS)' == 'maccatalyst' or $(_targetOS.StartsWith('ios')) or $(_targetOS.StartsWith('tvos'))">true</_IsiOSLikePlatform>