Skip to content

Commit a7abb7b

Browse files
committed
Ensure compatibility with rpath wrappers and -Werror in tests
1 parent 4f0eeee commit a7abb7b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

easybuild/easyblocks/l/llvm.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -830,11 +830,18 @@ def _para_test_step(self, parallel=1):
830830
if self.cfg['build_runtimes']:
831831
lib_dir_runtime = self.get_runtime_lib_path(basedir, fail_ok=False)
832832
lib_path = os.path.join(basedir, lib_dir_runtime)
833+
old_cflags = os.getenv('CFLAGS', '')
834+
old_cxxflags = os.getenv('CXXFLAGS', '')
835+
if build_option('rpath'):
836+
setvar('CFLAGS', "%s %s" % (old_cflags, '-Wno-unused-command-line-argument'))
837+
setvar('CXXFLAGS', "%s %s" % (old_cxxflags, '-Wno-unused-command-line-argument'))
833838
with _wrap_env(os.path.join(basedir, 'bin'), lib_path):
834839
cmd = f"make -j {parallel} check-all"
835840
res = run_shell_cmd(cmd, fail_on_error=False)
836841
out = res.output
837842
self.log.debug(out)
843+
setvar('CFLAGS', old_cflags)
844+
setvar('CXXFLAGS', old_cxxflags)
838845

839846
rgx_failed = re.compile(r'^ +Failed +: +([0-9]+)', flags=re.MULTILINE)
840847
mch = rgx_failed.search(out)

0 commit comments

Comments
 (0)