To reproduce:
// foo.rs
#![feature(link_args)]
#[link_args = "-Wl,-just_die"]
extern {}
// main.rs
extern crate foo;
fn main() {}
Build with:
rustc foo.rs --crate-type lib
rustc main.rs -L .
This successfully builds (and it shouldn't, if it would pass the -Wl,-just_die). (--verbose is not usable here because of #36175). If I replace #[link_args] with e.g. #[link(name = "just_die")] then the linker invocation fails, so I believe this is a bug with link_args.
To reproduce:
Build with:
This successfully builds (and it shouldn't, if it would pass the
-Wl,-just_die). (--verboseis not usable here because of #36175). If I replace#[link_args]with e.g.#[link(name = "just_die")]then the linker invocation fails, so I believe this is a bug with link_args.