Skip to content

pr-git-2314/HaraldNordgren/makefile-test-helper-dedup-libs-v3

tagged this 19 Jun 20:32
From: Harald Nordgren <haraldnordgren@gmail.com>

Building on macOS with Xcode 15 or newer emits:

    ld: warning: ignoring duplicate libraries: 'libgit.a',
    'target/release/libgitcore.a'

Some link recipes list the same archive twice, which is harmless.
Quiet the warning instead.

Pass -Wl,-no_warn_duplicate_libraries on Xcode 15 and newer, whose
linkers added both the warning and the suppression flag (ld64-907
and dyld-1009). Earlier linkers reject the flag, so gate on the
linker version. Broaden the existing -fno-common version probe to
also match the "ld64-NNN" and "dyld-NNN" forms Xcode 15 reports.

Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>

Submitted-As: https://lore.kernel.org/git/pull.2314.v3.git.git.1781901127385.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.2314.git.git.1780269406949.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.2314.v2.git.git.1780610623006.gitgitgadget@gmail.com
Assets 2
Loading