File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -263,3 +263,30 @@ of the |ompi_series| source tree):
263
263
264
264
Under these mandated directories, frameworks and/or components may have
265
265
arbitrary directory structures, however.
266
+
267
+ Symbol Visibility
268
+ -----------------
269
+
270
+ The ` ` * _DECLSPEC` ` macros provide a method to annotate symbols to indicate
271
+ their intended visibility when compiling dynamically shared object files
272
+ (e.g., ` ` libmpi.so` ` ). The macros are defined on a per project basis:
273
+
274
+ * Open MPI: ` ` OMPI_DECLSPEC` `
275
+ * Open PAL: ` ` OPAL_DECLSPEC` `
276
+ * OpenSHMEM: ` ` OSHMEM_DECLSPEC` `
277
+
278
+ The macros expand to the appropriate compiler and platform flags for marking
279
+ whether a symbol should be explicitly made public in the target project' s
280
+ library namespace.
281
+ The ``*_DECLSPEC`` attributes are used to declare that a symbol is to be
282
+ visible outside of that library/DSO' s scope. For example, ` ` OMPI_DECLSPEC` `
283
+ is used to control what symbols are visible in the ` ` libmpi.so` ` scope.
284
+
285
+ .. note:: This is entirely related to dynamic library compilation and does not
286
+ apply to static compilation.
287
+
288
+ .. note:: The macros were originally introduced when Open MPI supported
289
+ Windows (circa Open MPI v1.0.0) and are motivated by the Windows
290
+ ` __declspec < https://docs.microsoft.com/en-us/cpp/cpp/declspec? view=msvc-170> ` _.
291
+ While support for Windows has been dropped from Open MPI, the symbol
292
+ visibility macros remain.
You can’t perform that action at this time.
0 commit comments