aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristian Fersch <christian.fersch@ptvgroup.com>2020-11-10 01:47:21 +0100
committerGitHub <noreply@github.com>2020-11-09 16:47:21 -0800
commit19fe942c1338fac61b46df4823501a532c1b3d0e (patch)
tree1e348e507d0bf71ed2f767d00bd9b5e3a34d5135 /scripts
parent254bd8fe89ba37d77718cefac6cd9a3f3446ebdd (diff)
downloadvcpkg-19fe942c1338fac61b46df4823501a532c1b3d0e.tar.gz
vcpkg-19fe942c1338fac61b46df4823501a532c1b3d0e.zip
Add support for llvm-objdump to applocal.ps1 (#11898)
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/buildsystems/msbuild/applocal.ps18
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/buildsystems/msbuild/applocal.ps1 b/scripts/buildsystems/msbuild/applocal.ps1
index f0cb6ee1f..2e8d76cc2 100644
--- a/scripts/buildsystems/msbuild/applocal.ps1
+++ b/scripts/buildsystems/msbuild/applocal.ps1
@@ -86,7 +86,13 @@ function resolve([string]$targetBinary) {
}
$targetBinaryDir = Split-Path $targetBinaryPath -parent
- $a = $(dumpbin /DEPENDENTS $targetBinary | ? { $_ -match "^ [^ ].*\.dll" } | % { $_ -replace "^ ","" })
+ if (Get-Command "dumpbin" -ErrorAction SilentlyContinue) {
+ $a = $(dumpbin /DEPENDENTS $targetBinary | ? { $_ -match "^ [^ ].*\.dll" } | % { $_ -replace "^ ","" })
+ } elseif (Get-Command "llvm-objdump" -ErrorAction SilentlyContinue) {
+ $a = $(llvm-objdump -p $targetBinary| ? { $_ -match "^ {4}DLL Name: .*\.dll" } | % { $_ -replace "^ {4}DLL Name: ","" })
+ } else {
+ Write-Error "Neither dumpbin nor llvm-objdump could be found. Can not take care of dll dependencies."
+ }
$a | % {
if ([string]::IsNullOrEmpty($_)) {
return