Skip to content

Commit

Permalink
Use rustc-workspace-hack for rustbook
Browse files Browse the repository at this point in the history
As rustbook now depends transitively on openssl, it needs access to the
rustc-workspace-hack/all-static feature to pick up openssl-sys/vendored.
This fixes the rust build with `all-static = true` on systems where
openssl is not installed (e.g. when cross-compiling).
  • Loading branch information
smaeul committed Oct 29, 2019
1 parent cac6821 commit c648ad5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3103,6 +3103,7 @@ dependencies = [
"failure",
"mdbook",
"mdbook-linkcheck",
"rustc-workspace-hack",
]

[[package]]
Expand Down
1 change: 1 addition & 0 deletions src/bootstrap/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ pub fn prepare_tool_cargo(
path.ends_with("rls") ||
path.ends_with("clippy") ||
path.ends_with("miri") ||
path.ends_with("rustbook") ||
path.ends_with("rustfmt")
{
cargo.env("LIBZ_SYS_STATIC", "1");
Expand Down
5 changes: 5 additions & 0 deletions src/tools/rustbook/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ clap = "2.25.0"
failure = "0.1"
mdbook-linkcheck = { version = "0.3.0", optional = true }

# A noop dependency that changes in the Rust repository, it's a bit of a hack.
# See the `src/tools/rustc-workspace-hack/README.md` file in `rust-lang/rust`
# for more information.
rustc-workspace-hack = "1.0.0"

[dependencies.mdbook]
version = "0.3.0"
default-features = false
Expand Down

0 comments on commit c648ad5

Please sign in to comment.