Skip to content

unicorn: add build-unicorn.yml for riscv64 wheels - #1685

Merged
luhenry merged 1 commit into
mainfrom
unicorn
Sep 10, 2026
Merged

unicorn: add build-unicorn.yml for riscv64 wheels#1685
luhenry merged 1 commit into
mainfrom
unicorn

Conversation

@luhenry

@luhenry luhenry commented Sep 10, 2026

Copy link
Copy Markdown
Member

Compiles unicorn's QEMU-TCG-based CPU emulator core via CMake and packages the resulting libunicorn.so behind the ctypes bindings in bindings/python. Upstream publishes no riscv64 wheel.

Mirrors upstream's own build-wheels-publish.yml, narrowed to the Linux manylinux job.

Differs from upstream

  • Installs cmake via CIBW_BEFORE_BUILD - setup.py shells out to it directly and it is not a declared build dependency.
  • Stages COPYING/COPYING.LGPL2/COPYING_GLIB/AUTHORS.TXT into bindings/python before the build - upstream ships none of them in the wheel, though the source is GPL-2.0/LGPL-2.0.

Matrix: cp312/cp313/cp314 only, one cp37-abi3 build reused across all three; no cp314t, because setup.py sets py_limited_api unconditionally and setuptools raises under Py_GIL_DISABLED, so upstream ships no free-threaded wheel for any platform.

Testing

  • same as upstream (tests/regress via unittest discover), with capstone pinned to our registry's 5.0.9 since upstream's capstone==6.0.0a2 test pin has no riscv64 wheel anywhere.

License: Wheel bundles unicorn's own GPL-2.0/LGPL-2.0 core sources (COPYING/COPYING.LGPL2/COPYING_GLIB); upstream ships none of them and its own metadata mislabels the project BSD, so the build copies them into bindings/python before cibuildwheel runs.

Built on cp312; 83 passed, 2 skipped.

luhenry added a commit that referenced this pull request Sep 10, 2026
@luhenry
luhenry merged commit 277b76a into main Sep 10, 2026
6 checks passed
@luhenry
luhenry deleted the unicorn branch September 10, 2026 10:44
@luhenry luhenry linked an issue Sep 10, 2026 that may be closed by this pull request
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.

unicorn riscv64 support

1 participant