PSA: MSVC's link.exe will add any text it finds in the ".drectve" section of your .obj file to the link.exe command line arguments. In combination with "#[link_section]" this allows you to add Windows linker arguments on stable Rust!
-
-
`-Clink-arg{,s}` is stable, though? I don’t think we have a stable or unstable rust-specific way of adding link arguments from source. I feel like I missed a point.
-
This is useful if you want to embed the linker arguments directly in your crate source. For example I'm writing a macro you can include to opt into the discrete GPU on Windows (it requires special linker arguments), without having to mess with the linker.
End of conversation
New conversation -
-
-
Arguably this doesn't fall under the Rust project's stability promise... but yeah if usage becomes widespread enough it could become a de-facto standard
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.