You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fourth way is to.. opt into another unstable feature:
[Rust code]
[Shell session]
Hey, it built!
Describe the issue and a fix if you know it
This errors out with a recent rustc (I'm using rustc 1.62.0 (Arch Linux rust 1:1.62.0-1)):
error[E0557]: feature has been removed
--> src/sel4user/main.rs:5:12
|
5 | #![feature(link_args)]
| ^^^^^^^^^ feature has been removed
|
= note: removed in favor of using `-C link-arg=ARG` on command line, which is available from cargo build scripts with `cargo:rustc-link-arg` now
error: cannot find attribute `link_args` in this scope
--> src/sel4user/main.rs:8:3
|
8 | #[link_args = "-nostartfiles"]
| ^^^^^^^^^ help: a built-in attribute with a similar name exists: `linkage`
For more information about this error, try `rustc --explain E0557`.
I've managed to get it to work with this build.rs build script
fnmain(){// don't link with stdlibprintln!("cargo:rustc-link-arg-bin=<NAME OF BINARY>=-nostartfiles");}
docs about cargo:rustc-link-arg-bin (I have multiple binaries in the same project so need the BIN=FLAGS form, but if there's only a single binary then just cargo:rustc-link-arg-bin=-nostartfiles should work)
The text was updated successfully, but these errors were encountered:
Where's the problem at?
https://fasterthanli.me/series/making-our-own-executable-packer/part-12
No, seriously, where is it?
Describe the issue and a fix if you know it
This errors out with a recent rustc (I'm using
rustc 1.62.0 (Arch Linux rust 1:1.62.0-1)
):I've managed to get it to work with this
build.rs
build scriptcargo:rustc-link-arg-bin
(I have multiple binaries in the same project so need the BIN=FLAGS form, but if there's only a single binary then justcargo:rustc-link-arg-bin=-nostartfiles
should work)The text was updated successfully, but these errors were encountered: