aboutsummaryrefslogtreecommitdiff
path: root/src/link.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/link.zig')
-rw-r--r--src/link.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/link.zig b/src/link.zig
index a50ad5f8ea..9363876cb2 100644
--- a/src/link.zig
+++ b/src/link.zig
@@ -2003,6 +2003,12 @@ pub fn openArchiveInput(diags: *Diags, path: Path) error{LinkFailure}!Input {
} };
}
+pub fn openDsoInput(diags: *Diags, path: Path, needed: bool, weak: bool, reexport: bool) error{LinkFailure}!Input {
+ return .{ .dso = openDso(path, needed, weak, reexport) catch |err| {
+ return diags.failParse(path, "failed to open {}: {s}", .{ path, @errorName(err) });
+ } };
+}
+
fn stripLibPrefixAndSuffix(path: []const u8, target: std.Target) ?struct { []const u8, std.builtin.LinkMode } {
const prefix = target.libPrefix();
const static_suffix = target.staticLibSuffix();