mirror of
https://github.com/italicsjenga/gba.git
synced 2024-12-23 19:01:30 +11:00
5114f89448
* Simplify build process - Remove dependencies on DevkitPro - Use linker similarly to min-gba - Update cargo.toml so that dev builds will build - Update cargo config so that std builds can run without the linker for testing purposes - Update CI flow to remove xbuild dependency * Add windows toolchain install * Add windows section to toolchain install instructions
17 lines
600 B
Rust
17 lines
600 B
Rust
fn main() {
|
|
let out_file = "rsrt0.o";
|
|
let out_dir = std::env::var("OUT_DIR").unwrap();
|
|
let out_dir_file = format!("{}/{}", out_dir, out_file);
|
|
let as_output = std::process::Command::new("arm-none-eabi-as")
|
|
.args(&["-o", out_dir_file.as_str()])
|
|
.arg("-mthumb-interwork")
|
|
.arg("-mcpu=arm7tdmi")
|
|
.arg("src/rsrt0.S")
|
|
.output()
|
|
.expect("failed to run arm-none-eabi-as");
|
|
if !as_output.status.success() {
|
|
panic!("{}", String::from_utf8_lossy(&as_output.stderr));
|
|
}
|
|
//
|
|
println!("cargo:rustc-link-search={}", out_dir);
|
|
} |