Add cpp macros to append wrapped language info to xDS user agent#26189
Add cpp macros to append wrapped language info to xDS user agent#26189markdroth merged 4 commits intogrpc:masterfrom
Conversation
|
Quick comment first:
so technically, |
|
In general, for Bazel and cmake, you'll want to add defines in the corresponding library target. Since the change you're doing does not need to propagate to the users of the library, the change is luckily less problematic than if it was to pollute the whole environment. For bazel you want to use the For cmake, that'd be |
|
It looks like there are going to be complications in setting this macro properly for C++, because bazel is used for both C++ and Python, and cmake is used for both C++ and C#, so in both cases, we need some way to set the macro conditionally. @jtattermusch says that we can handle cmake by passing the defines to cmake from the scripts that are used to build C#. He said he'd send me a separate PR for that later this week. Bazel will require more thought, because there's no obvious way to set the macros conditionally for a target that is common to both python and C++. So I think I'm going to try to handle that in a separate PR as well. Let's move forward with this PR as-is, just providing the macros but not actually setting them. That way, the wrapped langs can start using this while we continue to figure out how to set it properly in bazel and cmake. |
|
As per today's discussion, we'll leave these macros unset for C++, setting them only for wrapped languages when we know that we're building for those languages. This means that we'll be lumping in cases where we build python with bazel in with the C++ stats, but that's probably okay for now. We can always try to find a new way to optimize that later if we need more detail. |
|
Known issues: #26019 |
@nicolasnoble, can you please advise as to the best way to set this macro in the build system for C++? I assume that we'll need to add it for both bazel and cmake? Thanks!
CC @srini100 @yashykt