mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-25 10:23:23 +00:00
Rename trojan to wrapper and add docs
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
12d01ca1e4
commit
e71c2701d6
15
framework/libs/boot-wrapper/wrapper/build.rs
Normal file
15
framework/libs/boot-wrapper/wrapper/build.rs
Normal file
@ -0,0 +1,15 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
fn main() {
|
||||
let source_dir = PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap());
|
||||
let target_arch = std::env::var("TARGET").unwrap();
|
||||
let linker_script = if target_arch == "x86_64-unknown-none" {
|
||||
source_dir.join("src/x86/amd64_efi/linker.ld")
|
||||
} else if target_arch == "x86_64-i386_pm-none" {
|
||||
source_dir.join("src/x86/legacy_i386/linker.ld")
|
||||
} else {
|
||||
panic!("Unsupported target_arch: {}", target_arch);
|
||||
};
|
||||
println!("cargo:rerun-if-changed={}", linker_script.display());
|
||||
println!("cargo:rustc-link-arg=-T{}", linker_script.display());
|
||||
}
|
Reference in New Issue
Block a user