diff options
| author | kcbanner <kcbanner@gmail.com> | 2023-04-16 22:58:10 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-04-18 18:23:05 -0700 |
| commit | d2a799c65a7a65df5a66771f41417b6df24834b8 (patch) | |
| tree | 23492b30492fa60ecd1402dc01a8c375dd14e4bd /src/link/Coff | |
| parent | e82596950f731c0de12997fa7d224b1e0d33c9d3 (diff) | |
| download | zig-d2a799c65a7a65df5a66771f41417b6df24834b8.tar.gz zig-d2a799c65a7a65df5a66771f41417b6df24834b8.zip | |
coff: support allow_shlib_undefined
Diffstat (limited to 'src/link/Coff')
| -rw-r--r-- | src/link/Coff/lld.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/link/Coff/lld.zig b/src/link/Coff/lld.zig index 01f724ed41..78eb2d39e5 100644 --- a/src/link/Coff/lld.zig +++ b/src/link/Coff/lld.zig @@ -95,6 +95,7 @@ pub fn linkWithLLD(self: *Coff, comp: *Compilation, prog_node: *std.Progress.Nod man.hash.add(self.base.options.tsaware); man.hash.add(self.base.options.nxcompat); man.hash.add(self.base.options.dynamicbase); + man.hash.addOptional(self.base.options.allow_shlib_undefined); // strip does not need to go into the linker hash because it is part of the hash namespace man.hash.addOptional(self.base.options.major_subsystem_version); man.hash.addOptional(self.base.options.minor_subsystem_version); @@ -226,6 +227,11 @@ pub fn linkWithLLD(self: *Coff, comp: *Compilation, prog_node: *std.Progress.Nod if (!self.base.options.dynamicbase) { try argv.append("-dynamicbase:NO"); } + if (self.base.options.allow_shlib_undefined) |allow_shlib_undefined| { + if (allow_shlib_undefined) { + try argv.append("-FORCE:UNRESOLVED"); + } + } try argv.append(try allocPrint(arena, "-OUT:{s}", .{full_out_path})); |
