diff options
author | Michael Kuhn <michael.kuhn@ovgu.de> | 2021-05-25 17:01:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-25 09:01:44 -0600 |
commit | 29deb399b4eefac931e7bb114e11772196433a43 (patch) | |
tree | 5e0b8eaeeea0b5da613fd2dcaae000411baf1340 | |
parent | c9b957b71a14c7c31e4be4cf4a18032dc725d7b0 (diff) | |
download | spack-29deb399b4eefac931e7bb114e11772196433a43.tar.gz spack-29deb399b4eefac931e7bb114e11772196433a43.tar.bz2 spack-29deb399b4eefac931e7bb114e11772196433a43.tar.xz spack-29deb399b4eefac931e7bb114e11772196433a43.zip |
iwyu: link clang resources in the right location (#23885)
iwyu cannot find clang's headers if they are installed in separate
prefixes, see:
https://github.com/include-what-you-use/include-what-you-use#how-to-install
-rw-r--r-- | var/spack/repos/builtin/packages/iwyu/package.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/iwyu/package.py b/var/spack/repos/builtin/packages/iwyu/package.py index 91e19cfa82..f6b4756d41 100644 --- a/var/spack/repos/builtin/packages/iwyu/package.py +++ b/var/spack/repos/builtin/packages/iwyu/package.py @@ -44,3 +44,10 @@ class Iwyu(CMakePackage): def cmake_args(self): return [self.define('CMAKE_CXX_STANDARD', 14), self.define('CMAKE_CXX_EXTENSIONS', False)] + + @run_after('install') + def link_resources(self): + # iwyu needs to find Clang's headers + # https://github.com/include-what-you-use/include-what-you-use/blob/master/README.md#how-to-install + mkdir(self.prefix.lib) + symlink(self.spec['llvm'].prefix.lib.clang, self.prefix.lib.clang) |