Skip to content

Commit

Permalink
Meta: Remove rlibc now that upstream issue is fixed
Browse files Browse the repository at this point in the history
This issue made it impossible to use -Zbuild-std without implementing
the memory related symbols required by the core lib such as memcpy,
memset, etc yourself.

rust-lang/wg-cargo-std-aware#53

After this PR you can now tell cargo that your platform supports these
mem features and just use the built in implementations in rustc.
  • Loading branch information
AxlLind committed Oct 6, 2020
1 parent 72376f2 commit fbc9319
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 15 deletions.
1 change: 1 addition & 0 deletions .cargo/config → .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ runner = "bootimage runner --quiet"

[unstable]
build-std = ["core", "compiler_builtins", "alloc"]
build-std-features = ["compiler-builtins-mem"]
11 changes: 2 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ edition = "2018"
bootloader = { version = "0.9", features = ["map_physical_memory"] }
lazy_static = { version = "1.4", features = ["spin_no_std"] }
spin = "0.5"
rlibc = "1.0"

[package.metadata.bootimage]
run-args = ["-serial", "stdio"]
Expand Down
5 changes: 0 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
#![allow(clippy::missing_safety_doc)] // library lints
#![allow(clippy::new_without_default)]

// When using cargo's -Zbuild-std some symbols like memcpy, memset etc are not
// included, so we need to depend on this crate until this issue is fixed:
// https://github.com/rust-lang/wg-cargo-std-aware/issues/53
extern crate rlibc;

#[macro_use]
pub mod dbg_print;
pub mod interrupts;
Expand Down

0 comments on commit fbc9319

Please sign in to comment.