Skip to content

Commit

Permalink
std.Build.Module.addShallowDependencies: merge changes #20388
Browse files Browse the repository at this point in the history
Original commit: d873dd4
  • Loading branch information
Lzard committed Nov 9, 2024
1 parent f101044 commit 342008a
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions lib/std/Build/Module.zig
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,8 @@ fn addShallowDependencies(m: *Module, dependee: *Module) void {
if (dependee.root_source_file) |lazy_path| addLazyPathDependencies(m, dependee, lazy_path);
for (dependee.lib_paths.items) |lib_path| addLazyPathDependencies(m, dependee, lib_path);
for (dependee.rpaths.items) |rpath| switch (rpath) {
.lazy_path => |lp| addLazyPathDependencies(m, dependee, lp),
.special => {},
.lazy_path => |lp| addLazyPathDependencies(m, dependee, lp),
};
for (dependee.include_dirs.items) |dir| switch (dir) {
.path,
Expand All @@ -325,25 +325,26 @@ fn addShallowDependencies(m: *Module, dependee: *Module) void {
.framework_path_system,
=> |path| addLazyPathDependencies(m, dependee, path),

.other_step => |o| addStepDependencies(m, dependee, &o.step),
.config_header_step => |c| addStepDependencies(m, dependee, &c.step),
};
for (dependee.link_objects.items) |link_object| switch (link_object) {
.config_header_step => |config| addStepDependencies(m, dependee, &config.step),

.other_step => |compile| {
addStepDependencies(m, dependee, &compile.step);
addLazyPathDependenciesOnly(m, compile.getEmittedIncludeTree());
},
};
for (dependee.link_objects.items) |link_object| switch (link_object) {
.system_lib => {},

.static_path,
.assembly_file,
=> |lp| addLazyPathDependencies(m, dependee, lp),
.static_path, .assembly_file => |lp| addLazyPathDependencies(m, dependee, lp),
.c_source_file => |c| addLazyPathDependencies(m, dependee, c.file),
.c_source_files => |c| addLazyPathDependencies(m, dependee, c.root),

.c_source_file => |x| addLazyPathDependencies(m, dependee, x.file),
.win32_resource_file => |x| addLazyPathDependencies(m, dependee, x.file),
.win32_resource_file => |rc| {
addLazyPathDependencies(m, dependee, rc.file);
for (rc.include_paths) |lp| addLazyPathDependencies(m, dependee, lp);
},

.c_source_files,
.system_lib,
=> {},
.other_step => {}, // Done through include_dirs
};
}

Expand Down

0 comments on commit 342008a

Please sign in to comment.