build-dependencies right now is quite special in that it neither supports feature gating, not does it treat targets the same way as the rest of the code. Specifically, when I have this in Cargo.toml: [target.'cfg(target_arch = "xyz")'.build-dependencies] It doesn't mean the crate is being compiled for xyz target, rather it means the build script will. And without support for features, there doesn't seem to be any way to include a dependency only when the crate is compiled for a specific targe...