Skip to content

Commit

Permalink
actions/check-runtime-library: locate objdump on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
egor-tensin committed Nov 5, 2023
1 parent 3d4d0b3 commit 5e2d21c
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/actions/check-runtime-library/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,22 @@ runs:
}
}
function Get-Objdump {
$objdump = Get-Command $exe -ErrorAction SilentlyContinue
if ($objdump) {
return $objdump.Path
}
$objdump = 'C:\ProgramData\chocolatey\bin\objdump.exe'
if (Test-Path $objdump -Type Leaf) {
return $objdump
}
$objdump = 'C:\mingw64\bin\objdump.exe'
if (Test-Path $objdump -Type Leaf) {
return $objdump
}
return 'objdump'
}
function Get-LinkedLibraries {
param(
[Parameter(Mandatory=$true)]
Expand All @@ -70,7 +86,7 @@ runs:
$objdump = 'objdump'
if ($env:CI_HOST_WINDOWS) {
$objdump = 'C:\ProgramData\chocolatey\bin\objdump.exe'
$objdump = Get-Objdump
}
if ($env:CI_TARGET_PE) {
Expand Down

0 comments on commit 5e2d21c

Please sign in to comment.