skade / leveldb-sys

MIT License
7 stars 15 forks source link

Link to libstdc++ only on GNU platforms #6

Closed ghost closed 5 years ago

ghost commented 5 years ago

Hi!

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.

skade commented 5 years ago

That sound reasonable. Thanks!

skade commented 5 years ago

I just released this as 2.0.2