aboutsummaryrefslogtreecommitdiff
path: root/cortex-m-semihosting/build.rs
diff options
context:
space:
mode:
authorGravatar bors[bot] <26634292+bors[bot]@users.noreply.github.com> 2020-10-22 11:10:57 +0000
committerGravatar GitHub <noreply@github.com> 2020-10-22 11:10:57 +0000
commit25f6613a6236d42d448d12b36557824a10ce7a77 (patch)
tree68f8505188d28073430e155c5b6df9e0dd347654 /cortex-m-semihosting/build.rs
parenta6be5607611beb55e4509abb873fbac32fbdf612 (diff)
parenteefd67289e1610f06a4f3974645f0fd55b546899 (diff)
downloadcortex-m-25f6613a6236d42d448d12b36557824a10ce7a77.tar.gz
cortex-m-25f6613a6236d42d448d12b36557824a10ce7a77.tar.zst
cortex-m-25f6613a6236d42d448d12b36557824a10ce7a77.zip
Merge #273c-m-sh-v0.4.1
273: c-m-sh: fix missing prebuilt binaries. closes #271 r=adamgreig a=adamgreig Adding a symlink to `../bin` allows `cargo package` to include a copy of the binary files in the resulting tarball, which means the build script is able to link them as normal. * We include the `-lto.a` files, but don't have an LTO_PLUGIN feature and so never use them * While this should work for all platforms to use from crates.io, it's not clear what e.g. Windows will do with the symlink when trying to use this as a path/patch dependency directly from the git repository. If it seems useful I could probably add a LTO feature the same as cortex-m, but I'd rather wait until we can have c-m-sh just directly use cortex-m's `syscall` method and then users can enable that feature in cortex-m themselves instead. If anyone has this set up on Windows and is able to see if you can still use this repository as a path dependency, that would be great! Co-authored-by: Adam Greig <adam@adamgreig.com>
Diffstat (limited to 'cortex-m-semihosting/build.rs')
-rw-r--r--cortex-m-semihosting/build.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/cortex-m-semihosting/build.rs b/cortex-m-semihosting/build.rs
index 5fc6a04..315035e 100644
--- a/cortex-m-semihosting/build.rs
+++ b/cortex-m-semihosting/build.rs
@@ -9,7 +9,7 @@ fn main() {
if target.starts_with("thumbv") {
if env::var_os("CARGO_FEATURE_INLINE_ASM").is_none() {
fs::copy(
- format!("../bin/{}.a", target),
+ format!("bin/{}.a", target),
out_dir.join(format!("lib{}.a", name)),
)
.unwrap();