CONFIG: improve support for compiler/link options (#1830)

- introduce WM_COMPILE_CONTROL variable to convey control information
  into the build rules.

  The convention (as per spack):
      - '+' to select a feature
      - '~' to deselect a feature

  Eg, to select the gold linker, and disable openmp
  (spaces are not required):

      WM_COMPILE_CONTROL="+gold ~openmp"

CONFIG: accept FOAM_EXTRA_LDFLAGS for AMD, gold, Mingw linkers

CONFIG: generalize PROJECT_LIBS (-ldl used almost universally)
This commit is contained in:
Mark Olesen
2020-09-03 13:32:17 +02:00
parent fbfcdfc723
commit 9423d2bd83
71 changed files with 280 additions and 175 deletions

View File

@ -11,4 +11,10 @@ cxxtoo = $(Ctoo)
cctoo = $(Ctoo)
cpptoo = $(Ctoo)
include $(GENERAL_RULES)/Clang/link-c++
ifneq (,$(findstring +gold,$(WM_COMPILE_CONTROL)))
include $(GENERAL_RULES)/Clang/link-gold-c++
else
include $(GENERAL_RULES)/Clang/link-c++
endif
#------------------------------------------------------------------------------