Skip to content
Snippets Groups Projects

fix: MacOS building and linking problems

Merged Denis Smirnov requested to merge macos into master
1 file
+ 7
0
Compare changes
  • Side-by-side
  • Inline
  • 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.
+ 7
0
@@ -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!());
}
Loading