diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-07-03 23:28:38 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-07-03 23:36:50 +0300 |
commit | ea1bb8b49873d01ccc4c18b8a10310ef43a76967 (patch) | |
tree | afbe32571ae22250a7b7613c14bfdf67cfa84f12 | |
parent | f9c5a893848f209ef6b9a418e28d7c8f5f089ba3 (diff) | |
download | meson-symvisibility.tar.gz |
Update documentation for symbol visibility.symvisibility
-rw-r--r-- | docs/markdown/Reference-manual.md | 14 | ||||
-rw-r--r-- | docs/markdown/snippets/visibility.md | 13 |
2 files changed, 23 insertions, 4 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index 688af3758..f7a12eb14 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -505,6 +505,11 @@ be passed to [shared and static libraries](#library). - `override_options` takes an array of strings in the same format as `project`'s `default_options` overriding the values of these options for this target only, since 0.40.0 +- `symbol_visibility` specifies how symbols should be exported, see + e.g [the GCC Wiki](https://gcc.gnu.org/wiki/Visibility) for more + information. This value can either be an empty string or one of + `default`, `internal`, `hidden` or `protected`. Available since + 0.48.0. - `d_import_dirs` list of directories to look in for string imports used in the D programming language - `d_unittest`, when set to true, the D modules are compiled in debug mode @@ -970,15 +975,16 @@ dropped. That means that `join_paths('foo', '/bar')` returns `/bar`. buildtarget library(library_name, list_of_sources, ...) ``` -Builds a library that is either static, shared or both depending on the value of -`default_library` user option. You should use this instead of -[`shared_library`](#shared_library), +Builds a library that is either static, shared or both depending on +the value of `default_library` user option. You should use this +instead of [`shared_library`](#shared_library), [`static_library`](#static_library) or [`both_libraries`](#both_libraries) most of the time. This allows you to toggle your entire project (including subprojects) from shared to static with only one option. -The keyword arguments for this are the same as for [`executable`](#executable) with the following additions: +The keyword arguments for this are the same as for +[`executable`](#executable) with the following additions: - `name_prefix` the string that will be used as the prefix for the target output filename by overriding the default (only used for diff --git a/docs/markdown/snippets/visibility.md b/docs/markdown/snippets/visibility.md new file mode 100644 index 000000000..f55a48f4b --- /dev/null +++ b/docs/markdown/snippets/visibility.md @@ -0,0 +1,13 @@ +## Keyword argument for symbol visibility + +Build targets got a new keyword, `symbol_visibility` that controls how +symbols are exported from shared libraries. This is most commonly used +to hide implementation symbols like this: + +```meson +shared_library('mylib', ... + symbol_visibility: 'hidden') +``` + +In this case only symbols explicitly marked as visible in the source +files get exported. |