Skip to content

Commit

Permalink
examples: Fix build-std settings for compiler-builtins
Browse files Browse the repository at this point in the history
This is a workaround to ensure intrinsics get linked in from avr-libc
instead of Rust's compiler-builtins.  The problem is that the versions
from compiler-builtins have slightly different calling convention and as
such cannot actually be substituted for the versions from avr-libc right
now.

This should fix a lot of the observed problems with 32-bit arithmetic.

Ref: rust-lang/rust#82242 (comment)
  • Loading branch information
Rahix committed Jan 28, 2022
1 parent d4435b0 commit 4d288ac
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/arduino-diecimila/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ runner = "ravedude diecimila"

[unstable]
build-std = ["core"]
build-std-features = ["compiler-builtins-mangled-names"]
1 change: 1 addition & 0 deletions examples/arduino-leonardo/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ runner = "ravedude leonardo"

[unstable]
build-std = ["core"]
build-std-features = ["compiler-builtins-mangled-names"]
1 change: 1 addition & 0 deletions examples/arduino-mega2560/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ runner = "ravedude -cb 57600 mega2560"

[unstable]
build-std = ["core"]
build-std-features = ["compiler-builtins-mangled-names"]
1 change: 1 addition & 0 deletions examples/arduino-nano/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ runner = "ravedude nano -cb 57600"

[unstable]
build-std = ["core"]
build-std-features = ["compiler-builtins-mangled-names"]
1 change: 1 addition & 0 deletions examples/arduino-uno/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ runner = "ravedude uno -cb 57600"

[unstable]
build-std = ["core"]
build-std-features = ["compiler-builtins-mangled-names"]
1 change: 1 addition & 0 deletions examples/nano168/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ runner = "ravedude nano168 -cb 57600"

[unstable]
build-std = ["core"]
build-std-features = ["compiler-builtins-mangled-names"]
1 change: 1 addition & 0 deletions examples/sparkfun-promicro/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ runner = "ravedude promicro"

[unstable]
build-std = ["core"]
build-std-features = ["compiler-builtins-mangled-names"]
1 change: 1 addition & 0 deletions examples/trinket-pro/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ runner = "ravedude trinket-pro"

[unstable]
build-std = ["core"]
build-std-features = ["compiler-builtins-mangled-names"]
1 change: 1 addition & 0 deletions examples/trinket/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ runner = "ravedude trinket"

[unstable]
build-std = ["core"]
build-std-features = ["compiler-builtins-mangled-names"]

0 comments on commit 4d288ac

Please sign in to comment.