Source: ccls
Version: 0.20190823-4
Severity: normal
tags: patch

hello, after having a deeper look on ccls (not so deep, apologizes if I made a 
mistake), I discovered that upstream cmake file,
uses clang -print-resource-dir to find out the include location, and this seems 
to be just working correctly
clang -print-resource-dir
/usr/lib/llvm-9/lib/clang/9.0.0

./obj-x86_64-linux-gnu/CMakeFiles/ccls.dir/build.make:  /usr/bin/c++ 
$(CXX_DEFINES) 
-DCLANG_RESOURCE_DIRECTORY="R\"(/usr/lib/llvm-9/lib/clang/9.0.0)\"" 
$(CXX_INCLUDES) $(CXX_FLAGS) -S /ccls-0.20190823/src/utils.cc -o 
CMakeFiles/ccls.dir/src/utils.cc.s


so, why can't we just drop all that code?

Also, this:
CLANG_RESOURCE_DIR := /usr/include/clang/$(CLANG_VER)
CCLS_SUBSTVARS += -Vccls:Recommends=$(shell dpkg-query -S $(CLANG_RESOURCE_DIR) 
| sed -e 's/: .*//')


Why recommend libclang-common-9-dev? can't you just use libclang-dev as runtime 
dependency?
Do you want to be sure the same clang as the one used in build is picked up?
In this case I guess it is fine to do it, but since it is just a recommends... 
a simpler way might be useful


thanks

Gianfranco

Reply via email to