CONFIG: support explicit selection of 'ld' linker

- for clang-based compilers the default linker may be lld or simply ld.
  Support '+link-ld' to explicitly select use of the ld linker.

- consolidate linker rules into single files

STYLE: adjust SPDX Identifier
This commit is contained in:
Mark Olesen
2023-12-15 09:37:51 +01:00
parent 5cdc8c6fde
commit 79993bba43
15 changed files with 96 additions and 125 deletions

View File

@ -16,19 +16,6 @@ cctoo = $(Ctoo)
cpptoo = $(Ctoo)
cxxtoo = $(Ctoo)
# Linking:
ifneq (,$(findstring +gold,$(WM_COMPILE_CONTROL)))
include $(GENERAL_RULES)/Clang/link-gold-c++
else ifneq (,$(findstring +mold,$(WM_COMPILE_CONTROL)))
include $(GENERAL_RULES)/Clang/link-mold-c++
else ifneq (,$(findstring +lld,$(WM_COMPILE_CONTROL)))
include $(GENERAL_RULES)/Clang/link-lld-c++
else
include $(GENERAL_RULES)/Clang/link-c++
endif
include $(GENERAL_RULES)/Clang/link-c++
#------------------------------------------------------------------------------