Conditionally pack symbols based on keepNativeSymbols (#58565)
authorMichael Simons <msimons@microsoft.com>
Thu, 2 Sep 2021 18:23:57 +0000 (13:23 -0500)
committerGitHub <noreply@github.com>
Thu, 2 Sep 2021 18:23:57 +0000 (11:23 -0700)
* Conditionally pack symbols based on keepNativeSymbols

* Fix casing issue

* Add clarifing comment

src/libraries/System.IO.Ports/pkg/runtime.native.System.IO.Ports.props

index 557c223..dd4aff2 100644 (file)
@@ -8,7 +8,8 @@
     <DebugType>none</DebugType>
     <IsPackable>true</IsPackable>
     <AllowedOutputExtensionsInSymbolsPackageBuildOutputFolder>$(SymbolsSuffix)</AllowedOutputExtensionsInSymbolsPackageBuildOutputFolder>
-    <TargetsForTfmSpecificDebugSymbolsInPackage>$(TargetsForTfmSpecificDebugSymbolsInPackage);AddRuntimeSpecificNativeSymbolToPackage</TargetsForTfmSpecificDebugSymbolsInPackage>
+    <!-- When KeepNativeSymbols is set, debug symbols are kept in the .so files.  Separate symbol files do not exist that need to be packed. -->
+    <TargetsForTfmSpecificDebugSymbolsInPackage Condition="'$(KeepNativeSymbols)' != 'true'">$(TargetsForTfmSpecificDebugSymbolsInPackage);AddRuntimeSpecificNativeSymbolToPackage</TargetsForTfmSpecificDebugSymbolsInPackage>
     <UseRuntimePackageDisclaimer>true</UseRuntimePackageDisclaimer>
     <!-- This is a native package and doesn't contain any ref/lib assets. -->
     <NoWarn>$(NoWarn);NU5128</NoWarn>