Skip to content

Conversation

@rmsyn
Copy link
Contributor

@rmsyn rmsyn commented May 16, 2023

Nightly builds compile with the current version release (2023-05-15).

Adding codegen-units = 1 fixes compilation errors for debug builds.

See: rust-lang/compiler-builtins#523 (comment)

[profile.dev]
opt-level = "s"
lto = true
codegen-units = 1
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's put a comment here that references the upstream issue

@rmsyn rmsyn force-pushed the toolchain/nightly-2023-05-15 branch from 7aac55e to 7f05ef5 Compare May 17, 2023 01:51
@agausmann
Copy link
Owner

I can't compile with this version:

$ cargo +nightly-2023-05-15 b --release --example arduino_keyboard
...
LLVM ERROR: Expected a constant shift amount!

nightly-2023-03-24 works fine however.

Nightly builds compile with the current version release (2023-05-15).

Adding `codegen-units = 1` fixes compilation errors for debug builds.

See: rust-lang/compiler-builtins#523 (comment)
@rmsyn rmsyn force-pushed the toolchain/nightly-2023-05-15 branch from 7f05ef5 to d5aae2a Compare July 18, 2023 01:48
@rmsyn
Copy link
Contributor Author

rmsyn commented Jul 18, 2023

I can't compile with this version

🤦 I added codegen_units = 1 to the wrong build profile. Fixed now.

The build also works with the latest nightly, so we could possibly change the toolchain in rust-toolchain.toml to just be nightly.

I also needed to change usbd-hid dev dependency to a git dependency. The latest nightlies break on a previous version of proc-macro2 that the latest published release of usbd-hid depends on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants