mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-19 04:43:02 +08:00
Add support for llvm-objdump to applocal.ps1 (#11898)
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
parent
254bd8fe89
commit
19fe942c13
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user