summaryrefslogtreecommitdiff
path: root/ci/dox.sh
diff options
context:
space:
mode:
authorFrancis Gagné <fragag1@gmail.com>2018-03-18 14:09:07 -0400
committerFrancis Gagné <fragag1@gmail.com>2018-03-18 16:39:40 -0400
commit18341fd23a2221ef6d111d2072f9f8bcef3c6a67 (patch)
tree28529360d15120728ebdbe2ffb5a6039c8f551b8 /ci/dox.sh
parent3e9ccfa72f32b99185814371753664c5b8925dfb (diff)
downloadrust-libc-18341fd23a2221ef6d111d2072f9f8bcef3c6a67.tar.gz
Rename the dox configuration option to cross_platform_docs
The libc crate is used as a dependency of the Rust compiler. Its build system passes `--cfg dox` to all crates when generating their documentation. libc's documentation is generated when the build system is asked to generate the compiler documentation because `cargo doc` automatically documents all dependencies. When the dox configuration option is enabled, libc disables its dependency on the core crate and provides the necessary definitions itself. The dox configuration option is meant for generating documentation for a multitude of targets even if the core crate for that target is not installed. However, when documenting the compiler, it's not necessary to do that; we can just use core or std as usual. This change is motivated by the changes made to the compiler in rust-lang/rust#48171. With these changes, it's necessary to provide implementations of the Clone and Copy traits for some primitive types in the library that defines these traits (previously, these implementations were provided by the compiler). Normally, these traits (and thus the implementations) are provided by core, so any crate that uses `#![no_core]` must now provide its own copy of the implementations. Because libc doesn't provide its own copy of the implementations yet, and because the compiler's build system passes `--cfg dox` to libc, generating the documentation for the compiler fails when generating documentation for libc. By renaming the configuration option, libc will use core or std and will thus have the necessary definitions for the documentation to be generated successfully.
Diffstat (limited to 'ci/dox.sh')
-rw-r--r--ci/dox.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/ci/dox.sh b/ci/dox.sh
index 85e9243948..b8ffa7dd0d 100644
--- a/ci/dox.sh
+++ b/ci/dox.sh
@@ -16,7 +16,7 @@ cp ci/landing-page-head.html target/doc/index.html
for target in $TARGETS; do
echo documenting $target
- rustdoc -o target/doc/$target --target $target src/lib.rs --cfg dox \
+ rustdoc -o target/doc/$target --target $target src/lib.rs --cfg cross_platform_docs \
--crate-name libc
echo "<li><a href="/libc/$target/libc/index.html">$target</a></li>" \