Skip to content
Snippets Groups Projects
Unverified Commit dbce60f6 authored by Han Lu's avatar Han Lu Committed by GitHub
Browse files

wording check (#2371)

<!-- Please make sure your PR follows our [contribution
guidelines](https://github.com/arbor-sim/arbor/tree/master/doc/contrib)
and agree to the terms outlined in the [PR
procedure](https://github.com/arbor-sim/arbor/tree/master/doc/contrib/pr.rst).
-->
parent 69d978ad
No related branches found
No related tags found
No related merge requests found
......@@ -4,12 +4,12 @@ Exporting Symbols
=================
The Arbor libraries are compiled with `hidden visibility <https://gcc.gnu.org/wiki/Visibility>`_ by
default which strips a compiled library of all symbols not explicitly marked as visible. Note that
default, which strips a compiled library of all symbols not explicitly marked as visible. Note that
the term *visibility* here refers to the symbol visibility exposed to the linker and not to language
*access* specifier such as public/private. Arbor provides a couple of macros to make functions and
classes visible which are defined in the header file ``export.hpp`` in each library's include
directory, i.e. ``include/arbor/export.hpp``. These header files are generated at configure time
based on the build variant, compiler and platform.
classes visible, which are defined in the header file ``export.hpp`` in each library's include
directory, i.e., ``include/arbor/export.hpp``. These header files are generated at configure time
based on the build variant, compiler, and platform.
By default, hidden/visible symbols will affect **shared** libraries directly. Since the linker is
responsible for making symbols hidden, the visibility settings are not applied to **static**
......@@ -17,11 +17,11 @@ libraries immediately, as static libraries are generated by bundling object file
(standard in cmake for ``STATIC`` libraries). In principle, the linker would be able to generate
relocatable output instead (``ld -r``) by incrementally linking object files into one output file
(sometimes called partial linking) which would apply proper visibility to static libraries.
However, we currently do not handle this case in our build scripts as it is not not nativley
However, we currently do not handle this case in our build scripts as it is not natively
`supported by cmake yet <https://gitlab.kitware.com/cmake/cmake/-/issues/16977>`_.
.. Note::
When linking an application with **static** Arbor libraries the linker may issue warnings (particularly on macos). Thus, if you encounter problems, try building shared Arbor libraries (cmake option ``-DBUILD_SHARED_LIBS=ON``) instead.
When linking an application with **static** Arbor libraries, the linker may issue warnings (particularly on MacOS). Thus, if you encounter problems, try building shared Arbor libraries (cmake option ``-DBUILD_SHARED_LIBS=ON``) instead.
Macro Description
-----------------
......@@ -39,10 +39,10 @@ Macro Description
required
* for **declarations in header files** which are not definitions
* for **definitions** of functions, friend functions and (extern) variables **in source files**
* for **definitions** of functions, friend functions, and (extern) variables **in source files**
Members and member functions of already visible classes will be visible, as well, without
further annotation, except for friend function (see below).
further annotation, except for the friend function (see below).
Implementation details and internal APIs may not need annotation as long as they do not require
visibility across the library boundary (though some annotations are required for unit test
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment