Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to judge repository is an external repo or not in BUILD file? #20586

Open
xiedeacc opened this issue Dec 18, 2023 · 0 comments
Open

how to judge repository is an external repo or not in BUILD file? #20586

xiedeacc opened this issue Dec 18, 2023 · 0 comments
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Rules-CPP Issues for C++ rules type: feature request

Comments

@xiedeacc
Copy link

xiedeacc commented Dec 18, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Rules-CPP Issues for C++ rules type: feature request
Projects
None yet
Development

No branches or pull requests

5 participants