Skip to content

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

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

Open
xiedeacc opened this issue Dec 18, 2023 · 1 comment
Open

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

xiedeacc opened this issue Dec 18, 2023 · 1 comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) stale Issues or PRs that are stale (no activity for 30 days) 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

Copy link

github-actions bot commented Mar 2, 2025

Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale.

@github-actions github-actions bot added the stale Issues or PRs that are stale (no activity for 30 days) label Mar 2, 2025
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) stale Issues or PRs that are stale (no activity for 30 days) team-Rules-CPP Issues for C++ rules type: feature request
Projects
None yet
Development

No branches or pull requests

5 participants