]> git.proxmox.com Git - cargo.git/commit
Auto merge of #1505 - alexcrichton:issue-1478, r=brson
authorbors <bors@rust-lang.org>
Wed, 29 Apr 2015 18:51:34 +0000 (18:51 +0000)
committerbors <bors@rust-lang.org>
Wed, 29 Apr 2015 18:51:34 +0000 (18:51 +0000)
commitf1d6a1a6e672686380a742c5ac7193225a321926
tree22799e5c3c3a7bbadb913fd0c4c4f8d6f23dd22d
parentaeded213978ed57580208669b9b40d9c1c1306bb
parent61a0ace4b02a28977173feb66d082b2916a6d46a
Auto merge of #1505 - alexcrichton:issue-1478, r=brson

This commit enables the build script for a crate to provide feedback to the
crate itself about how it should be built. This is done through the `--cfg`
flags of the compiler, and each build script is now allowed to print `rustc-cfg`
directives to inform Cargo about what `--cfg` flags it should pass.

All `--cfg` flags are local to the current crate and are not propagated outwards
to transitive dependencies. The primary use-case that this feature is targeting
is compile-time feature detection for applications like C bindings or C
libraries where the version being targeted may change over time.

Closes #1478
src/cargo/ops/cargo_compile.rs
src/doc/build-script.md