Are targets not supported for build-dependencies?

I published (to a private registry) a crate that contains:

[target.'cfg(unix)'.build-dependencies]
cc = { version = "1.2.6", features = ["parallel"] }

However, attempting to build a project that uses this crate, failed (same error as here).

I changed it to a plain [build-dependencies] instead, up'd the version, published and tried again and it succeeded.

Clearly there's something about target.'cfg(unix)'. it does not like -- but is this intentional or should it be reported? It seems to work fine when building using local paths.

.. and yes, I'm building on a unix platform. :slight_smile:

This is very strange. Could you run rustc --print=cfg and paste the output here?

Sure:

$ rustc --print=cfg
debug_assertions
panic="unwind"
target_abi=""
target_arch="x86_64"
target_endian="little"
target_env=""
target_family="unix"
target_feature="cmpxchg16b"
target_feature="fxsr"
target_feature="sse"
target_feature="sse2"
target_feature="sse3"
target_feature="sse4.1"
target_feature="ssse3"
target_has_atomic="128"
target_has_atomic="16"
target_has_atomic="32"
target_has_atomic="64"
target_has_atomic="8"
target_has_atomic="ptr"
target_os="macos"
target_pointer_width="64"
target_vendor="apple"
unix

Hm, sorry, no idea why target.'cfg(unix)'.build-dependencies isn't working on your machine.