aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/snippets
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2022-01-10 19:02:12 -0600
committerEli Schwartz <eschwartz93@gmail.com>2022-05-03 23:03:56 -0400
commit557680f7d6b2a2e7c3d0f04fb0d6529ac7a6d475 (patch)
treededf300cdb4b39a83e7bfa9eb7720f7fb43f0352 /docs/markdown/snippets
parent8b3a54e5085933b78a8509103a76bed7ca8cdde4 (diff)
downloadmeson-557680f7d6b2a2e7c3d0f04fb0d6529ac7a6d475.zip
meson-557680f7d6b2a2e7c3d0f04fb0d6529ac7a6d475.tar.gz
meson-557680f7d6b2a2e7c3d0f04fb0d6529ac7a6d475.tar.bz2
add prefer_static built-in option
By default, meson will try to look for shared libraries first before static ones. In the meson.build itself, one can use the static keyword to control if a static library will be tried first but there's no simple way for an end user performing a build to switch back and forth at will. Let's cover this usecase by adding an option that allows a user to specify if they want dependency lookups to try static or shared libraries first. The writer of the meson.build can manually specify the static keyword where appropriate which will override the value of this option.
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r--docs/markdown/snippets/prefer_static.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/markdown/snippets/prefer_static.md b/docs/markdown/snippets/prefer_static.md
new file mode 100644
index 0000000..c63323b
--- /dev/null
+++ b/docs/markdown/snippets/prefer_static.md
@@ -0,0 +1,9 @@
+## New prefer_static built-in option
+
+Users can now set a boolean, `prefer_static`, that controls whether or not
+static linking should be tried before shared linking. This option acts as
+strictly a preference. If the preferred linking method is not successful,
+then Meson will fallback and try the other linking method. Specifically
+setting the `static` kwarg in the meson.build will take precedence over
+the value of `prefer_static` for that specific `dependency` or
+`find_library` call.