Skip to content
Snippets Groups Projects
Verified Commit c0cb55dc authored by Denis Smirnov's avatar Denis Smirnov
Browse files

fix: supress dead code stripping in the linker on macos

We don't want to strip unused symbols from the static libraries on
the linking stage. This leads to problems with tarantool's crypto
module. Some symbols ("crypto_EVP_get_digestbyname" for example)
were used only by the ffi calls inside `crypto.lua` file. So the
linker stripped these symbols as it was not able to find their
usage in the rest of the C code. This produced SIGABRT on the
picodata startup when tarantool_lua_init() initialized the crypto
module.
parent a55d0d9b
No related branches found
No related tags found
No related merge requests found
Pipeline #16648 failed
......@@ -34,6 +34,13 @@ fn main() {
std::env::set_var("MAKEFLAGS", makeflags);
}
if cfg!(target_os = "macos") {
// We don't want to strip unused symbols from the static libraries on the linking stage.
// This leads to problems with tarantool's `crypto` module (some symbols were used only
// by the ffi calls inside `crypto.lua` file and were stripped by the linker).
rustc::link_arg("-C link-dead-code=on");
}
for (var, value) in std::env::vars() {
println!("[{}:{}] {var}={value}", file!(), line!());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment