bindgen icon indicating copy to clipboard operation
bindgen copied to clipboard

Simplify find_clang.cr

Open docelic opened this issue 5 years ago • 1 comments

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.

docelic avatar May 12 '20 00:05 docelic

llvm-config --binpath as well

kalinon avatar May 12 '20 01:05 kalinon