[PATCH] D112883: [bazel] Re-introduce `copts` hacks for lib/AST includes.

Chandler Carruth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 1 17:52:34 PDT 2021


chandlerc added a comment.

In D112883#3101645 <https://reviews.llvm.org/D112883#3101645>, @GMNGeoffrey wrote:

> :-((((( Did you try the separate library with `strip_include_prefix`?

I can add a separate library to do that.

It would still expose all consumers to `Opcodes.inc` instead of only exposing *this* library to it. If we can afford to have the dependency on the repository name, I feel like the current solution is actually a cleaner workaround. But if we genuinely cannot, then we could revisit this.

However, I thought with Bazel having a consistent repo name was important to allow cross-repo dependencies to reliably resolve, and so maybe this isn't that bad of a thing to rely on?



================
Comment at: utils/bazel/llvm-project-overlay/clang/BUILD.bazel:711
+        # headers such as `CXXABI.h`.
+        "-I$(GENDIR)/external/llvm-project/clang/lib/AST",
+        "-I$(GENDIR)/external/llvm-project/clang/lib/AST/Interp",
----------------
GMNGeoffrey wrote:
> This breaks anyone who calls the repository something other than "llvm-project". I think we have real users for whom that is the case
This isn't the only place where we assume that in Clang's build at least. =[

Is this breaking actual users? I wouldn't expect it to break unless they depend on this target.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112883/new/

https://reviews.llvm.org/D112883



More information about the cfe-commits mailing list