diff --git a/Cargo.lock b/Cargo.lock index f7faba17..2e231d55 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1804,9 +1804,9 @@ dependencies = [ [[package]] name = "goblin" -version = "0.5.4" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7666983ed0dd8d21a6f6576ee00053ca0926fb281a5522577a4dbd0f1b54143" +checksum = "0d6b4de4a8eb6c46a8c77e1d3be942cb9a8bf073c22374578e5ba4b08ed0ff68" dependencies = [ "log", "plain", @@ -3595,6 +3595,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0efd8caf556a6cebd3b285caf480045fcc1ac04f6bd786b09a6f11af30c4fcf4" +dependencies = [ + "serde", +] + [[package]] name = "servo-fontconfig" version = "0.5.1" @@ -3911,11 +3920,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.11" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +checksum = "f7afcae9e3f0fe2c370fd4657108972cbb2fa9db1b9f84849cefd80741b01cb6" dependencies = [ "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", ] [[package]] @@ -3923,6 +3935,9 @@ name = "toml_datetime" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" +dependencies = [ + "serde", +] [[package]] name = "toml_edit" @@ -3931,6 +3946,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a1eb0622d28f4b9c90adc4ea4b2b46b47663fde9ac5fafcb14a1369d5508825" dependencies = [ "indexmap", + "serde", + "serde_spanned", "toml_datetime", "winnow", ] diff --git a/nih_plug_xtask/Cargo.toml b/nih_plug_xtask/Cargo.toml index 40d5f571..9398a09d 100644 --- a/nih_plug_xtask/Cargo.toml +++ b/nih_plug_xtask/Cargo.toml @@ -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" diff --git a/nih_plug_xtask/src/symbols.rs b/nih_plug_xtask/src/symbols.rs index 7bcca3b4..200e9a54 100644 --- a/nih_plug_xtask/src/symbols.rs +++ b/nih_plug_xtask/src/symbols.rs @@ -17,9 +17,19 @@ pub fn exported>(binary: P, symbol: &str) -> Result { .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, };