-
Notifications
You must be signed in to change notification settings - Fork 13
support for macOS and Windows #6
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
base: master
Are you sure you want to change the base?
Conversation
Got it to compile on windows without specifying Windows MSVC using .version = "2.16.1-4", and zig "0.15.0-dev.77+aa8aa6625"; I actually had to include "nasmlib/ilog2.c", again, and rewrite two macros in include\nasmint.h These Flags I have set to 1, else is null or the default / linux thing (from ._XOPEN_SOURCE onwards) |
Nice. Do the code changes required not break Linux/mac? |
I used your build system, removed the windows depended usage of nasm/ilog2.c, removed the msvc dependence check and changed the config.h flags as told above. Well, compiling without errors might just mean the compilation didn't encounter known errors, not that the build programm actually works. But I had no problems compiling with : zig build -Dtarget=x86_64-linux -Doptimize=ReleaseSafe What bugs me is that I had to make changes to a nasm-native file: include/nasmint.h zig cc -dM -E - < NUL (on my windows machine tells me that on my zig x86-64 windows) clang has for example predefined: #define LLONG_WIDTH 64 #define INT64_C(x) x ## i64 which clang cannot expand. So I with my limited compiler knowledge have no idea why that macro-branch is used instead of the other which define. #define INT64_C(x) x ## L |
oh and I have no idea what a yalm or .ci file is used for: Good old manual browser download boy, no fancy git |
https://github.com/Banacial/Files_I_Need/blob/main/build_nasm.zig |
Yeah bugs me too. Seems that it thinks MSVC is active even though |
ziglang/zig#9536 |
Okay I think what happened was: namsint.h checks It now compiles :) |
One thing that I'm not so sure about is if maybe some of the compilation flags may affect NASM output. Since there are no test cases in this repo there is no way to know for sure if there are any regressions. Maybe we could run the test suite in CI. It seems though we'd need to check in the "golden" files which are required to run the test cases against. I'm not even sure how to get those for Windows (probably by grabbing the NASM official binary). |
Note that this PR also unlocks Windows and macOS support for the ffmpeg package :) |
Note that the MSVC ABI is NOT supported for Windows. Just the default mingw included ABI