From 595f217fc5d353b898d43aa8690a97e19c2700b2 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 5 Nov 2023 22:09:37 +0100 Subject: actions/check-runtime-library: locate objdump on Windows --- .github/actions/check-runtime-library/action.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to '.github/actions/check-runtime-library/action.yml') diff --git a/.github/actions/check-runtime-library/action.yml b/.github/actions/check-runtime-library/action.yml index b4db3b5..32d2246 100644 --- a/.github/actions/check-runtime-library/action.yml +++ b/.github/actions/check-runtime-library/action.yml @@ -62,6 +62,22 @@ runs: } } + function Get-Objdump { + $objdump = Get-Command 'objdump' -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)] @@ -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) { -- cgit v1.2.3