aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-11-05 22:09:37 +0100
committerEgor Tensin <Egor.Tensin@gmail.com>2023-11-05 22:15:09 +0100
commit595f217fc5d353b898d43aa8690a97e19c2700b2 (patch)
tree133400afd97a3b2449958a786bbe18911ceb4f10
parentactions/software-environment: print objdump path (diff)
downloadcmake-common-595f217fc5d353b898d43aa8690a97e19c2700b2.tar.gz
cmake-common-595f217fc5d353b898d43aa8690a97e19c2700b2.zip
actions/check-runtime-library: locate objdump on WindowsHEADmaster
-rw-r--r--.github/actions/check-runtime-library/action.yml18
1 files changed, 17 insertions, 1 deletions
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) {