Skip to content

Commit f3d12ed

Browse files
committed
Add a note on conditional build-dependencies
1 parent f37a0d4 commit f3d12ed

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

text/0000-metabuild.mdwn

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ requiring a sufficiently new version of Cargo to understand `metabuild`.
9292

9393
If any of the strings mentioned in `metabuild` do not match one of the
9494
build-dependencies, Cargo should produce an error (*before* attempting to
95-
generate and compile a `build.rs` script).
95+
generate and compile a `build.rs` script). However, if a string matches a
96+
conditional build-dependency, such as one conditional on a feature or target,
97+
then Cargo should only invoke that build-dependency's `metabuild` function when
98+
those conditions apply.
9699

97100
Cargo's documentation on `metabuild` should recommend a preferred crate for
98101
parsing data from `Cargo.toml`, to avoid every provider of a metabuild function

0 commit comments

Comments
 (0)