Skip to content
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

Idea: move Emscripten include path injection and depending on emscripten sdk into build.zig #71

Open
floooh opened this issue Jun 4, 2024 · 0 comments

Comments

@floooh
Copy link
Owner

floooh commented Jun 4, 2024

...we're iterating over the C library dependencies here anyway:

sokol-zig/build.zig

Lines 351 to 367 in d9f3ef9

emcc.addArtifactArg(options.lib_main);
var it = options.lib_main.root_module.iterateDependencies(options.lib_main, false);
while (it.next()) |item| {
for (item.module.link_objects.items) |link_object| {
switch (link_object) {
.other_step => |compile_step| {
switch (compile_step.kind) {
.lib => {
emcc.addArtifactArg(compile_step);
},
else => {},
}
},
else => {},
}
}
}

...maybe the Emscripten include path could be injected there, as well as depending on the Emscripten SDK setup step? That way the toplevel project wouldn't need to take care of that, and it's needed for every C library anyway.

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

No branches or pull requests

1 participant