diff --git a/easybuild/tools/toolchain/constants.py b/easybuild/tools/toolchain/constants.py index 643e8b4d21..71a683e3c3 100644 --- a/easybuild/tools/toolchain/constants.py +++ b/easybuild/tools/toolchain/constants.py @@ -31,9 +31,9 @@ * Kenneth Hoste (Ghent University) """ -from easybuild.tools.variables import AbsPathList -from easybuild.tools.toolchain.variables import CommandFlagList, CommaSharedLibs, CommaStaticLibs -from easybuild.tools.toolchain.variables import FlagList, IncludePaths, LibraryList, LinkLibraryPaths +from easybuild.tools.variables import AbsPathList, StrList +from easybuild.tools.toolchain.variables import CommaSharedLibs, CommaStaticLibs +from easybuild.tools.toolchain.variables import IncludePaths, LibraryList, LinkLibraryPaths COMPILER_VARIABLES = [ @@ -53,10 +53,10 @@ ] COMPILER_MAP_CLASS = { - FlagList: [ + StrList: [ ('OPTFLAGS', 'Optimization flags'), ('PRECFLAGS', 'FP precision flags'), - ] + COMPILER_FLAGS, + ] + COMPILER_FLAGS + COMPILER_VARIABLES, LibraryList: [ ('LIBS', 'Libraries'), # TODO: where are these used? ld? ('FLIBS', 'Fortran libraries'), # TODO: where are these used? gfortran only? @@ -67,18 +67,15 @@ IncludePaths: [ ('CPPFLAGS', 'Precompiler flags'), ], - CommandFlagList: COMPILER_VARIABLES, } CO_COMPILER_MAP_CLASS = { - CommandFlagList: [ + StrList: [ ('CUDA_CC', 'CUDA C compiler command'), ('CUDA_CXX', 'CUDA C++ compiler command'), ('CUDA_F77', 'CUDA Fortran 77 compiler command'), ('CUDA_F90', 'CUDA Fortran 90 compiler command'), ('CUDA_FC', 'CUDA Fortran 77/90 compiler command'), - ], - FlagList: [ ('CUDA_CFLAGS', 'CUDA C compiler flags'), ('CUDA_CXXFLAGS', 'CUDA C++ compiler flags'), ('CUDA_FCFLAGS', 'CUDA Fortran 77/90 compiler flags'), @@ -103,7 +100,7 @@ ('MPI_LIB_DIR', 'MPI library directory'), ('MPI_INC_DIR', 'MPI include directory'), ], - CommandFlagList: MPI_COMPILER_VARIABLES + SEQ_COMPILER_VARIABLES, + StrList: MPI_COMPILER_VARIABLES + SEQ_COMPILER_VARIABLES, } BLAS_MAP_CLASS = { diff --git a/easybuild/tools/toolchain/toolchainvariables.py b/easybuild/tools/toolchain/toolchainvariables.py index dbb5686040..299db0f0a3 100644 --- a/easybuild/tools/toolchain/toolchainvariables.py +++ b/easybuild/tools/toolchain/toolchainvariables.py @@ -33,7 +33,8 @@ from easybuild.tools.variables import Variables, join_map_class from easybuild.tools.toolchain.constants import ALL_MAP_CLASSES -from easybuild.tools.toolchain.variables import LinkerFlagList, FlagList +from easybuild.tools.toolchain.variables import LinkerFlagList +from easybuild.tools.variables import StrList class ToolchainVariables(Variables): @@ -42,7 +43,7 @@ class ToolchainVariables(Variables): in context of compilers (i.e. the generated string are e.g. compiler options or link flags) """ MAP_CLASS = join_map_class(ALL_MAP_CLASSES) # join_map_class strips explanation - DEFAULT_CLASS = FlagList + DEFAULT_CLASS = StrList LINKER_TOGGLE_START_STOP_GROUP = None LINKER_TOGGLE_STATIC_DYNAMIC = None