From 09335da4046b00a3850ef2627d75221b29c54ff1 Mon Sep 17 00:00:00 2001 From: Bruce Forstall Date: Tue, 31 Oct 2023 12:45:16 -0700 Subject: [PATCH] Build Mac symbols in .dSYM bundle, not single .dwarf file --- eng/liveBuilds.targets | 8 ++++++-- eng/native/functions.cmake | 6 ++++-- eng/native/naming.props | 3 ++- src/coreclr/.nuget/Directory.Build.targets | 3 ++- .../BuildIntegration/Microsoft.NETCore.Native.targets | 2 +- src/coreclr/tools/aot/crossgen2/crossgen2_publish.csproj | 4 ++-- .../pkg/runtime.native.System.IO.Ports.props | 8 +++++++- src/native/corehost/corehost.proj | 7 ++++++- 8 files changed, 30 insertions(+), 11 deletions(-) diff --git a/eng/liveBuilds.targets b/eng/liveBuilds.targets index 51f990bd229ea5..25415b2d7b091a 100644 --- a/eng/liveBuilds.targets +++ b/eng/liveBuilds.targets @@ -103,7 +103,9 @@ Include=" $(CoreCLRSharedFrameworkPdbDir)*.pdb; $(CoreCLRSharedFrameworkPdbDir)*.dbg; - $(CoreCLRSharedFrameworkPdbDir)*.dwarf" IsNative="true" /> + $(CoreCLRSharedFrameworkPdbDir)*.dwarf; + $(CoreCLRSharedFrameworkPdbDir)*.dSYM" + IsNative="true" /> + $(CoreCLRSharedFrameworkPdbDir)*.dwarf; + $(CoreCLRSharedFrameworkPdbDir)*.dSYM" /> runtime/$(CoreCLRCrossTargetComponentDirName)_$(TargetArchitecture)/native @@ -188,6 +191,7 @@ $(LibrariesNativeArtifactsPath)*.so; $(LibrariesNativeArtifactsPath)*.dbg; $(LibrariesNativeArtifactsPath)*.dwarf; + $(LibrariesNativeArtifactsPath)*.dSYM; $(LibrariesNativeArtifactsPath)*.pdb" IsNative="true" Exclude="@(ExcludeNativeLibrariesRuntimeFiles)" /> diff --git a/eng/native/functions.cmake b/eng/native/functions.cmake index 543722a9c0a59e..a0ac400cf2c835 100644 --- a/eng/native/functions.cmake +++ b/eng/native/functions.cmake @@ -369,7 +369,8 @@ endfunction() function (get_symbol_file_name targetName outputSymbolFilename) if (CLR_CMAKE_HOST_UNIX) if (CLR_CMAKE_TARGET_APPLE) - set(strip_destination_file $.dwarf) + # set(strip_destination_file $.dwarf) + set(strip_destination_file $.dSYM) else () set(strip_destination_file $.dbg) endif () @@ -416,7 +417,8 @@ function(strip_symbols targetName outputFilename) OUTPUT_VARIABLE DSYMUTIL_HELP_OUTPUT ) - set(DSYMUTIL_OPTS "--flat") + # set(DSYMUTIL_OPTS "--flat") + set(DSYMUTIL_OPTS "") if ("${DSYMUTIL_HELP_OUTPUT}" MATCHES "--minimize") list(APPEND DSYMUTIL_OPTS "--minimize") endif () diff --git a/eng/native/naming.props b/eng/native/naming.props index b50c0c131cda5e..0aef054a27a252 100644 --- a/eng/native/naming.props +++ b/eng/native/naming.props @@ -18,7 +18,8 @@ lib .dylib .a - .dwarf + + .dSYM diff --git a/src/coreclr/.nuget/Directory.Build.targets b/src/coreclr/.nuget/Directory.Build.targets index 379fbd65030b32..f81ddf85efc50d 100644 --- a/src/coreclr/.nuget/Directory.Build.targets +++ b/src/coreclr/.nuget/Directory.Build.targets @@ -47,7 +47,8 @@ - + + diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets index 74c2b457b9ad85..69d06b56bbdad3 100644 --- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets +++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets @@ -71,7 +71,7 @@ The .NET Foundation licenses this file to you under the MIT license. .lib .a - .dsym + .dSYM .pdb .dbg diff --git a/src/coreclr/tools/aot/crossgen2/crossgen2_publish.csproj b/src/coreclr/tools/aot/crossgen2/crossgen2_publish.csproj index 8243494d1e15ad..6a8fd4061efcbf 100644 --- a/src/coreclr/tools/aot/crossgen2/crossgen2_publish.csproj +++ b/src/coreclr/tools/aot/crossgen2/crossgen2_publish.csproj @@ -51,8 +51,8 @@ $(MicrosoftNetCoreAppRuntimePackNativeDir) false - .dwarf - --flat + + diff --git a/src/libraries/System.IO.Ports/pkg/runtime.native.System.IO.Ports.props b/src/libraries/System.IO.Ports/pkg/runtime.native.System.IO.Ports.props index 8ee8a9c20d8d7b..fa22d7d51298fa 100644 --- a/src/libraries/System.IO.Ports/pkg/runtime.native.System.IO.Ports.props +++ b/src/libraries/System.IO.Ports/pkg/runtime.native.System.IO.Ports.props @@ -20,8 +20,14 @@ + + + + + + - diff --git a/src/native/corehost/corehost.proj b/src/native/corehost/corehost.proj index 026cff6928567d..7b87dffd59e8e2 100644 --- a/src/native/corehost/corehost.proj +++ b/src/native/corehost/corehost.proj @@ -56,7 +56,12 @@ Command=""$(DotNetTool)" exec @(InjectResourceTool) --bin "$(DacPath)" --image "$(SingleFileHostDestinationPath)" --name MINIDUMP_EMBEDDED_AUXILIARY_PROVIDER" /> - + + + + + +