Skip to content

Commit 9991d5b

Browse files
authored
Merge pull request #3704 from migueldiascosta/fujitsu_ldflags
set LDFLAGS instead of LIBRARY_PATH and add new `required` keyword to `_get_software_root` for Fujitsu toolchain
2 parents 3fe33e0 + 1212d0c commit 9991d5b

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
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])

easybuild/toolchains/linalg/fujitsussl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class FujitsuSSL(LinAlg):
6868
SCALAPACK_INCLUDE_DIR = ['']
6969
SCALAPACK_FAMILY = TC_CONSTANT_FUJITSU_SSL
7070

71-
def _get_software_root(self, name):
71+
def _get_software_root(self, name, required=True):
7272
"""Get install prefix for specified software name; special treatment for Fujitsu modules."""
7373
if name == TC_CONSTANT_MODULE_NAME:
7474
env_var = TC_CONSTANT_MODULE_VAR
@@ -78,7 +78,7 @@ def _get_software_root(self, name):
7878
else:
7979
self.log.debug("Obtained install prefix for %s via $%s: %s", name, env_var, root)
8080
else:
81-
root = super(FujitsuSSL, self)._get_software_root(name)
81+
root = super(FujitsuSSL, self)._get_software_root(name, required=required)
8282

8383
return root
8484

0 commit comments

Comments
 (0)