tau: use filter_compiler_wrappers to take advantage of builtin functionality (#24457)
This commit is contained in:
parent
b0a915a3b6
commit
65e7e1f969
@ -115,6 +115,10 @@ class Tau(Package):
|
|||||||
|
|
||||||
patch('unwind.patch', when="@2.29.0")
|
patch('unwind.patch', when="@2.29.0")
|
||||||
|
|
||||||
|
filter_compiler_wrappers('Makefile', relative_root='include')
|
||||||
|
filter_compiler_wrappers('Makefile.tau*', relative_root='lib')
|
||||||
|
filter_compiler_wrappers('Makefile.tau*', relative_root='lib64')
|
||||||
|
|
||||||
def set_compiler_options(self, spec):
|
def set_compiler_options(self, spec):
|
||||||
|
|
||||||
useropt = ["-O2 -g", self.rpath_args]
|
useropt = ["-O2 -g", self.rpath_args]
|
||||||
@ -305,7 +309,6 @@ def install(self, spec, prefix):
|
|||||||
self.link_tau_arch_dirs()
|
self.link_tau_arch_dirs()
|
||||||
# TAU may capture Spack's internal compiler wrapper. Replace
|
# TAU may capture Spack's internal compiler wrapper. Replace
|
||||||
# it with the correct compiler.
|
# it with the correct compiler.
|
||||||
self.fix_tau_compilers()
|
|
||||||
|
|
||||||
def link_tau_arch_dirs(self):
|
def link_tau_arch_dirs(self):
|
||||||
for subdir in os.listdir(self.prefix):
|
for subdir in os.listdir(self.prefix):
|
||||||
@ -315,22 +318,6 @@ def link_tau_arch_dirs(self):
|
|||||||
if os.path.isdir(src) and not os.path.exists(dest):
|
if os.path.isdir(src) and not os.path.exists(dest):
|
||||||
os.symlink(join_path(subdir, d), dest)
|
os.symlink(join_path(subdir, d), dest)
|
||||||
|
|
||||||
def fix_tau_compilers(self):
|
|
||||||
filter_file('FULL_CC=' + spack_cc, 'FULL_CC=' + self.compiler.cc,
|
|
||||||
self.prefix + '/include/Makefile', backup=False,
|
|
||||||
string=True)
|
|
||||||
filter_file('FULL_CXX=' + spack_cxx, 'FULL_CXX=' +
|
|
||||||
self.compiler.cxx, self.prefix + '/include/Makefile',
|
|
||||||
backup=False, string=True)
|
|
||||||
for makefile in os.listdir(self.prefix.lib):
|
|
||||||
if makefile.startswith('Makefile.tau'):
|
|
||||||
filter_file('FULL_CC=' + spack_cc, 'FULL_CC=' +
|
|
||||||
self.compiler.cc, self.prefix.lib + "/" +
|
|
||||||
makefile, backup=False, string=True)
|
|
||||||
filter_file('FULL_CXX=' + spack_cxx, 'FULL_CXX=' +
|
|
||||||
self.compiler.cxx, self.prefix.lib +
|
|
||||||
"/" + makefile, backup=False, string=True)
|
|
||||||
|
|
||||||
def setup_run_environment(self, env):
|
def setup_run_environment(self, env):
|
||||||
pattern = join_path(self.prefix.lib, 'Makefile.*')
|
pattern = join_path(self.prefix.lib, 'Makefile.*')
|
||||||
files = glob.glob(pattern)
|
files = glob.glob(pattern)
|
||||||
|
Loading…
Reference in New Issue
Block a user