rustdoc icon indicating copy to clipboard operation
rustdoc copied to clipboard

Flag: configuration flags

Open steveklabnik opened this issue 8 years ago • 2 comments

This issue is part of https://github.com/steveklabnik/rustdoc/issues/125

--cfg: passing configuration flags

Using this flag looks like this:

$ rustdoc src/lib.rs --cfg feature="foo"

This flag accepts the same values as rustc --cfg, and uses it to configure compilation. The example above uses feature, but any of the cfg values are acceptable.


Should we keep this flag or not?

steveklabnik avatar Aug 10 '17 17:08 steveklabnik

This seems pretty important.

steveklabnik avatar Aug 10 '17 17:08 steveklabnik

Per https://doc.rust-lang.org/book/first-edition/conditional-compilation.html, there does not seem to be a way to pass arbitrary configuration flags from cargo. We are limited to only toggling which features we want to be turned on.

hjr3 avatar Dec 05 '17 01:12 hjr3