Per-target feature enablement? #25378
Unanswered
canada-geek
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
My first time posting (please be gentle :-) )
I've been searching for this for a while (and querying various LLMs), hopefully you can point me in the right direction.
In our project, we have a number of code-generation tools that need to be compiled for host execution (so far so good). These tools analyze C++ files (e.g. examine their AST) as part of their work; they leverage the clang libraries that provide this functionality. We ship pre-generated source code to our customers, but at least one of these tools needs to run on customer premises with the customer-supplied compilers/libraries.
Complications arise from this:
libc++.a
andlibc++abi.a
are linked instead of their dynamic counterpartsI've been trying to figure out how best to express this in bazel/starlark. Here is (roughly) my thought process:
copts
andlinkopts
; it seems (to me) it would only work for options that are common across all possible compiler families/versions?cc_binary
; you end up exposing compiler family/version selection into config settings or elsewhere in order to achieve thisrules_cc
implementation; curating a(n augmented) clone of this would be a maintainability nightmare (we'd much rather leverage the great work done there by others)cc_binary
)? I seem to recall reading somewhere that this hierarchical rule mechanism is not available for builtin rules (yet?)I'd appreciate your input on:
Thanks for your time and attention.
EDIT: fixed a few typos.
Beta Was this translation helpful? Give feedback.
All reactions