Skip to content

Commit 4e8854b

Browse files
committed
hermit-builtins: Build mem via build-std-features
See #627 (comment)
1 parent 4a89f31 commit 4e8854b

File tree

4 files changed

+10
-16
lines changed

4 files changed

+10
-16
lines changed

hermit-builtins/Cargo.lock

-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hermit-builtins/Cargo.toml

-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,3 @@ edition = "2021"
55

66
[lib]
77
crate-type = ["staticlib"]
8-
9-
[dependencies]
10-
mem-builtins = { package = "compiler_builtins", version = "0.1", features = ["mem"] }

hermit-builtins/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#![no_std]
22

3-
use mem_builtins as _;
4-
53
#[panic_handler]
64
fn panic(_info: &core::panic::PanicInfo) -> ! {
75
loop {}

xtask/src/arch.rs

+10-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,16 @@ impl Arch {
3232

3333
pub fn builtins_cargo_args(&self) -> &'static [&'static str] {
3434
match self {
35-
Arch::X86_64 => &["--target=x86_64-unknown-hermit", "-Zbuild-std=core"],
36-
Arch::AArch64 => &["--target=aarch64-unknown-hermit", "-Zbuild-std=core"],
35+
Arch::X86_64 => &[
36+
"--target=x86_64-unknown-hermit",
37+
"-Zbuild-std=core",
38+
"-Zbuild-std-features=compiler-builtins-mem",
39+
],
40+
Arch::AArch64 => &[
41+
"--target=aarch64-unknown-hermit",
42+
"-Zbuild-std=core",
43+
"-Zbuild-std-features=compiler-builtins-mem",
44+
],
3745
}
3846
}
3947

0 commit comments

Comments
 (0)