rust-lang / cc-rs

Rust library for build scripts to compile C/C++ code into a Rust library
https://docs.rs/cc
Apache License 2.0
1.81k stars 434 forks source link

ar_flag problem #1011

Closed flyingyizi closed 5 months ago

flyingyizi commented 5 months ago

I find the ar flag fixed to "cq", can not modify it . for example, when setting builder.ar_flag("rcs"). the finally command will be like "gcc-ar rcs cq libxxxx.a ......".

it is a problem, or maybe other way change it?

why must use "rcs" flag not "cq"?

when the archive file generated by cq flag, "gcc : plugin needed to handle lto object" error occours, but when the archive generated by "rcs" flags, this error will disappear.

flyingyizi commented 5 months ago

use other way(call archive command outside) to resolve it. it is maybe not easy for cc-rs to do it.