Gazelle uses a heuristic to classify source files (
). This works fine most of the time, but sometimes fails. For example, Windows binaries will often define
wmain or
_tmain instead of
main. Therefore it would be nice to allow source authors to override the classification. For example, the source code parser could look for directives in comments of the form
// gazelle:source_kind binary
to force generation of a cc_binary rule.
Gazelle uses a heuristic to classify source files (
gazelle_cc/language/cc/fileinfo.go
Line 74 in f49ebb7
wmainor_tmaininstead ofmain. Therefore it would be nice to allow source authors to override the classification. For example, the source code parser could look for directives in comments of the form// gazelle:source_kind binaryto force generation of a
cc_binaryrule.