mirror of
https://github.com/italicsjenga/gba.git
synced 2025-01-11 11:31:31 +11:00
JYN said this should work.
This commit is contained in:
parent
60ab38458c
commit
28f81b51e4
|
@ -31,3 +31,5 @@ panic = "abort"
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
default-target = "thumbv4t-none-eabi"
|
default-target = "thumbv4t-none-eabi"
|
||||||
|
cargoflags = ["-Zbuild-std=core"]
|
||||||
|
rustdoc-args = ["--cfg","docs_rs"]
|
||||||
|
|
19
build.rs
19
build.rs
|
@ -1,17 +1,20 @@
|
||||||
fn main() {
|
fn main() {
|
||||||
|
// we skip assembling the runtime for docs.rs builds.
|
||||||
|
if !cfg!(docs_rs) {
|
||||||
let out_file = "rsrt0.o";
|
let out_file = "rsrt0.o";
|
||||||
let out_dir = std::env::var("OUT_DIR").unwrap();
|
let out_dir = std::env::var("OUT_DIR").unwrap();
|
||||||
let out_dir_file = format!("{}/{}", out_dir, out_file);
|
let out_dir_file = format!("{}/{}", out_dir, out_file);
|
||||||
let as_output = std::process::Command::new("arm-none-eabi-as")
|
let as_output = std::process::Command::new("arm-none-eabi-as")
|
||||||
.args(&["-o", out_dir_file.as_str()])
|
.args(&["-o", out_dir_file.as_str()])
|
||||||
.arg("-mthumb-interwork")
|
.arg("-mthumb-interwork")
|
||||||
.arg("-mcpu=arm7tdmi")
|
.arg("-mcpu=arm7tdmi")
|
||||||
.arg("src/rsrt0.S")
|
.arg("src/rsrt0.S")
|
||||||
.output()
|
.output()
|
||||||
.expect("failed to run arm-none-eabi-as");
|
.expect("failed to run arm-none-eabi-as");
|
||||||
if !as_output.status.success() {
|
if !as_output.status.success() {
|
||||||
panic!("{}", String::from_utf8_lossy(&as_output.stderr));
|
panic!("{}", String::from_utf8_lossy(&as_output.stderr));
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
println!("cargo:rustc-link-search={}", out_dir);
|
println!("cargo:rustc-link-search={}", out_dir);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue