]> git.ipfire.org Git - thirdparty/tor.git/commit
Use a rust build script to set linker options correctly for tests.
authorNick Mathewson <nickm@torproject.org>
Mon, 18 Jun 2018 21:08:23 +0000 (17:08 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 19 Jun 2018 16:01:13 +0000 (12:01 -0400)
commitbd9ebb3763b90a8ef429376ee578e0571371145f
tree06a8e6fd20118ec47e87dc36a4b9780f809360d6
parentd27745d81de8829d1a6da851fe9be057458e86df
Use a rust build script to set linker options correctly for tests.

We need this trick because some of our Rust tests depend on our C
code, which in turn depend on other native libraries, which thereby
pulls a whole mess of our build system into "cargo test".

To solve this, we add a build script (build.rs) to set most of the
options that we want based on the contents of config.rust.  Some
options can't be set, and need to go to the linker directly: we use
a linker replacement (link_rust.sh) for these.  Both config.rust and
link_rust.sh are generated by autoconf for us.

This patch on its own should enough to make the crypto test build,
but not necessarily enough to make it pass.
.gitignore
config.rust.in [new file with mode: 0644]
configure.ac
link_rust.sh.in [new file with mode: 0644]
src/rust/build.rs [new file with mode: 0644]
src/rust/crypto/Cargo.toml
src/test/include.am