From 865d38afa7e26ac1afce35d62d607a265976d8b0 Mon Sep 17 00:00:00 2001 From: Ethan Stam <33101855+EthanS94@users.noreply.github.com> Date: Tue, 9 Feb 2021 15:26:49 -0700 Subject: [PATCH] ParaView, LLVM: add -shared-intel to solve intel linking failures (#18195) --- var/spack/repos/builtin/packages/llvm/package.py | 10 ++++++++-- var/spack/repos/builtin/packages/paraview/package.py | 6 ++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index 6e3479de89..60d1bb41a3 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -393,8 +393,14 @@ def codesign_check(self): 'create this identity.' ) - def setup_build_environment(self, env): - env.append_flags("CXXFLAGS", self.compiler.cxx11_flag) + def flag_handler(self, name, flags): + if name == 'cxxflags': + flags.append(self.compiler.cxx11_flag) + return(None, flags, None) + elif name == 'ldflags' and self.spec.satisfies('%intel'): + flags.append('-shared-intel') + return(None, flags, None) + return(flags, None, None) def setup_run_environment(self, env): if "+clang" in self.spec: diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py index f9eb40c9f4..bd763c15d1 100644 --- a/var/spack/repos/builtin/packages/paraview/package.py +++ b/var/spack/repos/builtin/packages/paraview/package.py @@ -181,6 +181,12 @@ def setup_dependent_build_environment(self, env, dependent_spec): env.set('PARAVIEW_VTK_DIR', join_path(lib_dir, 'cmake', self.paraview_subdir, 'vtk')) + def flag_handler(self, name, flags): + if name == 'ldflags' and self.spec.satisfies('%intel'): + flags.append('-shared-intel') + return(None, flags, None) + return(flags, None, None) + def setup_run_environment(self, env): # paraview 5.5 and later # - cmake under lib/cmake/paraview-5.5