From 9d9ea0742479f8da176dbeb58ef380e721b67669 Mon Sep 17 00:00:00 2001 From: Patrick Bridges Date: Mon, 20 Feb 2023 02:23:37 -0700 Subject: [PATCH] Fix kokkos package.py to filter spack wrappers in launch compiler and cmake configs (#35494) Kokkos when compiled by spack without +wrapper could potentially capture the spack compiler wrappers, resulting in cmake configs and kokkos_launch_compiler trying to run the spack compiler wrapper after installation. --- var/spack/repos/builtin/packages/kokkos/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/kokkos/package.py b/var/spack/repos/builtin/packages/kokkos/package.py index f6f44304ff..b44dddb082 100644 --- a/var/spack/repos/builtin/packages/kokkos/package.py +++ b/var/spack/repos/builtin/packages/kokkos/package.py @@ -226,6 +226,13 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage): variant("shared", default=True, description="Build shared libraries") + # Filter spack-generated files that may include links to the + # spack compiler wrappers + filter_compiler_wrappers("kokkos_launch_compiler", relative_root="bin") + filter_compiler_wrappers( + "KokkosConfigCommon.cmake", relative_root=os.path.join("lib64", "cmake", "Kokkos") + ) + @classmethod def get_microarch(cls, target): """Get the Kokkos microarch name for a Spack target (spec.target)."""