-
-
Couldn't load subscription status.
- Fork 3.1k
Step.Compile: add options struct for addCSourceFiles
#17420
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
Step.Compile: add options struct for addCSourceFiles
#17420
Conversation
|
Can you show the |
|
https://gist.github.com/der-teufel-programming/546a8f228c7374dd2ac8f85c615f143a - for (libc_shim_files) |libc_shim_file| {
- app.addCSourceFile(.{
- .file = orca_dep.path(libc_shim_file),
- .flags = cflags,
- });
- }
+ app.addCSourceFiles(.{
+ .dependency = orca_dep,
+ .files = libc_shim_files,
+ .flags = cflags,
+ }); |
|
This is not a good example because it has only 1 flag. EDIT: never mind, I see your "BEFORE" file in the gist, and this does what I was hoping. Thanks! |
|
Nice work, thank you! |
|
I realize this is closed, but this is a breaking change that makes the build.zig file not compatible with 0.11.0, and also makes 0.12.0 not able to use old build.zig files which is going to potentially cause issues if using packages set up to build for 0.11.0 with a new zig project in the near future using 0.12.0. Can I request that the build.zig file be backwards compatible in the future so this isn't an issue and packages can slowly adopt the new syntax without breaking compatibility? |
|
The reason being I just ran across a build.zig file that wasn't building on 0.12.0-dev, but was on my local computer (running 0.11.0), and discovered this change. |
|
The build system is still in development and incomplete; backwards compatibility is a non-goal, as being tied to the current state of affairs would mean being tied to an incomplete build system. There are likely a good few more breaking changes to come become before backwards compatibility is even a real consideration. |
|
You can check the zig version in your build script and call the older API. |
Closes #17410