mystor / rust-cpp

Embed C++ directly inside your rust code!
Apache License 2.0
798 stars 44 forks source link

Linker option? #7

Closed kkimdev closed 7 years ago

kkimdev commented 7 years ago

Hi, is there a way to specify custom linking options?

mystor commented 7 years ago

rust-cpp builds your C++ code with the gcc crate (https://github.com/alexcrichton/gcc-rs), and when calling the build function in rust-cpp, you must pass in a closure, which accepts the config object from gcc. Simply add the flags you want in that callback and you can configure it however you want! Checkout gcc's documentation for details on how the configuration works.