My project consist of main application (on C) and static library (Rust).
To link properly with Rust static library I need list of required libraries by Rust runtime,
at first clean build
cargo build print list:
note: link against the following native artifacts when linking against this static library note: This list will not be printed by default. Please add --print=native-static-libs if you need this information note: library: dl note: library: rt note: library: pthread note: library: gcc_s note: library: c note: library: m note: library: util
The problem is get list if build is not from scratch.
I have hint
--print=native-static-libs, but have no idea where to put
cargo build --print=native-static-libs failed. May be this is
rustc flag? But how invoke
rustc without path to source, or how to add flags via
$ rustc --print=native-static-libs error: no input filename given $ RUSTFLAGS="--print=native-static-libs" cargo build error: unexpected character in cfg `/`, expected parens, a comma, an identifier, or a string