Skip to content

Remove the use of [OPAL|OMPI|OSHMEM]_MODULE_DECLSPEC #10774

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

Merged
merged 1 commit into from
Sep 7, 2022

Conversation

jsquyres
Copy link
Member

@jsquyres jsquyres commented Sep 7, 2022

In native Microsoft Windows builds, there is difference in how MCA component struct symbols need to be exported compared to other symbols. The "MODULE_DECLSPEC" macros were for exporting MCA component struct symbols, and "DECLSPEC" macros were for all exporting all other symbols.

In other operating systems, there's no difference in how these two types of symbols are exported.

Once Open MPI stopped supporting native Microsoft Windows builds, there was no need to preserve the difference. This commit therefore does the following:

  • Removes all definitions of the "MODULE_DECLSPEC" macros
  • Converts all uses of the "MODULE_DECLSPEC" macros to "DECLSPEC"
  • Removes stale Microsoft Windows declarations in oshmem_config.h

Signed-off-by: Jeff Squyres jsquyres@cisco.com

Related to the conversation on #10770.

In native Microsoft Windows builds, there is difference in how MCA
component struct symbols need to be exported compared to other
symbols.  The "MODULE_DECLSPEC" macros were for exporting MCA
component struct symbols, and "DECLSPEC" macros were for all exporting
all other symbols.

In other operating systems, there's no difference in how these two
types of symbols are exported.

Once Open MPI stopped supporting native Microsoft Windows builds,
there was no need to preserve the difference.  This commit therefore
does the following:

- Removes all definitions of the "MODULE_DECLSPEC" macros
- Converts all uses of the "MODULE_DECLSPEC" macros to "DECLSPEC"
- Removes stale Microsoft Windows declarations in oshmem_config.h

Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
@jsquyres
Copy link
Member Author

jsquyres commented Sep 7, 2022

@bosilca @bwbarrett Can you think of any reason we still need MODULE_DECLSPEC?

Also, need confirmation from @janjust that OpenSHEMEM does not support native Windows builds (because this PR removes some __WINDOWS__ declarations in oshmem_config.h).

@bwbarrett
Copy link
Member

I think dumping the module-specific declspec is fine. We should decide what we want to do with 5.0 and either keep this patch back until 5.0 is done with the mass backports or also push it to 5.0.

@janjust
Copy link
Contributor

janjust commented Sep 7, 2022

Just confirming, we do not support windows in OSHMEM

@jsquyres
Copy link
Member Author

jsquyres commented Sep 7, 2022

I think dumping the module-specific declspec is fine. We should decide what we want to do with 5.0 and either keep this patch back until 5.0 is done with the mass backports or also push it to 5.0.

I'd be in favor of cherry-picking this to v5.0.x in the immediate future -- there's no reason to hold it back, is there?

@jsquyres jsquyres merged commit 27eda75 into open-mpi:main Sep 7, 2022
@jsquyres jsquyres deleted the pr/remove-module-declspec branch September 7, 2022 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants