diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/llvm/package.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index 9ea2e1abd9..f32e3494e4 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -766,6 +766,14 @@ class Llvm(CMakePackage, CudaPackage): os.symlink(bin, sym) env.prepend_path("PATH", self.stage.path) + def setup_run_environment(self, env): + if "+clang" in self.spec: + env.set("CC", join_path(self.spec.prefix.bin, "clang")) + env.set("CXX", join_path(self.spec.prefix.bin, "clang++")) + if "+flang" in self.spec: + env.set("FC", join_path(self.spec.prefix.bin, "flang")) + env.set("F77", join_path(self.spec.prefix.bin, "flang")) + root_cmakelists_dir = "llvm" def cmake_args(self): |