at 22.05-pre 22 lines 837 B view raw
1commit b6172952c0150d84912fa6f09bab782dd0549f1e 2Author: Austin Seipp <aseipp@pobox.com> 3Date: Fri May 3 00:47:12 2019 -0500 4 5 src: special case nix build directories for clang 6 7 Signed-off-by: Austin Seipp <aseipp@pobox.com> 8 9diff --git a/src/clang_parser.cpp b/src/clang_parser.cpp 10index b1db8ff..0cfb01f 100644 11--- a/src/utils.cpp 12+++ b/src/utils.cpp 13@@ -140,6 +140,9 @@ static bool is_dir(const std::string& path) 14 // Both ksrc and kobj are guaranteed to be != "", if at least some trace of kernel sources was found. 15 std::tuple<std::string, std::string> get_kernel_dirs(const struct utsname& utsname) 16 { 17+ // NB (aseipp): special case the kernel directory for nix 18+ return { "@NIX_KERNEL_SRC@/source", "@NIX_KERNEL_SRC@/build" }; 19+ 20 #ifdef KERNEL_HEADERS_DIR 21 return {KERNEL_HEADERS_DIR, KERNEL_HEADERS_DIR}; 22 #endif