[all-commits] [llvm/llvm-project] 169703: [MachO LLD] Respect -all_load with --start-lib --e...

Nuri Amari via All-commits all-commits at lists.llvm.org
Fri May 31 18:18:14 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1697030d9d7188473cc4129bd28f848a77d04d3d
      https://github.com/llvm/llvm-project/commit/1697030d9d7188473cc4129bd28f848a77d04d3d
  Author: Nuri Amari <nuri.amari99 at gmail.com>
  Date:   2024-05-31 (Fri, 31 May 2024)

  Changed paths:
    M lld/MachO/Driver.cpp
    M lld/test/MachO/start-lib.s

  Log Message:
  -----------
  [MachO LLD] Respect -all_load with --start-lib --end-lib style archives (#93993)

The -all_load flag is intended to force the linker to load all lazy members, but doesn't do so if the archive is specified with --start-lib, --end-lib flags. The `-all_load` flag is global, that is it can be placed anywhere in the linker invocation, and it affects the load behavior of all conventional archives listed. Unlike ELF's --whole-archive, the user need not necessarily have access to the entire linker invocation to reasonably make use of the flag. The user can supply `-all_load` to a build system without inspecting the rest of the linker invocation.

To make the behavior of `--start-lib` style archives consistent with regular archives, this patch makes it so that -all_load also applies in this case.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list