Skip to content

libcore no longer compiles for targets with max-atomic-width = 0 #42097

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
japaric opened this issue May 19, 2017 · 2 comments · Fixed by #42098
Closed

libcore no longer compiles for targets with max-atomic-width = 0 #42097

japaric opened this issue May 19, 2017 · 2 comments · Fixed by #42098

Comments

@japaric
Copy link
Member

japaric commented May 19, 2017

due to some unused_macro warning and #![deny(warnings)]

STR

$ cargo build --target armv5te-unknown-linux-gnueabi --manifest-path $(rustc --print sysroot)/lib/rustlib/src/rust/src/libcore/Cargo.toml
   Compiling core v0.0.0 (file:///home/japaric/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore)
error: unused macro definition
    --> /home/japaric/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/sync/atomic.rs:921:1
     |
921  | / macro_rules! atomic_int {
922  | |     ($stable:meta,
923  | |      $stable_cxchg:meta,
924  | |      $stable_debug:meta,
...    |
1328 | |     }
1329 | | }
     | |_^
     |
     = note: #[deny(unused_macros)] implied by #[deny(warnings)]
note: lint level defined here
    --> /home/japaric/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/lib.rs:68:9
     |
68   | #![deny(warnings)]
     |         ^^^^^^^^

error: aborting due to previous error

error: Could not compile `core`.

To learn more, run the command again with --verbose.

Meta

$ rustc -V
rustc 1.19.0-nightly (0ed1ec9f9 2017-05-18)
japaric added a commit to japaric/rust that referenced this issue May 19, 2017
when compiling the crate for a target with max-atomic-width = 0

fixes rust-lang#42097
@nagisa
Copy link
Member

nagisa commented May 19, 2017

Isn’t it supposed to be a guranatee that ptr-sized atomics are always available? Is this a custom target of some sort?

@japaric
Copy link
Member Author

japaric commented May 19, 2017

Isn’t it supposed to be a guranatee that ptr-sized atomics are always available?

Hmm, no?

Is this a custom target of some sort?

At least two built-in targets have max-atomic-width = 0.

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue May 20, 2017
core: fix unused_macro warning

when compiling the crate for a target with max-atomic-width = 0

fixes rust-lang#42097
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants