Skip to content

Commit

Permalink
Remove unused "mem" feature
Browse files Browse the repository at this point in the history
  • Loading branch information
mkroening committed Dec 5, 2021
1 parent c19b63d commit d642c74
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions hermit-sys/build.rs
Expand Up @@ -153,13 +153,6 @@ fn build_hermit(src_dir: &Path, target_dir_opt: Option<&Path>) {
rename_symbol("rust_begin_unwind", &lib);
rename_symbol("rust_oom", &lib);

#[cfg(feature = "mem")]
{
for symbol in ["memcpy", "memmove", "memset", "memcmp", "bcmp"] {
rename_symbol(symbol, &lib);
}
}

println!("cargo:rustc-link-search=native={}", lib_location.display());
println!("cargo:rustc-link-lib=static=hermit");

Expand All @@ -169,8 +162,6 @@ fn build_hermit(src_dir: &Path, target_dir_opt: Option<&Path>) {

/// Kernel and user space has its own versions of panic handler, oom handler, memcpy, memset, etc,
/// Consequently, we rename the functions in the libos to avoid collisions.
/// In addition, it provides us the offer to create a optimized version of memcpy
/// in user space.
fn rename_symbol(symbol: impl AsRef<OsStr>, lib: impl AsRef<Path>) {
let arg = IntoIterator::into_iter([symbol.as_ref(), "=kernel-".as_ref(), symbol.as_ref()])
.collect::<OsString>();
Expand Down

0 comments on commit d642c74

Please sign in to comment.