Publish SOS symbols (#482)
authorMike McLaughlin <mikem@microsoft.com>
Tue, 17 Sep 2019 01:33:41 +0000 (18:33 -0700)
committerGitHub <noreply@github.com>
Tue, 17 Sep 2019 01:33:41 +0000 (18:33 -0700)
Publish SOS symbols

Issue: https://github.com/dotnet/diagnostics/issues/481

.vsts-dotnet.yml
diagnostics.sln
eng/build-native.sh
eng/build.sh
eng/cibuild.sh
src/SOS/SOS.Package/SOS.Package.csproj
src/SOS/SOS.Package/SOS.Symbol.Package.csproj [new file with mode: 0644]
src/Tools/Directory.Build.props

index d560db61ba5d2d7e410c3958c26eb8843559817f..caba50282218c7c56715ff29207c15575d5e6736 100644 (file)
@@ -7,9 +7,6 @@ phases:
       name: Hosted VS2017
       parallel: 4
       matrix:
-        Build_Debug:
-          _BuildConfig: Debug
-          _BuildArch: x64
         Build_Release:
           _BuildConfig: Release
           _BuildArch: x64
@@ -90,14 +87,13 @@ phases:
       name: Hosted macOS
       parallel: 2
       matrix:
-        Build_Debug:
-          _BuildConfig: Debug
-          _BuildArch: x64
         Build_Release:
           _BuildConfig: Release
           _BuildArch: x64
           _PublishArtifacts: bin/OSX.x64.Release
 
+# Test only legs
+
 - template: /eng/build.yml
   parameters:
     name: Debian_Stretch
@@ -210,6 +206,8 @@ phases:
           _BuildConfig: Debug
           _BuildArch: x64
 
+# Download, sign, package and publish
+
 - template: /eng/common/templates/job/job.yml
   parameters:
     name: Sign_Package_Publish
@@ -226,226 +224,84 @@ phases:
       queue: BuildPool.Windows.10.Amd64.VS2017
     variables:
     - _PublishBlobFeedUrl: https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
-    - _SOSNETCorePath: $(Build.SourcesDirectory)/artifacts/bin/SOS.NETCore/Release/netstandard2.0/publish
     - _TeamName: DotNetCore
     - _SignType: $(SignType)
     enableMicrobuild: true
     steps:
-    # Windows x64 download, copy and archive. Everything under "bin" is published for the Windows x64 build.
-    - task: DownloadBuildArtifacts@0
-      displayName: Download Windows x64 and Managed Artifacts
-      inputs:
-        artifactName: Windows_x64_Release
-        downloadPath: '$(System.ArtifactsDirectory)'
-      condition: succeeded()
 
-    - task: CopyFiles@2
-      displayName: Copy Windows Artifacts
-      inputs:
-        sourceFolder: '$(System.ArtifactsDirectory)/Windows_x64_Release'
-        targetFolder: '$(Build.SourcesDirectory)/artifacts/bin'
-      condition: succeeded()
+    # Windows x64 download. Everything under "bin" is published for the Windows x64 build.
 
-    - task: CopyFiles@2
-      displayName: Copy Windows x64 Artifacts
-      inputs:
-        sourceFolder: '$(Build.SourcesDirectory)/artifacts/bin/Windows_NT.x64.Release'
-        contents: ?(sos.dll|Microsoft.DiaSymReader.Native.amd64.dll)
-        targetFolder: '$(Build.SourcesDirectory)/artifacts/Windows_NT.x64.Release'
-      condition: succeeded()
-
-    - task: CopyFiles@2
-      displayName: Copy Windows x64 Artifacts
+    - task: DownloadPipelineArtifact@2
+      displayName: Download Windows x64 and Managed Artifacts
       inputs:
-        sourceFolder: '$(_SOSNETCorePath)'
-        contents: '*.dll'
-        overWrite: true
-        targetFolder: '$(Build.SourcesDirectory)/artifacts/Windows_NT.x64.Release'
+        artifactName: Windows_x64_Release
+        targetPath: '$(Build.SourcesDirectory)/artifacts/bin'
       condition: succeeded()
 
-    # Windows x86 download, copy and archive.
+    # Windows x86 download
 
-    - task: DownloadBuildArtifacts@0
+    - task: DownloadPipelineArtifact@2
       displayName: Download Windows x86 Artifacts
       inputs:
         artifactName: Windows_x86_Release
-        downloadPath: '$(System.ArtifactsDirectory)'
+        targetPath: '$(Build.SourcesDirectory)/artifacts/bin/Windows_NT.x86.Release'
       condition: succeeded()
 
-    - task: CopyFiles@2
-      displayName: Copy Windows x86 Artifacts
-      inputs:
-        sourceFolder: '$(System.ArtifactsDirectory)/Windows_x86_Release'
-        contents: ?(sos.dll|Microsoft.DiaSymReader.Native.x86.dll)
-        targetFolder: '$(Build.SourcesDirectory)/artifacts/bin/Windows_NT.x86.Release'
-      condition: succeeded()
+    # Windows arm download
 
-    - task: CopyFiles@2
-      displayName: Copy Windows x86 Artifacts
-      inputs:
-        sourceFolder: '$(_SOSNETCorePath)'
-        contents: '*.dll'
-        overWrite: true
-        targetFolder: '$(Build.SourcesDirectory)/artifacts/bin/Windows_NT.x86.Release'
-      condition: succeeded()
-
-    # Windows arm download, copy and archive.
-
-    - task: DownloadBuildArtifacts@0
+    - task: DownloadPipelineArtifact@2
       displayName: Download Windows Arm Artifacts
       inputs:
         artifactName: Windows_arm_Release
-        downloadPath: '$(System.ArtifactsDirectory)'
+        targetPath: '$(Build.SourcesDirectory)/artifacts/bin/Windows_NT.arm.Release'
       condition: succeeded()
 
-    - task: CopyFiles@2
-      displayName: Copy Windows Arm Artifacts
-      inputs:
-        sourceFolder: '$(System.ArtifactsDirectory)/Windows_arm_Release'
-        contents: ?(sos.dll|Microsoft.DiaSymReader.Native.arm.dll)
-        targetFolder: '$(Build.SourcesDirectory)/artifacts/bin/Windows_NT.arm.Release'
-      condition: succeeded()
+    # Linux x64 download
 
-    - task: CopyFiles@2
-      displayName: Copy Windows x86 Artifacts
-      inputs:
-        sourceFolder: '$(_SOSNETCorePath)'
-        contents: '*.dll'
-        overWrite: true
-        targetFolder: '$(Build.SourcesDirectory)/artifacts/bin/Windows_NT.arm.Release'
-      condition: succeeded()
-
-    # Linux x64 download, copy and archive
-
-    - task: DownloadBuildArtifacts@0
+    - task: DownloadPipelineArtifact@2
       displayName: Download Linux Artifacts
       inputs:
         artifactName: CentOS_7_x64_Release
-        downloadPath: '$(System.ArtifactsDirectory)'
+        targetPath: '$(Build.SourcesDirectory)/artifacts/bin/Linux.x64.Release'
       condition: succeeded()
 
-    - task: CopyFiles@2
-      displayName: Copy Linux Artifacts
-      inputs:
-        sourceFolder: '$(System.ArtifactsDirectory)/CentOS_7_x64_Release'
-        contents: ?(libsos.so|libsosplugin.so|sosdocsunix.txt)
-        targetFolder: '$(Build.SourcesDirectory)/artifacts/bin/Linux.x64.Release'
-      condition: succeeded()
+    # Linux MUSL x64 download
 
-    - task: CopyFiles@2
-      displayName: Copy Linux Artifacts
-      inputs:
-        sourceFolder: '$(_SOSNETCorePath)'
-        contents: '*.dll'
-        overWrite: true
-        targetFolder: '$(Build.SourcesDirectory)/artifacts/bin/Linux.x64.Release'
-      condition: succeeded()
-
-    # Linux MUSL x64 download, copy and archive
-
-    - task: DownloadBuildArtifacts@0
+    - task: DownloadPipelineArtifact@2
       displayName: Download Linux Musl Artifacts
       inputs:
         artifactName: Alpine3_6_x64_Release
-        downloadPath: '$(System.ArtifactsDirectory)'
+        targetPath: '$(Build.SourcesDirectory)/artifacts/bin/Linux-musl.x64.Release'
       condition: succeeded()
 
-    - task: CopyFiles@2
-      displayName: Copy Linux Musl Artifacts
-      inputs:
-        sourceFolder: '$(System.ArtifactsDirectory)/Alpine3_6_x64_Release'
-        contents: ?(libsos.so|libsosplugin.so|sosdocsunix.txt)
-        targetFolder: '$(Build.SourcesDirectory)/artifacts/bin/Linux-musl.x64.Release'
-      condition: succeeded()
+    # Linux arm download
 
-    - task: CopyFiles@2
-      displayName: Copy Linux Musl Artifacts
-      inputs:
-        sourceFolder: '$(_SOSNETCorePath)'
-        contents: '*.dll'
-        overWrite: true
-        targetFolder: '$(Build.SourcesDirectory)/artifacts/bin/Linux-musl.x64.Release'
-      condition: succeeded()
-
-    # Linux arm download, copy and archive
-
-    - task: DownloadBuildArtifacts@0
+    - task: DownloadPipelineArtifact@2
       displayName: Download Linux Arm Artifacts
       inputs:
         artifactName: Linux_cross_arm_Release
-        downloadPath: '$(System.ArtifactsDirectory)'
+        targetPath: '$(Build.SourcesDirectory)/artifacts/bin/Linux.arm.Release'
       condition: succeeded()
 
-    - task: CopyFiles@2
-      displayName: Copy Linux Arm Artifacts
-      inputs:
-        sourceFolder: '$(System.ArtifactsDirectory)/Linux_cross_arm_Release'
-        contents: ?(libsos.so|libsosplugin.so|sosdocsunix.txt)
-        targetFolder: '$(Build.SourcesDirectory)/artifacts/bin/Linux.arm.Release'
-      condition: succeeded()
-
-    - task: CopyFiles@2
-      displayName: Copy Linux Arm Artifacts
-      inputs:
-        sourceFolder: '$(_SOSNETCorePath)'
-        contents: '*.dll'
-        overWrite: true
-        targetFolder: '$(Build.SourcesDirectory)/artifacts/bin/Linux.arm.Release'
-      condition: succeeded()
+    # Linux arm64 download
 
-    # Linux arm64 download, copy and archive
-
-    - task: DownloadBuildArtifacts@0
+    - task: DownloadPipelineArtifact@2
       displayName: Download Linux Arm64 Artifacts
       inputs:
         artifactName: Linux_cross64_arm64_Release
-        downloadPath: '$(System.ArtifactsDirectory)'
-      condition: succeeded()
-
-    - task: CopyFiles@2
-      displayName: Copy Linux Arm64 Artifacts
-      inputs:
-        sourceFolder: '$(System.ArtifactsDirectory)/Linux_cross64_arm64_Release'
-        contents: ?(libsos.so|libsosplugin.so|sosdocsunix.txt)
-        targetFolder: '$(Build.SourcesDirectory)/artifacts/bin/Linux.arm64.Release'
+        targetPath: '$(Build.SourcesDirectory)/artifacts/bin/Linux.arm64.Release'
       condition: succeeded()
 
-    - task: CopyFiles@2
-      displayName: Copy Linux Arm64 Artifacts
-      inputs:
-        sourceFolder: '$(_SOSNETCorePath)'
-        contents: '*.dll'
-        overWrite: true
-        targetFolder: '$(Build.SourcesDirectory)/artifacts/bin/Linux.arm64.Release'
-
-      condition: succeeded()
-    # MacOS download, copy and archive
+    # MacOS download
 
-    - task: DownloadBuildArtifacts@0
+    - task: DownloadPipelineArtifact@2
       displayName: Download MacOS Artifacts
       inputs:
         artifactName: MacOS_x64_Release
-        downloadPath: '$(System.ArtifactsDirectory)'
-      condition: succeeded()
-
-    - task: CopyFiles@2
-      displayName: Copy MacOS Artifacts
-      inputs:
-        sourceFolder: '$(System.ArtifactsDirectory)/MacOS_x64_Release'
-        contents: ?(libsos.dylib|libsosplugin.dylib|sosdocsunix.txt)
-        targetFolder: '$(Build.SourcesDirectory)/artifacts/bin/OSX.x64.Release'
-      condition: succeeded()
-
-    - task: CopyFiles@2
-      displayName: Copy MacOS Artifacts
-      inputs:
-        sourceFolder: '$(_SOSNETCorePath)'
-        contents: '*.dll'
-        overWrite: true
-        targetFolder: '$(Build.SourcesDirectory)/artifacts/bin/OSX.x64.Release'
+        targetPath: '$(Build.SourcesDirectory)/artifacts/bin/OSX.x64.Release'
       condition: succeeded()
 
-    # Create nuget package and sign binaries
+    # Create nuget packages, sign binaries and publish to blob feed
 
     - script: $(Build.SourcesDirectory)\eng\cipack.cmd
         -configuration Release
@@ -455,20 +311,34 @@ phases:
         /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1) 
         /p:DotNetPublishBlobFeedUrl=$(_PublishBlobFeedUrl)
         /p:DotNetPublishToBlobFeed=$(PublishPackages)
-        /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
-        /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
         /p:OfficialBuildId=$(BUILD.BUILDNUMBER)
       displayName: Sign / Package
       continueOnError: true
       condition: succeeded()
 
+    # Publish symbols
+
+    - task: PowerShell@2
+      displayName: Publish Symbols
+      inputs:
+        filePath: eng\common\sdk-task.ps1
+        arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet -configuration Release
+          /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
+          /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
+          /p:BlobBasePath='$(Build.SourcesDirectory)/artifacts/packages/Release/NonShipping'
+      continueOnError: true
+      condition: and(succeeded(), eq(variables['PublishSymbols'], 'true'))
+
+    # Publish package and log build artifacts
+
     - task: PublishBuildArtifacts@1
       displayName: Publish Package Artifacts
       inputs:
         publishLocation: Container
         pathtoPublish: '$(Build.SourcesDirectory)/artifacts/packages'
         artifactName: Packages
-      condition: succeeded()
+      continueOnError: true
+      condition: always()
 
     - task: PublishBuildArtifacts@1
       displayName: Publish Logs Artifacts
index 65c8d5402f0ad621c17cb3d4fb29d892eb833deb..71e216bd78c2d8fe3fa346e1a2768323f766ac78 100644 (file)
@@ -47,6 +47,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SOS.Package", "src\SOS\SOS.
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Diagnostics.DebugServices", "src\Microsoft.Diagnostics.DebugServices\Microsoft.Diagnostics.DebugServices.csproj", "{A1CE682A-12C4-4FF9-B864-A9A15A8726D2}"
 EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SOS.Symbol.Package", "src\SOS\SOS.Package\SOS.Symbol.Package.csproj", "{410394E0-7F4F-42D5-B5FA-30956F44ACBC}"
+EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Checked|Any CPU = Checked|Any CPU
@@ -761,6 +763,46 @@ Global
                {A1CE682A-12C4-4FF9-B864-A9A15A8726D2}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
                {A1CE682A-12C4-4FF9-B864-A9A15A8726D2}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
                {A1CE682A-12C4-4FF9-B864-A9A15A8726D2}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Checked|Any CPU.ActiveCfg = Debug|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Checked|Any CPU.Build.0 = Debug|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Checked|ARM.ActiveCfg = Debug|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Checked|ARM.Build.0 = Debug|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Checked|ARM64.ActiveCfg = Debug|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Checked|ARM64.Build.0 = Debug|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Checked|x64.ActiveCfg = Debug|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Checked|x64.Build.0 = Debug|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Checked|x86.ActiveCfg = Debug|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Checked|x86.Build.0 = Debug|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Debug|ARM.ActiveCfg = Debug|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Debug|ARM.Build.0 = Debug|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Debug|ARM64.Build.0 = Debug|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Debug|x64.ActiveCfg = Debug|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Debug|x64.Build.0 = Debug|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Debug|x86.ActiveCfg = Debug|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Debug|x86.Build.0 = Debug|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Release|Any CPU.Build.0 = Release|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Release|ARM.ActiveCfg = Release|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Release|ARM.Build.0 = Release|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Release|ARM64.ActiveCfg = Release|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Release|ARM64.Build.0 = Release|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Release|x64.ActiveCfg = Release|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Release|x64.Build.0 = Release|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Release|x86.ActiveCfg = Release|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.Release|x86.Build.0 = Release|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.RelWithDebInfo|ARM.ActiveCfg = Release|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.RelWithDebInfo|ARM.Build.0 = Release|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.RelWithDebInfo|ARM64.ActiveCfg = Release|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.RelWithDebInfo|ARM64.Build.0 = Release|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
@@ -787,6 +829,7 @@ Global
                {54C240C5-7932-4421-A5FB-75205DE0B824} = {19FAB78C-3351-4911-8F0C-8C6056401740}
                {234416E9-EA5F-4018-AC34-67682C5D3E04} = {41638A4C-0DAF-47ED-A774-ECBBAC0315D7}
                {A1CE682A-12C4-4FF9-B864-A9A15A8726D2} = {19FAB78C-3351-4911-8F0C-8C6056401740}
+               {410394E0-7F4F-42D5-B5FA-30956F44ACBC} = {41638A4C-0DAF-47ED-A774-ECBBAC0315D7}
        EndGlobalSection
        GlobalSection(ExtensibilityGlobals) = postSolution
                SolutionGuid = {46465737-C938-44FC-BE1A-4CE139EBB5E0}
index b4932f8a538eb52362b47cb6f23ffb1f1a40a55d..5857ceab0b5df9b28759d087e473fb71ba5f5e3d 100755 (executable)
@@ -44,6 +44,7 @@ usage()
     echo "--architecture <x64|x86|arm|armel|arm64>"
     echo "--configuration <debug|release>"
     echo "--rootfs <ROOTFS_DIR>"
+    echo "--stripsymbols - strip symbols into .dbg files"
     echo "--clangx.y - optional argument to build using clang version x.y"
     echo "--ci - CI lab build"
     echo "--verbosity <q[uiet]|m[inimal]|n[ormal]|d[etailed]|diag[nostic]>"
@@ -204,6 +205,10 @@ while :; do
             __PortableBuild=0
             ;;
 
+        --stripsymbols)
+            __ExtraCmakeArgs="$__ExtraCmakeArgs -DSTRIP_SYMBOLS=true"
+            ;;
+
         --clang3.5)
             __ClangMajorVersion=3
             __ClangMinorVersion=5
@@ -275,7 +280,7 @@ __LogDir=$__RootBinDir/log/$__BuildOS.$__BuildArch.$__BuildType
 __IntermediatesDir=$__RootBinDir/obj/$__BuildOS.$__BuildArch.$__BuildType
 __ResultsDir=$__RootBinDir/TestResults/$__BuildType
 __PackagesBinDir=$__RootBinDir/packages/$__BuildType/Shipping
-__ExtraCmakeArgs="-DCLR_MANAGED_BINARY_DIR=$__RootBinDir/bin -DCLR_BUILD_TYPE=$__BuildType"
+__ExtraCmakeArgs="$__ExtraCmakeArgs -DCLR_MANAGED_BINARY_DIR=$__RootBinDir/bin -DCLR_BUILD_TYPE=$__BuildType"
 __DotNetCli=$__ProjectRoot/.dotnet/dotnet
 __DotNetRuntimeVersion=2.1.11
 
@@ -334,8 +339,8 @@ build_native()
     scriptDir="$__ProjectRoot/eng"
 
     pushd "$intermediatesForBuild"
-    echo "Invoking \"$scriptDir/gen-buildsys-clang.sh\" \"$__ProjectRoot\" $__ClangMajorVersion \"$__ClangMinorVersion\" $platformArch "$scriptDir" $__BuildType $generator $extraCmakeArguments $__cmakeargs"
-    "$scriptDir/gen-buildsys-clang.sh" "$__ProjectRoot" $__ClangMajorVersion "$__ClangMinorVersion" $platformArch "$scriptDir" $__BuildType $generator "$extraCmakeArguments" "$__cmakeargs"
+    echo "Invoking \"$scriptDir/gen-buildsys-clang.sh\" \"$__ProjectRoot\" $__ClangMajorVersion \"$__ClangMinorVersion\" $platformArch "$scriptDir" $__BuildType $generator $extraCmakeArguments"
+    "$scriptDir/gen-buildsys-clang.sh" "$__ProjectRoot" $__ClangMajorVersion "$__ClangMinorVersion" $platformArch "$scriptDir" $__BuildType $generator "$extraCmakeArguments"
     popd
 
     if [ ! -f "$intermediatesForBuild/$buildFile" ]; then
index b3e56720db530b66d731f48d069c97b404282ec4..bb87448d673b08d181163d77548e84705ff0b227 100755 (executable)
@@ -39,7 +39,7 @@ while :; do
         --rootfs)
             shift
             ;;
-        --build-native|--test|--daily-test)
+        --build-native|--test|--daily-test|--stripsymbols)
             ;;
         --clang3.5|--clang3.6|--clang3.7|--clang3.8|--clang3.9|--clang4.0|--clang5.0)
             ;;
index 1a064f68541e85404a9f1125df13dd39e8ae8bba..0ded39d345b50de4286de9b00adcc8f9301b42f8 100755 (executable)
@@ -37,7 +37,7 @@ if [ "$__osname" == "Linux" ]; then
     fi
 fi
 
-"$scriptroot/build.sh" --restore --build --build-native --test --publish --ci $@
+"$scriptroot/build.sh" --restore --build --build-native --test --publish --ci --stripsymbols $@
 if [[ $? != 0 ]]; then
     exit 1
 fi
index f1c890fbf95d7cc21b3f17fa3fb5ef9b2d34d461..6b50c7e3f9a148e47f21451d2a5dc3970c8ea825 100644 (file)
@@ -11,7 +11,7 @@
     <IncludeBuildOutput>false</IncludeBuildOutput>
     <SOSPackagePathPrefix>tools</SOSPackagePathPrefix>
     <GalleryManifestName>$(ArtifactsPackagesDir)\GalleryManifest.xml</GalleryManifestName>
-    <BeforePack>GenerateGalleryZip</BeforePack>
+    <BeforePack>GenerateGalleryZip;GenerateSymbolsZip</BeforePack>
   </PropertyGroup>
 
   <ItemGroup>
     <ZipDirectory DestinationFile="$(ArtifactsPackagesDir)$(FileVersion).zip" SourceDirectory="$(GalleryDir)" Overwrite="true" />
   </Target>
 
+  <Target Name="GenerateSymbolsZip">
+    <PropertyGroup>
+      <SymbolsDir>$(ArtifactsBinDir)\symbols</SymbolsDir>
+      <SOSNETCorePath>$(ArtifactsBinDir)\SOS.NETCore\$(Configuration)\netstandard2.0\publish</SOSNETCorePath>
+    </PropertyGroup>
+
+    <ItemGroup>
+      <ZipSymbolFiles Include="$(SOSNETCorePath)\*.pdb">
+         <TargetPath>$(SymbolsDir)</TargetPath>
+      </ZipSymbolFiles>
+
+      <ZipSymbolFiles Include="$(ArtifactsBinDir)Windows_NT.x64.$(Configuration)\sos.pdb">
+         <TargetPath>$(SymbolsDir)\win-x64</TargetPath>
+      </ZipSymbolFiles>
+
+      <ZipSymbolFiles Include="$(ArtifactsBinDir)Windows_NT.x86.$(Configuration)\sos.pdb">
+         <TargetPath>$(SymbolsDir)\win-x86</TargetPath>
+      </ZipSymbolFiles>
+
+      <ZipSymbolFiles Include="$(ArtifactsBinDir)Windows_NT.arm.$(Configuration)\sos.pdb">
+         <TargetPath>$(SymbolsDir)\win-arm</TargetPath>
+      </ZipSymbolFiles>
+    </ItemGroup>
+
+    <Copy SourceFiles="@(ZipSymbolFiles)" DestinationFolder="%(ZipSymbolFiles.TargetPath)" />
+
+    <ZipDirectory DestinationFile="$(ArtifactsPackagesDir)$(FileVersion).symbols.zip" SourceDirectory="$(SymbolsDir)" Overwrite="true" />
+  </Target>
+
 </Project>
diff --git a/src/SOS/SOS.Package/SOS.Symbol.Package.csproj b/src/SOS/SOS.Package/SOS.Symbol.Package.csproj
new file mode 100644 (file)
index 0000000..ed17688
--- /dev/null
@@ -0,0 +1,67 @@
+<!-- Copyright (c)  Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information. -->
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <TargetFramework>netstandard2.0</TargetFramework>
+    <AssemblyName>Microsoft.NETCore.SOS</AssemblyName>
+    <Description>.NET Core SOS symbols</Description>
+    <PackageReleaseNotes>$(Description)</PackageReleaseNotes>
+    <IsPackable>true</IsPackable>
+    <IncludeBuildOutput>false</IncludeBuildOutput>
+    <IsShippingPackage>false</IsShippingPackage>
+    <IncludeSymbols>true</IncludeSymbols>
+    <SOSPackagePathPrefix>tools</SOSPackagePathPrefix>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <None Include="$(ArtifactsBinDir)\SOS.NETCore\$(Configuration)\netstandard2.0\publish\*.pdb" Pack="true" Visible="false">
+      <PackagePath>$(SOSPackagePathPrefix)</PackagePath>
+    </None>
+
+    <None Include="$(ArtifactsBinDir)\Windows_NT.x64.$(Configuration)\sos.pdb" Pack="true" Visible="false">
+      <PackagePath>$(SOSPackagePathPrefix)/win-x64</PackagePath>
+    </None>
+    <None Include="$(ArtifactsBinDir)\Windows_NT.x86.$(Configuration)\sos.pdb" Pack="true" Visible="false">
+      <PackagePath>$(SOSPackagePathPrefix)/win-x86</PackagePath>
+    </None>
+    <None Include="$(ArtifactsBinDir)\Windows_NT.arm.$(Configuration)\sos.pdb" Pack="true" Visible="false">
+      <PackagePath>$(SOSPackagePathPrefix)/win-arm</PackagePath>
+    </None>
+
+    <None Include="$(ArtifactsBinDir)\Linux.x64.$(Configuration)\libsosplugin.so.dbg" Pack="true" Visible="false">
+      <PackagePath>$(SOSPackagePathPrefix)/linux-x64</PackagePath>
+    </None>
+    <None Include="$(ArtifactsBinDir)\Linux.x64.$(Configuration)\libsos.so.dbg" Pack="true" Visible="false">
+      <PackagePath>$(SOSPackagePathPrefix)/linux-x64</PackagePath>
+    </None>
+
+    <None Include="$(ArtifactsBinDir)\Linux-musl.x64.$(Configuration)\libsosplugin.so.dbg" Pack="true" Visible="false">
+      <PackagePath>$(SOSPackagePathPrefix)/linux-musl-x64</PackagePath>
+    </None>
+    <None Include="$(ArtifactsBinDir)\Linux-musl.x64.$(Configuration)\libsos.so.dbg" Pack="true" Visible="false">
+      <PackagePath>$(SOSPackagePathPrefix)/linux-musl-x64</PackagePath>
+    </None>
+
+    <None Include="$(ArtifactsBinDir)\Linux.arm.$(Configuration)\libsosplugin.so.dbg" Pack="true" Visible="false">
+      <PackagePath>$(SOSPackagePathPrefix)/linux-arm</PackagePath>
+    </None>
+    <None Include="$(ArtifactsBinDir)\Linux.arm.$(Configuration)\libsos.so.dbg" Pack="true" Visible="false">
+      <PackagePath>$(SOSPackagePathPrefix)/linux-arm</PackagePath>
+    </None>
+
+    <None Include="$(ArtifactsBinDir)\Linux.arm64.$(Configuration)\libsosplugin.so.dbg" Pack="true" Visible="false">
+      <PackagePath>$(SOSPackagePathPrefix)/linux-arm64</PackagePath>
+    </None>
+    <None Include="$(ArtifactsBinDir)\Linux.arm64.$(Configuration)\libsos.so.dbg" Pack="true" Visible="false">
+      <PackagePath>$(SOSPackagePathPrefix)/linux-arm64</PackagePath>
+    </None>
+
+    <None Include="$(ArtifactsBinDir)\OSX.x64.$(Configuration)\libsosplugin.dylib.dwarf" Pack="true" Visible="false">
+      <PackagePath>$(SOSPackagePathPrefix)/osx-x64</PackagePath>
+    </None>
+    <None Include="$(ArtifactsBinDir)\OSX.x64.$(Configuration)\libsos.dylib.dwarf" Pack="true" Visible="false">
+      <PackagePath>$(SOSPackagePathPrefix)/osx-x64</PackagePath>
+    </None>
+  </ItemGroup>
+
+</Project>
index 2e201f35991a82d0596d3a3e49f566965dfa6e28..6ca593a9f29cfce482876a69e968b0e89d2e185c 100644 (file)
@@ -6,7 +6,7 @@
     <OutputType>Exe</OutputType>
     <IsPackable>true</IsPackable>
     <PackAsTool>true</PackAsTool>
-    <PackAsToolShimRuntimeIdentifiers>win-x64;win-x86;osx-x64</PackAsToolShimRuntimeIdentifiers>
+    <PackAsToolShimRuntimeIdentifiers>win-x64;win-x86;win-arm;osx-x64</PackAsToolShimRuntimeIdentifiers>
     <PackagedShimOutputRootDirectory>$(OutputPath)</PackagedShimOutputRootDirectory>
     <GenerateDocumentationFile>false</GenerateDocumentationFile>
   </PropertyGroup>