diff options
Diffstat (limited to 'cortex-m-rt/ci/script.sh')
-rw-r--r-- | cortex-m-rt/ci/script.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/cortex-m-rt/ci/script.sh b/cortex-m-rt/ci/script.sh index 221386d..2515b8f 100644 --- a/cortex-m-rt/ci/script.sh +++ b/cortex-m-rt/ci/script.sh @@ -6,11 +6,13 @@ main() { cargo check --target $TARGET --features device local examples=( + alignment minimal main state ) if [ $TRAVIS_RUST_VERSION = nightly ]; then + # linking with GNU LD for ex in "${examples[@]}"; do cargo rustc --target $TARGET --example $ex -- \ -C link-arg=-nostartfiles \ @@ -28,6 +30,29 @@ main() { cargo rustc --target $TARGET --example device --features device --release -- \ -C link-arg=-nostartfiles \ -C link-arg=-Wl,-Tlink.x + + # linking with rustc's LLD + for ex in "${examples[@]}"; do + cargo rustc --target $TARGET --example $ex -- \ + -C linker=rust-lld \ + -Z linker-flavor=ld.lld \ + -C link-arg=-Tlink.x + + cargo rustc --target $TARGET --example $ex --release -- \ + -C linker=rust-lld \ + -Z linker-flavor=ld.lld \ + -C link-arg=-Tlink.x + done + + cargo rustc --target $TARGET --example device --features device -- \ + -C linker=rust-lld \ + -Z linker-flavor=ld.lld \ + -C link-arg=-Tlink.x + + cargo rustc --target $TARGET --example device --features device --release -- \ + -C linker=rust-lld \ + -Z linker-flavor=ld.lld \ + -C link-arg=-Tlink.x fi } |