summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authoreugeneswalker <38933153+eugeneswalker@users.noreply.github.com>2021-06-22 10:00:27 -0700
committerGitHub <noreply@github.com>2021-06-22 12:00:27 -0500
commit65e7e1f9698b180aa4a42d0001405a38687f008b (patch)
treeaf0b94d17aac323e30d4b51f964cfd70ed70e41e /var
parentb0a915a3b6d83c146048ac0a8ed8ccee5f065575 (diff)
downloadspack-65e7e1f9698b180aa4a42d0001405a38687f008b.tar.gz
spack-65e7e1f9698b180aa4a42d0001405a38687f008b.tar.bz2
spack-65e7e1f9698b180aa4a42d0001405a38687f008b.tar.xz
spack-65e7e1f9698b180aa4a42d0001405a38687f008b.zip
tau: use filter_compiler_wrappers to take advantage of builtin functionality (#24457)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/tau/package.py21
1 files changed, 4 insertions, 17 deletions
diff --git a/var/spack/repos/builtin/packages/tau/package.py b/var/spack/repos/builtin/packages/tau/package.py
index 808d0837a3..87cad051ec 100644
--- a/var/spack/repos/builtin/packages/tau/package.py
+++ b/var/spack/repos/builtin/packages/tau/package.py
@@ -115,6 +115,10 @@ class Tau(Package):
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):
useropt = ["-O2 -g", self.rpath_args]
@@ -305,7 +309,6 @@ class Tau(Package):
self.link_tau_arch_dirs()
# TAU may capture Spack's internal compiler wrapper. Replace
# it with the correct compiler.
- self.fix_tau_compilers()
def link_tau_arch_dirs(self):
for subdir in os.listdir(self.prefix):
@@ -315,22 +318,6 @@ class Tau(Package):
if os.path.isdir(src) and not os.path.exists(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):
pattern = join_path(self.prefix.lib, 'Makefile.*')
files = glob.glob(pattern)