Skip to content

Commit

Permalink
move each_lib_rpath before NativePath detection
Browse files Browse the repository at this point in the history
this prevents native paths from being implicitly added to the rpaths
  • Loading branch information
Jan200101 committed Nov 8, 2023
1 parent 3b3d84e commit c523058
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2726,6 +2726,10 @@ fn buildOutputType(
}
lib_dir_args = undefined; // From here we use lib_dirs instead.

if (each_lib_rpath orelse cross_target.isNativeOs()) {
try rpath_list.appendSlice(lib_dirs.items);
}

const self_exe_path: ?[]const u8 = if (!process.can_spawn)
null
else
Expand Down Expand Up @@ -2869,10 +2873,6 @@ fn buildOutputType(
}
}

if (each_lib_rpath orelse cross_target.isNativeOs()) {
try rpath_list.appendSlice(lib_dirs.items);
}

// If any libs in this list are statically provided, we omit them from the
// resolved list and populate the link_objects array instead.
{
Expand Down

0 comments on commit c523058

Please sign in to comment.