Skip to content

Commit 5b42a33

Browse files
authored
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.
1 parent 19cfb67 commit 5b42a33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/doc/build-script.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ build = "build.rs"
440440
[dependencies]
441441
libssh2-sys = { git = "https://github.com/alexcrichton/ssh2-rs" }
442442

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

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

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

0 commit comments

Comments
 (0)