Skip to content
This repository has been archived by the owner on Oct 12, 2021. It is now read-only.

mrtims/multitarget-issue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fix

Use resolver = "2" to avoid a std/no-std clash when building for different targets

Original Issue

arm.rs is destined for thumbv7em-none-eabihf, while win.rs is for x86_64-pc-windows-msvc.

cargo build --bin arm --target thumbv7em-none-eabihf

Should build arm.rs just fine, and

cargo build --bin win --target x86_64-pc-windows-msvc

should build win.rs.

However with the cargo.toml file here, the arm build fails with:

Compiling byteorder v1.4.3
error[E0463]: can't find crate for `std`
  |
  = note: the `thumbv7em-none-eabihf` target may not support the standard library
  = note: `std` is required by `byteorder` because it does not declare `#![no_std]`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: could not compile `byteorder`

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

Commenting out either heapless from the ARM dependencies or embedded-graphics-simulator from the windows dependencies fixes this issue. However having both at the same time seems to cause some kind of std/no_std clash.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages