Skip to content

Commit

Permalink
Add step to create dSYM folders using dsymutil for Mac builds
Browse files Browse the repository at this point in the history
We will just run this for all Mac builds, so we always try to generate these debug symbols.
  • Loading branch information
mike-malburg committed May 14, 2024
1 parent c02aebf commit 8228c9f
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion ps-modules/MacBuild/MacBuild.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ function Create-FinalizedMacArtifacts {
Remove-Item -Force -Recurse -Path $arm64LibDir
Remove-Item -Force -Recurse -Path $x64LibDir
Remove-DylibSymlinks -libDir $universalLibDir
Run-CreateDysmAndStripDebugSymbols -libDir $universalLibDir
}

function Update-LibraryPath {
Expand Down Expand Up @@ -277,5 +278,21 @@ function Remove-DylibSymlinks {
Pop-Location
}

Export-ModuleMember -Function Create-FinalizedMacArtifacts, Remove-DylibSymlinks
function Run-CreateDysmAndStripDebugSymbols {
param (
[Parameter(Mandatory=$true)][string]$libDir
)

Push-Location "$libDir"
$libraries = (Get-ChildItem -Path . -Filter "*.dylib")
foreach($library in $libraries) {
Write-Message "> Running dsymutil on: $library..."
dsymutil $library.Name -o ($library.Name + ".dSYM")

#Write-Message "Running strip on: $library..."
#strip $library.Name
}
Pop-Location
}

Export-ModuleMember -Function Create-FinalizedMacArtifacts

0 comments on commit 8228c9f

Please sign in to comment.