Skip to content

Conversation

@phil-opp
Copy link
Owner

@phil-opp phil-opp commented Apr 8, 2018

Since rust-lang/rust#49503, Rust automatically injects a dependency on compiler_builtins whenever a dependency on core is injected (i.e. all no_std applications that aren't no_core). This means that compilation fails if xargo builds only core (which is the default).

To also build compiler_builtins, a Xargo.toml with the following content is required:

[dependencies.core]
stage = 0

[dependencies.compiler_builtins]
features = ["mem"]
stage = 1

The features = ["mem"] line is not required, but removes the need for rlibc.

Edit: With xargo 0.3.12, the compiler_builtins crate is built by default. So the Xargo.toml is not necessary (unless you need the alloc crate). In #427, we removed the file again.

@phil-opp phil-opp added the relnotes "Release notes" – Notable changes that are rendered on the blog. label Apr 8, 2018
@phil-opp phil-opp merged commit dcf8b77 into master Apr 8, 2018
@bors bors bot deleted the compiler-builtins branch April 8, 2018 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

relnotes "Release notes" – Notable changes that are rendered on the blog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants