how to judge repository is an external repo or not in BUILD file?
xiedeacc opened this issue · 0 comments
xiedeacc commented
Description of the feature request:
I'm writing a BUILD file for libdwarf, a genrule used to generate a config.h, and this config.h was included by a source file use
#include <config.h>
this means, directory that contains config.h must be add to search path by -isystem, but bazel just add directory contains config.h use -iquote, so compile will fail for cannot find config.h. so I pass
"-isystem $(GENDIR)/src"
to copts, this works well in libdwarf repository, but if libdwarf is an external repository in other repository, this will compile failed for $(GENDIR)/src not diretory contains config.h any more
here is a demo
https://github.com/xiedeacc/libdwarf.git
bazel 6.2.1