easybuild.tools.toolchain.compiler module

Toolchain compiler module, provides abstract class for compilers.

author:Stijn De Weirdt (Ghent University)
author:Kenneth Hoste (Ghent University)
author:Damian Alvarez (Forschungszentrum Juelich GmbH)
class easybuild.tools.toolchain.compiler.Compiler(*args, **kwargs)

Bases: easybuild.tools.toolchain.toolchain.Toolchain

General compiler-like class can’t be used without creating new class C(Compiler,Toolchain)

COMPILER_CC = None
COMPILER_CXX = None
COMPILER_C_FLAGS = ['cstd']
COMPILER_C_UNIQUE_FLAGS = []
COMPILER_F77 = None
COMPILER_F90 = None
COMPILER_FAMILY = None
COMPILER_FC = None
COMPILER_FLAGS = ['debug', 'ieee', 'openmp', 'pic', 'shared', 'static', 'unroll', 'verbose']
COMPILER_F_FLAGS = ['i8', 'r8']
COMPILER_F_UNIQUE_FLAGS = []
COMPILER_GENERIC_OPTION = None
COMPILER_MODULE_NAME = None
COMPILER_OPTIMAL_ARCHITECTURE_OPTION = None
COMPILER_OPT_FLAGS = ['noopt', 'lowopt', 'defaultopt', 'opt']
COMPILER_PREC_FLAGS = ['strict', 'precise', 'defaultprec', 'loose', 'veryloose']
COMPILER_SHARED_OPTION_MAP = {'opt': 'O3', 'verbose': 'v', 'pic': 'fPIC', 'cstd': 'std=%(value)s', 'static': 'static', 'openmp': 'fopenmp', 'noopt': 'O0', '32bit': 'm32', 'unroll': 'unroll', 'lowopt': 'O1', 'debug': 'g', 'shared': 'shared', 'defaultopt': 'O2'}
COMPILER_SHARED_OPTS = {'precise': (False, 'High precision'), 'verbose': (False, 'Verbose output'), 'rpath': (True, 'Use RPATH wrappers when --rpath is enabled in EasyBuild configuration'), 'pic': (False, 'Use PIC'), 'static': (False, 'Build static library'), 'optarch': (True, 'Enable architecture optimizations'), 'ieee': (False, 'Adhere to IEEE-754 rules'), 'veryloose': (False, 'Very loose precision'), 'strict': (False, 'Strict (highest) precision'), 'unroll': (False, 'Unroll loops'), 'lowopt': (False, 'Low compiler optimizations'), 'shared': (False, 'Build shared library'), 'opt': (False, 'High compiler optimizations'), 'i8': (False, 'Integers are 8 byte integers'), 'loose': (False, 'Loose precision'), 'cstd': (None, 'Specify C standard'), 'defaultprec': (False, 'Default precision'), 'openmp': (False, 'Enable OpenMP'), 'noopt': (False, 'Disable compiler optimizations'), 'packed-linker-options': (False, 'Pack the linker options as comma separated list'), 'r8': (False, 'Real is 8 byte real'), 'cciscxx': (False, 'Use CC as CXX'), '32bit': (False, 'Compile 32bit target'), 'debug': (False, 'Enable debug'), 'defaultopt': (False, 'Default compiler optimizations')}
COMPILER_UNIQUE_OPTION_MAP = None
COMPILER_UNIQUE_OPTS = None
LIB_MATH = None
LIB_MULTITHREAD = None
LIB_RUNTIME = None
LINKER_TOGGLE_START_STOP_GROUP = {'start': '--start-group', 'stop': '--end-group'}
LINKER_TOGGLE_STATIC_DYNAMIC = None
comp_family(prefix=None)

Return compiler family used in this toolchain. @prefix: Prefix for compiler (e.g. ‘CUDA_‘).

set_options(options)

Process compiler toolchain options.

set_variables()

Set the variables

easybuild.tools.toolchain.compiler.mk_infix(prefix)

Create an infix based on the given prefix.