Skip to content

Commit

Permalink
Auto merge of #3134 - whitequark:patch-1, r=steveklabnik
Browse files Browse the repository at this point in the history
doc: build-script: use cfg(unix), not a hardcoded x86_64 triple

This used to not be possible, but it is now, so let's promote best practices.
  • Loading branch information
bors authored Sep 29, 2016
2 parents 19cfb67 + 5b42a33 commit 9442cc3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/doc/build-script.md
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ build = "build.rs"
[dependencies]
libssh2-sys = { git = "https://github.com/alexcrichton/ssh2-rs" }

[target.x86_64-unknown-linux-gnu.dependencies]
[target.'cfg(unix)'.dependencies]
openssl-sys = { git = "https://github.com/alexcrichton/openssl-sys" }

# ...
Expand All @@ -452,7 +452,7 @@ crate (`libgit2-sys`) links to the `git2` native library.

Here we also see the unconditional dependency on `libssh2` via the
`libssh2-sys` crate, as well as a platform-specific dependency on `openssl-sys`
for unix (other variants elided for now). It may seem a little counterintuitive
for \*nix (other variants elided for now). It may seem a little counterintuitive
to express *C dependencies* in the *Cargo manifest*, but this is actually using
one of Cargo’s conventions in this space.

Expand Down

0 comments on commit 9442cc3

Please sign in to comment.