Skip to content

Commit

Permalink
Rollup merge of rust-lang#83820 - petrochenkov:nolinkargs, r=nagisa
Browse files Browse the repository at this point in the history
Remove attribute `#[link_args]`

Closes rust-lang#29596

The attribute could always be replaced with `-C link-arg`, but cargo didn't provide a reasonable way to pass such flags to rustc.
Now cargo supports `cargo:rustc-link-arg*` directives in build scripts (https://doc.rust-lang.org/cargo/reference/unstable.html#extra-link-arg), so this attribute can be removed.
  • Loading branch information
Dylan-DPC committed Apr 4, 2021
2 parents 2ca5368 + c726448 commit 44e3ccb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/ui/crate_level_checks/no_std_main_recursion.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// compile-flags: -Clink-arg=-nostartfiles
// ignore-macos
// ignore-windows

#![feature(lang_items, link_args, start, libc)]
#![link_args = "-nostartfiles"]
#![feature(lang_items, start, libc)]
#![no_std]

use core::panic::PanicInfo;
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/empty_loop_no_std.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// compile-flags: -Clink-arg=-nostartfiles
// ignore-macos
// ignore-windows

#![warn(clippy::empty_loop)]
#![feature(lang_items, link_args, start, libc)]
#![link_args = "-nostartfiles"]
#![feature(lang_items, start, libc)]
#![no_std]

use core::panic::PanicInfo;
Expand Down

0 comments on commit 44e3ccb

Please sign in to comment.