Hi!
I am indeed implementing an aspect to run a linter tool (clang-tidy) on the .cpp files that my cc target is made of. The linter is based on this aspect implementation:
Inside that aspect implementation, I need to obtain the copts that were passed to that particular target. However "target" only contains CcInfo, which doesn't contain copts. So, how can I obtain the copts that were passed to that particular cc_target?
Note that I don't care about dependencies here. I want to obtain information about a particular target, in isolation from dependencies/dependees. In other words, if I create the target like:
cc_library(
name = "foo",
copts =["-DMY_DEFINE"],
)
I want to be able to get that copt inside the aspect.
Let me know if anything is unclear. Thanks!
/Carlos