From fca839c40f9651d84b8d6aa465b8e4169c2a0e76 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Wed, 18 Aug 2021 23:45:36 +0200 Subject: Optimize CI --- examples/.cargo/config | 19 ------------------- examples/build.rs | 5 +++++ examples/rust-toolchain.toml | 6 ------ 3 files changed, 5 insertions(+), 25 deletions(-) delete mode 100644 examples/rust-toolchain.toml (limited to 'examples') diff --git a/examples/.cargo/config b/examples/.cargo/config index b8aa023..e9a3bdb 100644 --- a/examples/.cargo/config +++ b/examples/.cargo/config @@ -1,25 +1,6 @@ [target.'cfg(all(target_arch = "arm", target_os = "none"))'] runner = "probe-run --chip nRF52840_xxAA" -rustflags = [ - # LLD (shipped with the Rust toolchain) is used as the default linker - "-C", "link-arg=--nmagic", - "-Z", "trap-unreachable=no", - "-C", "link-arg=-Tlink.x", - "-C", "link-arg=-Tdefmt.x", - - # if you run into problems with LLD switch to the GNU linker by commenting out - # this line - # "-C", "linker=arm-none-eabi-ld", - - # if you need to link to pre-compiled C libraries provided by a C toolchain - # use GCC as the linker by commenting out both lines above and then - # uncommenting the three lines below - # "-C", "linker=arm-none-eabi-gcc", - # "-C", "link-arg=-Wl,-Tlink.x", - # "-C", "link-arg=-nostartfiles", -] - [build] # Pick ONE of these compilation targets # target = "thumbv6m-none-eabi" # Cortex-M0 and Cortex-M0+ diff --git a/examples/build.rs b/examples/build.rs index d534cc3..735fa25 100644 --- a/examples/build.rs +++ b/examples/build.rs @@ -28,4 +28,9 @@ fn main() { // here, we ensure the build script is only re-run when // `memory.x` is changed. println!("cargo:rerun-if-changed=memory.x"); + + println!("cargo:rustc-link-arg-bins=--nmagic"); + println!("cargo:rustc-link-arg-bins=-Tlink.x"); + println!("cargo:rustc-link-arg-bins=-Tdefmt.x"); + } diff --git a/examples/rust-toolchain.toml b/examples/rust-toolchain.toml deleted file mode 100644 index 2db8bbd..0000000 --- a/examples/rust-toolchain.toml +++ /dev/null @@ -1,6 +0,0 @@ -# Before upgrading check that everything is available on all tier1 targets here: -# https://rust-lang.github.io/rustup-components-history -[toolchain] -channel = "nightly-2021-08-03" -components = ["rust-src", "rustfmt"] -targets = ["thumbv7em-none-eabihf"] -- cgit v1.2.3