bindgen
bindgen copied to clipboard
Simplify find_clang.cr
There is a bit of overlap between clang/find_clang.cr and clang/CMakeLists.txt.
find_clang supports finding the clang++ binary, but this is redundant as CMake will figure it out and call find_clang with option --clang PATH.
Also, as @kalinon mentions in https://github.com/Papierkorb/bindgen/pull/32/ , probably more optimizations can be made by directly reading values from one of:
llvm-config
--cxxflags
--ldflags
--libs all
--includedir
Instead of parsing those values out manually from parts of clang++ output.
llvm-config --binpath as well