mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-23 23:36:04 +00:00

Starting with Xcode 16 (dyld-1122), Apple's binary utilities, e.g. `dyld_info` (but not dyld itself), will refuse to load binaries built against the macOS 15 SDK or newer that contain the same `LC_RPATH` entry multiple times: https://github.com/apple-oss-distributions/dyld/blob/rel/dyld-1122/mach_o/Policy.cpp#L246-L249 `ld-prime` deduplicates entries (regardless of the deployment target), we now do the same. We also match `ld-prime`'s and `ld64`'s behavior by warning on duplicate `-rpath` arguments. This can be disabled by the LLD-specific `--no-warn-duplicate-rpath` flag.