diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-09-23 09:41:55 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-09-23 09:41:55 -0700 |
| commit | 15b2bae517c54db22604eb303645d2f0023768e0 (patch) | |
| tree | abf748223f710441c0baa15269511ce13736e662 /src | |
| parent | 800a4a6cebf363c8ba3d1fcfff55db8bfb71f731 (diff) | |
| download | zig-15b2bae517c54db22604eb303645d2f0023768e0.tar.gz zig-15b2bae517c54db22604eb303645d2f0023768e0.zip | |
fix trying to link libc for static libs and objects
Diffstat (limited to 'src')
| -rw-r--r-- | src/Compilation.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index f7ffc762aa..be26a400c2 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -417,7 +417,8 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation { return error.MachineCodeModelNotSupported; } - const link_libc = options.link_libc or target_util.osRequiresLibC(options.target); + const link_libc = options.link_libc or + (is_exe_or_dyn_lib and target_util.osRequiresLibC(options.target)); const must_dynamic_link = dl: { if (target_util.cannotDynamicLink(options.target)) |
