@@ -830,8 +830,15 @@ 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+
834+ # When rpath is enabled, the easybuild rpath wrapper will be used for compiling the tests
835+ # A combination of -Werror and the wrapper translating LD_LIBRARY_PATH to -Wl,... flags will results in failing
836+ # tests due to -Wunused-command-line-argument
837+ # This has shown to be a problem in builds for 18.1.8, but seems it was not necessary for LLVM >= 19
838+ # needs more digging into the CMake logic
833839 old_cflags = os .getenv ('CFLAGS' , '' )
834840 old_cxxflags = os .getenv ('CXXFLAGS' , '' )
841+ # TODO: Find a better way to either force the test to use the non wrapped compiler or to pass the flags
835842 if build_option ('rpath' ):
836843 setvar ('CFLAGS' , "%s %s" % (old_cflags , '-Wno-unused-command-line-argument' ))
837844 setvar ('CXXFLAGS' , "%s %s" % (old_cxxflags , '-Wno-unused-command-line-argument' ))
@@ -840,6 +847,8 @@ def _para_test_step(self, parallel=1):
840847 res = run_shell_cmd (cmd , fail_on_error = False )
841848 out = res .output
842849 self .log .debug (out )
850+
851+ # Reset the CFLAGS and CXXFLAGS
843852 setvar ('CFLAGS' , old_cflags )
844853 setvar ('CXXFLAGS' , old_cxxflags )
845854
0 commit comments