Right now leveldb-sys adds libstdc++ to linker flags on all systems except macOS. However, because libstdc++ it is a part of GNU project, one can rely on its presence mostly only on *-gnu platforms (x86_64-unknown-linux-gnu, x86_64-unknown-window-gnu etc).
This PR keeps linking to libstdc++ only on GNU platforms, so that users who want to compile this crate for other platforms can add necessary linking flags manually using RUSTFLAGS environment variable.
This is the simplest solution to the problem. However, adding a special environment variable for disabling linking to C++ standard library can also be considered.
Hi!
Right now
leveldb-sys
addslibstdc++
to linker flags on all systems except macOS. However, becauselibstdc++
it is a part of GNU project, one can rely on its presence mostly only on*-gnu
platforms (x86_64-unknown-linux-gnu
,x86_64-unknown-window-gnu
etc).This PR keeps linking to
libstdc++
only on GNU platforms, so that users who want to compile this crate for other platforms can add necessary linking flags manually usingRUSTFLAGS
environment variable.This is the simplest solution to the problem. However, adding a special environment variable for disabling linking to C++ standard library can also be considered.