Repository navigation
How do I properly set include paths for external dependencies in cc_toolchain #23197
Unanswered
stefanlada
asked this question in
Q&A
Replies: 2 comments
|
For the example you show, I'd suggest a slightly different structure: define per-platform binaries in alias(
name = "my_binary",
actual = select({
"//platforms:ecu_a": "@some_lib_ecu_a//:my_binary",
"//platforms:ecu_b": "@some_lib_ecu_b//:my_binary",
}),
)
There is in fact a new build rule for accessing directories, https://github.com/bazelbuild/bazel-skylib/tree/main/rules/directory. But defining actual |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi there,
we are currently integrating a multi-ecu (multiple embedded controller targets) project in bazel. We have an abstraction layer for the different ecu platforms and the different AL implementations are handled elsewhere so we would like to include these as external dependencies.
The problem is, that the different implementations will have slight different files and folder structures that we do not want to touch. We have created BUILD files for each of the different implementations and these provide filegroups that we can use in our cc_binary srcs list.
But we cannot figure out how to properly handle include paths. As filegroup do not support folders we cannot simply bind them together.
Short example:
The problem here is, that I am not able to define the header paths adequately in the BUILD file of the external library. This yields two problems: The integrator has to search the whole library for the build information. And bazel has no chances to recognize errors with the used -I copt flags.
Do you have any suggestions?
Is there a reason why there is no way to define folders like you can define files? If there was something like 'dirgroup' that you could use to configure a set of folder-labels this would absolutely solve the problem. And would probably help on other things as well.
BR Stefan
All reactions