Skip to content

Commit 7c37171

Browse files
YtvwlDnicholasbishop
authored andcommitted
Use build-std-features instead of rlibc
1 parent d0b78d0 commit 7c37171

File tree

7 files changed

+3
-12
lines changed

7 files changed

+3
-12
lines changed

.cargo/config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[unstable]
22
build-std = ["core", "compiler_builtins", "alloc"]
3+
build-std-features = ["compiler-builtins-mem"]

BUILDING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ application. Copy it to a new directory to get started.
2424

2525
- Build using a `nightly` version of the compiler and activate the
2626
[`build-std`](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#build-std)
27-
Cargo feature: `cargo +nightly build -Z build-std --target x86_64-unknown-uefi`.
27+
Cargo features: `cargo +nightly build -Z build-std -Z build-std-features=compiler-builtins-mem --target x86_64-unknown-uefi`.
2828

2929
- The `target` directory will contain a `x86_64-unknown-uefi` subdirectory,
3030
where you will find the `uefi_app.efi` file - a normal UEFI executable.

template/.cargo/config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[unstable]
22
build-std = ["core", "compiler_builtins", "alloc"]
3+
build-std-features = ["compiler-builtins-mem"]

template/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ version = "0.1.0"
44
edition = "2018"
55

66
[dependencies]
7-
rlibc = "1.0.0"
8-
97
# In a real application, change these to point to the latest release
108
# on crates.io.
119
uefi = { path = "..", features = ["exts"] }

template/src/main.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#![no_std]
33
#![feature(abi_efiapi)]
44

5-
extern crate rlibc;
6-
75
use uefi::prelude::*;
86
use uefi::ResultExt;
97

uefi-test-runner/Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ uefi-services = { path = "../uefi-services" }
1111

1212
log = { version = "0.4.11", default-features = false }
1313

14-
# When building using Cargo's `build-std` feature, the `mem` feature of `compiler-builtins`
15-
# does not automatically get enabled. Therefore, we have to manually add support for
16-
# the memory functions.
17-
rlibc = "1.0.0"
1814
qemu-exit = "2.0.0"
1915

2016
[features]

uefi-test-runner/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ extern crate log;
88
#[macro_use]
99
extern crate alloc;
1010

11-
// Keep this line to ensure the `mem*` functions are linked in.
12-
extern crate rlibc;
13-
1411
use alloc::string::String;
1512
use core::mem;
1613
use uefi::prelude::*;

0 commit comments

Comments
 (0)