-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inline functions that return static references must have default visibility #1653
Conversation
…bility In rapidsai#833, we gave `rmm::mr::detail::get_map` default visibility. However, there are a number of other functions that return static references that should also have this visibility so that the static reference is unique across multiple DSOs. - Closes rapidsai#1651
Technically this is "breaking", since it changes symbol visibility. |
doc build fails because breathe doesn't know how to deal with the definition |
Why shouldn't we mark it as breaking? All that does is put it under the "breaking changes" section of the changelog. I think for future reference it should be labeled "breaking". Do you agree? |
Hmm, looks like breathe doesn't like
|
This will be subsumed by #1654, but it's probably safe to belt-and-braces it if we can figure out that docs issue. |
Yes, done. |
We must tell Doxygen to expand this macro, and particularly expand them to nothing at all, for breathe to know what to do.
botched the merge, will look tomorrow |
We want these functions explicitly marked in case the namespace export ever changes. However my per device resource PR also has these changes... |
It appears to be impossible to get doxygen to EXPAND_AS_DEFINED a macro that is in a file that is excluded via EXCLUDE_PATTERNS (even if it is explicitly listed in INPUT). If the file is only excluded via EXCLUDE, then it is visible to the preprocessor, but that setting overrides any INPUT (so explicitly listed files that are EXCLUDEd are no longer documented). Consequently, we must unfortunately just repeat the preprocessor definitions for RMM_NAMESPACE, RMM_EXPORT, and RMM_HIDDEN.
@@ -24,4 +24,5 @@ | |||
#else | |||
#define RMM_EXPORT | |||
#define RMM_HIDDEN | |||
#define RMM_NAMESPACE rmm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is necessary for anyone compiling with a compiler that doesn't advertise __GNUC__
.
After lots of fighting, I got doxygen working right. Unfortunately we have to reproduce the definitions of the macros in the doxyfile since it turns out that it's impossible to make |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approve, with one suggestion.
/merge |
Description
In #833, we gave
rmm::mr::detail::get_map
default visibility. However, there are a number of other functions that return static references that should also have this visibility so that the static reference is unique across multiple DSOs.__attribute__((visibility(default)))
#1651Checklist