aboutsummaryrefslogtreecommitdiff
path: root/cortex-m-rt/build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cortex-m-rt/build.rs')
-rw-r--r--cortex-m-rt/build.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/cortex-m-rt/build.rs b/cortex-m-rt/build.rs
index 1d0160c..70b7a43 100644
--- a/cortex-m-rt/build.rs
+++ b/cortex-m-rt/build.rs
@@ -1,3 +1,5 @@
+extern crate cc;
+
use std::env;
use std::fs::File;
use std::io::Write;
@@ -9,6 +11,10 @@ fn main() {
has_fpu(&target);
is_armv6m(&target);
+ if target.starts_with("thumbv") {
+ cc::Build::new().file("asm.s").compile("asm");
+ }
+
// Put the linker script somewhere the linker can find it
let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap());
File::create(out.join("link.x"))