-
-
Notifications
You must be signed in to change notification settings - Fork 447
Add script for generating an amalgamated distribution #302
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
Conversation
@@ -1,4 +1,4 @@ | |||
static const ZydisShortString STR_REGISTER[] = | |||
static const ZydisShortString STR_REGISTERS[] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This name clashes with another STR_REGISTER
somewhere in the generated formatter strings when doing amalgamated builds, so I had to rename it. I'll push a commit to also change that in gen_registers.py
once this PR is merged.
25a0881
to
066e9f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
dfc3847
to
9d1cee5
Compare
066e9f0
to
7d25c64
Compare
Figured that it probably makes more sense to also add CI in this PR, so added a commit for that. Turned out that the CI's Python version isn't latest, so I had to downgrade a few things. Will clean up history after approval. |
Otherwise it clashes with another static identifier in amalgamated builds.
c82846c
to
690dedd
Compare
In case you didn't know, GitHub's CI offers the possibility to run jobs in Docker images, so you're not limited to using Ubuntu LTS; if you need updated packages you could use Debian Testing, it's really nice :) Here's a quick example (taken from Tachi107/cloudflare-ddns/.github/workflows/muon.yam): jobs:
muon:
runs-on: ubuntu-latest
container:
image: debian:testing
steps:
...build steps... Edit: another advantage is that your build gets executed in a cleaner environment compared to the default one (as GitHub ships A LOT of software in their CI images), so the possibility of strange bugs related to the tests using unknown versions of installed library when they shouldn't is reduced |
That's good to know, thanks! |
This PR adds a script that creates an amalgamated build of Zydis. In other words: the script merges all sources files and internal headers into a single
.c
file and all public headers into a single.h
files. The term "amalgamated" was inspired by libraries like SQLite that provide similar distributions.I'll add a CI build (and perhaps automate attaching such a build to releases) in a separate PR.(amended to this PR)Note: this PR is based on the(merged and rebased on master)remove-generateexportheader
branch, because the export config was previously causing problems in the amalgamated builds.