authorgravatar for xq@random-projects.netFelix "xq" Queißner <xq@random-projects.net> 2020-09-30 22:30:35+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-10-05 00:27:42-04:00
logdce74c31cc95cc75d8eecbe9894add2785fc10ed
tree1c5b464b40fa5aaba68eea5fe01dd0d3cb612cfe
parent33bc1ebe37ef6ba5dfe73e458d662b5b516723ba

Depending on system libs only enforces libraries to require dynamic linking, but neither static libs nor object files.


1 files changed, 6 insertions(+), 2 deletions(-)

src/Compilation.zig+6-2
......@@ -478,8 +478,12 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation {
478478 {
479479 break :dl true;
480480 }
481 if (options.system_libs.len != 0)
482 break :dl true;
481 if (options.system_libs.len != 0) {
482 // when creating a executable that links to system libraries,
483 // we require dynamic linking, but we must not link static libraries
484 // or object files dynamically!
485 break :dl (options.output_mode == .Exe);
486 }
483487
484488 break :dl false;
485489 };