rizsotto / Bear

Bear is a tool that generates a compilation database for clang tooling.
GNU General Public License v3.0
4.97k stars 321 forks source link

Version 3 with custom compiler #341

Closed meck closed 3 years ago

meck commented 3 years ago

Hi, I tried to run bear (v3) with a project that uses a custom fork of gcc (with a diffrent executable name). I found documentation citenames here but I can't figure out how to pass a config to bear, i assume bear runs citenames internaly. Is this simply something that is not implemented? Or am i missing something?

rizsotto commented 3 years ago

Hi @meck , good question... bear is calling intercept and then citnames to create the final JSON compilation database. Currently bear pass no config file to citnames, so citnames is using a default one which is good enough for most of the cases, but not for you.

As a workaround I would suggest to run the intercept and citnames separately. And pass a config file to citnames where you introduce the compiler as the man page suggests.

Sorry about the missing functionality, will implement as I have more time. :) Please come back with your experience with the workaround, or any feedback is welcome.

rizsotto commented 3 years ago

342 is the ticket to watch for this work.