| ... | ... | @@ -1962,7 +1962,8 @@ fn linkWithLLD(self: *Elf, arena: Allocator, tid: Zcu.PerThread.Id, prog_node: s |
| 1962 | 1962 | if (is_exe_or_dyn_lib) { |
| 1963 | 1963 | // Worst-case, we need an --as-needed argument for every lib, as well |
| 1964 | 1964 | // as one before and one after. |
| 1965 | | try argv.append("--as-needed"); |
| 1965 | try argv.ensureUnusedCapacity(2 * self.base.comp.link_inputs.len + 2); |
| 1966 | argv.appendAssumeCapacity("--as-needed"); |
| 1966 | 1967 | var as_needed = true; |
| 1967 | 1968 | |
| 1968 | 1969 | for (self.base.comp.link_inputs) |link_input| switch (link_input) { |