mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-20 02:09:24 +01:00
bd9ebb3763
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.
11 lines
355 B
Bash
11 lines
355 B
Bash
#!/bin/sh
|
|
#
|
|
# A linker script used when building Rust tests. Autoconf makes link_rust.sh
|
|
# from link_rust_sh.in, and uses it to pass extra options to the linker
|
|
# when linking Rust stuff.
|
|
#
|
|
# We'd like to remove the need for this, but build.rs doesn't let us pass
|
|
# -static-libasan and -static-libubsan to the linker.
|
|
|
|
"$CCLD" @RUST_LINKER_OPTIONS@ "$@"
|