xref: /DragonBoot/build-scripts/dragon_boot_build/src/utils/ld_scripts.rs (revision 0ec3a34a58ffc0a9c51a23a7ee5e7d803a0060cd)
1 use super::cargo_handler::{CargoHandler, TargetArch};
2 
setup()3 pub fn setup() {
4     let arch = CargoHandler::target_arch();
5     match arch {
6         TargetArch::Riscv64 => {
7             // CargoHandler::emit_link_arg("-Tsrc/arch/riscv64/link.ld");
8             CargoHandler::emit_link_arg("-Tsrc/arch/riscv64/link.ld");
9             CargoHandler::emit_link_arg("--emit-relocs");
10             CargoHandler::emit_link_arg("--nmagic");
11 
12             CargoHandler::emit_link_arg("--no-relax");
13         }
14         _ => panic!("Unsupported arch: {:?}", arch),
15     }
16 }
17