mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
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:
@ -19,7 +19,7 @@ LINK_LIBS = $(c++DBUG)
|
||||
# Using "-Wl,--no-undefined,--enable-runtime-pseudo-reloc"
|
||||
# does not forgive undefined symbols during linking
|
||||
|
||||
LINKLIBSO = $(CC) $(c++FLAGS) \
|
||||
LINKLIBSO = $(CC) $(c++FLAGS) -shared \
|
||||
-Wl,--output-def=$(LIB).def \
|
||||
-Wl,--out-implib=$(LIB).dll.a \
|
||||
-Wl,--no-undefined \
|
||||
@ -27,9 +27,10 @@ LINKLIBSO = $(CC) $(c++FLAGS) \
|
||||
-Wl,--enable-auto-import \
|
||||
-Wl,--enable-auto-image-base \
|
||||
-Wl,--strip-all \
|
||||
-shared
|
||||
$(FOAM_EXTRA_LDFLAGS)
|
||||
|
||||
LINKEXE = $(CC) $(c++FLAGS) \
|
||||
-Wl,--enable-auto-import \
|
||||
-Wl,--strip-all \
|
||||
-Wl,--force-exe-suffix
|
||||
-Wl,--force-exe-suffix \
|
||||
$(FOAM_EXTRA_LDFLAGS)
|
||||
|
||||
@ -6,7 +6,8 @@ LD = x86_64-w64-mingw32-ld
|
||||
AR = x86_64-w64-mingw32-ar
|
||||
RANLIB = x86_64-w64-mingw32-ranlib
|
||||
|
||||
PROJECT_LIBS = -l$(WM_PROJECT) -L$(FOAM_LIBBIN)/dummy -lPstream
|
||||
PROJECT_LIBS = -l$(WM_PROJECT) \
|
||||
-L$(FOAM_LIBBIN)/dummy -lPstream
|
||||
|
||||
include $(GENERAL_RULES)/standard
|
||||
|
||||
|
||||
Reference in New Issue
Block a user