From 198e59f7645bffbc2ba1e68db2747b8c07997ad6 Mon Sep 17 00:00:00 2001
From: Mathieu Othacehe <m.othacehe@gmail.com>
Date: Tue, 19 Nov 2019 16:41:33 +0100
Subject: [PATCH] gnu: clang-from-llvm: Add kernel-headers to default include
directories.
Stand-alone "clang" binary is not able to find kernel headers because they are
normally set as propagated inputs of gcc-toolchain and clang-toolchain, an
thus available via CPATH.
As some code indexers rely on libclang, kernel-headers include path needs to
be hard-coded.
* gnu/packages/llvm.scm (clang-from-llvm):
---
gnu/packages/llvm.scm | 2 ++
1 file changed, 2 insertions(+)
@@ -195,6 +195,8 @@ compiler. In LLVM this library is called \"compiler-rt\".")
;; Use a sane default include directory.
(string-append "-DC_INCLUDE_DIRS="
(assoc-ref %build-inputs "libc")
+ "/include:"
+ (assoc-ref %build-inputs "kernel-headers")
"/include"))
;; Don't use '-g' during the build to save space.
--
2.24.0