Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

c-m-sh: fix missing prebuilt binaries. closes #271 #273

Merged
merged 1 commit into from
Oct 22, 2020
Merged

c-m-sh: fix missing prebuilt binaries. closes #271 #273

merged 1 commit into from
Oct 22, 2020

Conversation

adamgreig
Copy link
Member

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!

@adamgreig adamgreig requested a review from a team as a code owner October 20, 2020 22:37
@rust-highfive
Copy link

r? @therealprof

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-cortex-m labels Oct 20, 2020
@@ -5,6 +5,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [v0.4.1] - 2020-10-20
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What did we say we'd do about those links again? Maintain them with special tags? If not we can just give them up but then this shouldn't be a link.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching that, I had intended for it to be a link and I'll make the tag upon release. I've pushed an update.

Copy link
Contributor

@therealprof therealprof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than this one nit looks good to me. Did you want to wait for (Windows) people to chime in before or just do it and fix the fallout (if any) later?

@adamgreig
Copy link
Member Author

I'd rather get this fix in now and released, if that sounds OK. I'm not sure if we can do anything to properly fix this if it doesn't work with symlinks on Windows; we might have to suggest people copy the artifacts from ../bin/ into the cortex-m-semihosting/bin directory when using the repository as a local dependency.

Once we swap to using the syscall method from cortex-m directly this problem goes away.

@jonas-schievink
Copy link
Contributor

I mean, we could also just copy them there for 1 release and delete them again

Copy link
Contributor

@therealprof therealprof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adamgreig
Copy link
Member Author

If we delete them again is that any better for Windows users? Perhaps the xtask build script should copy them into the c-m-sh subdirectory for us, and check them?

@adamgreig
Copy link
Member Author

I think let's merge this to get it fixed for now, and if it turns out to not work for Windows developers we can investigate having xtask copy the binaries into the semihosting project. Since the potential issue only affects people using the git repository, we can also fix this later without requiring another release.

I guess for cortex-m 1.0 we can release semihosting 0.5 (or just integrate it into cortex-m 1.0, who knows) which uses the cortex-m pre-built binaries.

bors merge

@bors
Copy link
Contributor

bors bot commented Oct 22, 2020

Build succeeded:

@bors bors bot merged commit 25f6613 into master Oct 22, 2020
@bors bors bot deleted the fix-271 branch October 22, 2020 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-cortex-m
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants