mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-26 10:53:25 +00:00
Add workarounds for slow memcpy
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
56a4909211
commit
f581ebdd03
@ -208,6 +208,13 @@ fn build_kernel_elf(
|
||||
"-C panic=unwind",
|
||||
]);
|
||||
|
||||
if matches!(arch, Arch::X86_64) {
|
||||
// This is a workaround for <https://github.com/asterinas/asterinas/issues/839>.
|
||||
// It makes running on Intel CPUs after Ivy Bridge (2012) faster, but much slower
|
||||
// on older CPUs.
|
||||
rustflags.push("-C target-feature=+ermsb");
|
||||
}
|
||||
|
||||
let mut command = cargo();
|
||||
command.env_remove("RUSTUP_TOOLCHAIN");
|
||||
command.env("RUSTFLAGS", rustflags.join(" "));
|
||||
|
Reference in New Issue
Block a user