mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 12:59:04 +00:00
build system: fix missing step dependencies on lib
When depending on a module that depends on a static library, there was a missing step dependency on the static library, which caused a compile error due to missing header file. This fixes the problem by adding the proper step dependencies. Reviewing this code, I'm starting to wonder if it might be simpler to have Module instances create dummy Step objects to better model dependencies and dependees, rather than trying to maintain this graph without an actual node. That would be an improvement for a future commit.
This commit is contained in:
parent
fc79b22a98
commit
537e2808e0
@ -263,7 +263,11 @@ fn addShallowDependencies(m: *Module, dependee: *Module) void {
|
||||
};
|
||||
|
||||
for (dependee.link_objects.items) |link_object| switch (link_object) {
|
||||
.other_step => |compile| addStepDependencies(m, dependee, &compile.step),
|
||||
.other_step => |compile| {
|
||||
addStepDependencies(m, dependee, &compile.step);
|
||||
for (compile.installed_headers.items) |install_step|
|
||||
addStepDependenciesOnly(m, install_step);
|
||||
},
|
||||
|
||||
.static_path,
|
||||
.assembly_file,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user