Skip to content

--march and automatic libspy rebuild - #745

Draft
paugier wants to merge 9 commits into
spylang:mainfrom
paugier:march-native
Draft

paugier wants to merge 9 commits into
spylang:mainfrom
paugier:march-native

Conversation

@paugier

@paugier paugier commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

This PR adds the support for spy build --march=native (and other values). The code is partly IA generated.

An important point is that we need to rebuild libspy with the corresponding -march value since it is built for --release with -flto.

While working on that, I realized that we don't actually need make for such builds. We already use Ninja so it's very easy to use it also to build libspy. I added a Python module spy/libspy/builder.py to do that.

The libspy builds are cached in ~/.cache/spy and I added a mechanism to automatically remove old builds. Moreover, I added a very simple command spy cache clean.


I also realized that such runtime builds and cache mechanism can be used later (not in this PR)

  • to simplify the dev workflow: uv sync/spy/pytest calls take care of the libspy (re)builds and
  • to release a sdist and a universal wheel (only containing universal WASM builds, libspy.wasm and libspy.a), installable with for example uv tool install spylang.

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Documentation Preview
Preview documentation for PR #745.
Last Updated: 2026-10-19 08:57 UTC

@paugier paugier mentioned this pull request Oct 22, 2026
@paugier paugier mentioned this pull request Nov 4, 2026
5 of 17 tasks

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant