Skip to content

Commit d578e73

Browse files
append fujitsu libdir to LDFLAGS instead of LIBRARY_PATH so that it is also set by buildenv modules
1 parent 584de26 commit d578e73

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

easybuild/toolchains/compiler/fujitsu.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"""
3232
import os
3333

34-
import easybuild.tools.environment as env
3534
import easybuild.tools.systemtools as systemtools
3635
from easybuild.tools.toolchain.compiler import Compiler, DEFAULT_OPT_LEVEL
3736

@@ -86,18 +85,15 @@ class FujitsuCompiler(Compiler):
8685
(systemtools.AARCH64, systemtools.ARM): '-mcpu=generic -mtune=generic',
8786
}
8887

89-
def prepare(self, *args, **kwargs):
90-
super(FujitsuCompiler, self).prepare(*args, **kwargs)
91-
92-
# make sure the fujitsu module libraries are found (and added to rpath by wrapper)
93-
libdir = os.path.join(os.getenv(TC_CONSTANT_MODULE_VAR), 'lib64')
94-
self.log.debug("Adding %s to $LIBRARY_PATH" % libdir)
95-
env.setvar('LIBRARY_PATH', os.pathsep.join([os.getenv('LIBRARY_PATH'), libdir]))
96-
9788
def _set_compiler_vars(self):
9889
super(FujitsuCompiler, self)._set_compiler_vars()
9990

10091
# enable clang compatibility mode
10192
# moved to compiler constants to make sure it is always used
10293
# self.variables.nappend('CFLAGS', ['Nclang'])
10394
# self.variables.nappend('CXXFLAGS', ['Nclang'])
95+
96+
# make sure the fujitsu module libraries are found (and added to rpath by wrapper)
97+
libdir = os.path.join(os.getenv(TC_CONSTANT_MODULE_VAR), 'lib64')
98+
self.log.debug("Adding %s to $LDFLAGS" % libdir)
99+
self.variables.nappend('LDFLAGS', [libdir])

0 commit comments

Comments
 (0)