Update the nih_plug_xtask dependencies

This commit is contained in:
Robbert van der Helm
2023-03-01 23:23:04 +01:00
parent b1b3ee6e21
commit 2dc0b48f73
3 changed files with 35 additions and 8 deletions

View File

@@ -8,8 +8,8 @@ license = "ISC"
[dependencies]
anyhow = "1.0"
goblin = "0.5"
goblin = "0.6.1"
# Version 0.1.3 from crates.io assumes a 64-bit toolchain
reflink = { git = "https://github.com/nicokoch/reflink.git", rev = "e8d93b465f5d9ad340cd052b64bbc77b8ee107e2" }
serde = { version = "1.0", features = ["derive"] }
toml = "0.5"
toml = "0.7.2"

View File

@@ -17,9 +17,19 @@ pub fn exported<P: AsRef<Path>>(binary: P, symbol: &str) -> Result<bool> {
.any(|sym| !sym.is_import() && obj.dynstrtab.get_at(sym.st_name) == Some(symbol))),
goblin::Object::Mach(obj) => {
let obj = match obj {
goblin::mach::Mach::Fat(arches) => arches
goblin::mach::Mach::Fat(arches) => match arches
.get(0)
.context("Fat Mach-O binary without any binaries")?,
.context("Fat Mach-O binary without any binaries")?
{
goblin::mach::SingleArch::MachO(obj) => obj,
// THis shouldn't be hit
goblin::mach::SingleArch::Archive(_) => {
anyhow::bail!(
"'{}' contained an unexpected Mach-O archive",
binary.as_ref().display()
)
}
},
goblin::mach::Mach::Binary(obj) => obj,
};