Build a portable builder! - #1304
Conversation
96f0ec6 to
2456c82
Compare
One pin down the rabbit hole! Switched from using the `zig build` frontend, which under the hood just builds the builder program based on our build.zig. It's really build_runner.zig, which in turn imports build.zig. We now do that step manually and are then able to inject our own compilation arguments, like which arch to compile for and should thus get a portable executable that is built for the base CPU feature set without all the bells and whistles of the native CPU of the build machine! Default to use the zig build!
e6baa04 to
7ad3be0
Compare
|
I have run this PR through 4 CI runs and all jobs have succeeded with exception for brew-macos which is due to #1297. I have verified that we have CI runs where the build-debs job runs on a newer CPU than the subsequent run-linux test jobs, so we indeed we have a portable |
|
I just did my first pull after this merge. It seems that Apple's M1 architecture is not supported? acton> make error: unknown CPU: 'aarch64' |
|
@sydow haha, get a real machine ;) No sorry, it was meant to work but I never did verify it. Can you open a new issue on it though, don't want to drag around an old PR for tracking this. I'm stopping work right now but will be back later and see if I can have a look. I do have a macbook with an m2 cpu here, so I should be able to reproduce and fix! Sorry again |
One pin down the rabbit hole! Switched from using the
zig buildfrontend, which under the hood just builds the builder program based on our build.zig. It's really build_runner.zig, which in turn imports build.zig. We now do that step manually and are then able to inject our own compilation arguments, like which arch to compile for and should thus get a portable executable that is built for the base CPU feature set without all the bells and whistles of the native CPU of the build machine!Default to use the zig build!
Fixes #1305.