-
Notifications
You must be signed in to change notification settings - Fork 902
starter text for declspec description #10770
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
Conversation
Signed-off-by: Thomas Naughton <naughtont@ornl.gov>
Signed-off-by: Thomas Naughton <naughtont@ornl.gov>
Co-authored-by: Jeff Squyres <jsquyres@users.noreply.github.com>
Signed-off-by: Thomas Naughton <naughtont@ornl.gov>
@jsquyres Thanks for feedback. BTW, was the delineation for the DECLSPEC/MODULE_DECLSPEC accurate as to your understanding? Just want to double check myself. |
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.
@naughtont3 Do you want to add this content to the docs/developer/source-code.rst
file in #10772?
|
||
The ``*_DECLSPEC`` macros provide a method to annotate symbols to indicate | ||
their intended visibility when compiling dynamically shared object files | ||
(e.g., `libmpi.so`). |
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.
(e.g., `libmpi.so`). | |
(e.g., ``libmpi.so``). |
The ``*_DECLSPEC`` attribute is used to declare that the developer wants a | ||
symbol to be usable outside of that library/DSO. For example, |
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.
The ``*_DECLSPEC`` attribute is used to declare that the developer wants a | |
symbol to be usable outside of that library/DSO. For example, | |
The ``*_DECLSPEC`` attributes are used to declare that a | |
symbol is to be visible outside of that library/DSO's scope. For example, |
|
||
* ``*_DECLSPEC``: controls visibility on individual functions/data structures | ||
* ``*_MODULE_DECLSPEC``: controls visibility of MCA module (component) structure | ||
|
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.
Nit: extra blank line at the end of the file.
* ``*_DECLSPEC``: controls visibility on individual functions/data structures | ||
* ``*_MODULE_DECLSPEC``: controls visibility of MCA module (component) structure |
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.
Looking at the code today, I wonder if the MODULE_DECLSPEC
is left over from when we supported Windows. Today, DECLSPEC
and MODULE_DECLSPEC
resolve to the same back-end compiler attribute. I have a super-dim recollection that they might have been different on Windows, and we therefore needed 2 different macros.
But since we've long-since stopped supporting Windows, should we ditch the MODULE_DECLSPEC
macro?
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.
👍 for removing MODULE_DECLSPEC
if it is redundant.
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.
I just checked Open MPI v1.0.0, and I confirm: in Windows, there was a difference between exporting the component symbol and exporting other symbols.
Given that we don't support native Windows builds any more, I think we should remove the distinction.
@naughtont3 I can make a PR for the code change if you want to update the text.
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.
PR to remove MODULE_DECLSPEC
: #10774
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.
The text looks good to me. Thanks for writing this up!
@jsquyres Yes, it seems like that is better spot. I'll roll rest of your feedback into this PR to include the elimination of |
Signed-off-by: Thomas Naughton <naughtont@ornl.gov>
@jsquyres I create jsquyres#11 and we can just close this item once things are rolled into #10722. |
This PR has been made moot by #10780 |
Signed-off-by: Thomas Naughton naughtont@ornl.gov