mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-24 01:43:22 +00:00
Enhance OSDK performance by using hard link instead of copy
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
7601509e6e
commit
9d82ac8958
@ -17,7 +17,7 @@ use crate::{
|
||||
bin::{AsterBin, AsterBinType, AsterBzImageMeta, AsterElfMeta},
|
||||
file::BundleFile,
|
||||
},
|
||||
util::get_current_crate_info,
|
||||
util::{get_current_crate_info, hard_link_or_copy},
|
||||
};
|
||||
|
||||
pub fn make_install_bzimage(
|
||||
@ -115,7 +115,7 @@ pub fn make_elf_for_qemu(install_dir: impl AsRef<Path>, elf: &AsterBin, strip: b
|
||||
}
|
||||
} else {
|
||||
// Copy the ELF file.
|
||||
std::fs::copy(elf.path(), &result_elf_path).unwrap();
|
||||
hard_link_or_copy(elf.path(), &result_elf_path).unwrap();
|
||||
}
|
||||
|
||||
if elf.arch() == Arch::X86_64 {
|
||||
|
Reference in New Issue
Block a user