dtolnay / linkme

Safe cross-platform linker shenanigans
Apache License 2.0
628 stars 42 forks source link

Add CI build with target_os = "none" #13

Closed dtolnay closed 5 years ago

dtolnay commented 5 years ago

@arcnmx do you have any tips for how to set this up? Having some kind of test would help me avoid accidentally breaking your code.

arcnmx commented 5 years ago

Based on cortex-m-quickstart, here's a very quickly hacked-together minimal example: https://github.com/arcnmx/cortex-m-linkme-example

rustup target add --toolchain nightly thumbv7m-none-eabi
cargo +nightly run --release # requires qemu-system-arm installed

Unfortunately I'm not aware of any support for the test crate, but you can get exit codes normally (panic exits with failure). Should be easy enough to set up a simple smoke test at the least.

arcnmx commented 5 years ago

Also see the orphan branch for a test that doesn't need to explicitly set up the sections.