summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>2021-10-26 00:27:53 +0200
committerMarge Bot <emma+marge@anholt.net>2021-11-09 20:51:14 +0000
commit22673a980f30cf71ea1d7e3d4feb161c549d48a4 (patch)
tree7f1b1c6750ec282be7b1d51bcd347d5bd4f16ffc /meson.build
parent5db098c98bd7d313b909041661fdb67bfc56362c (diff)
meson: Check arguments before adding.
-static-libstdc++ doesn't exist on the Android NDK, casuing all later has_argument calls to return false even though the compiler supports that argument. Fixes: 3aee462781a "meson: add windows compiler checks and libraries" Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13164>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build21
1 files changed, 16 insertions, 5 deletions
diff --git a/meson.build b/meson.build
index e1f5fb30db8..51392ee264f 100644
--- a/meson.build
+++ b/meson.build
@@ -1213,11 +1213,22 @@ if host_machine.system() == 'windows'
endif
else
add_project_link_arguments(
- '-Wl,--nxcompat',
- '-Wl,--dynamicbase',
- '-static-libgcc',
- '-static-libstdc++',
- language : ['c', 'cpp'],
+ cc.get_supported_arguments(
+ '-Wl,--nxcompat',
+ '-Wl,--dynamicbase',
+ '-static-libgcc',
+ '-static-libstdc++',
+ ),
+ language : ['c'],
+ )
+ add_project_link_arguments(
+ cpp.get_supported_arguments(
+ '-Wl,--nxcompat',
+ '-Wl,--dynamicbase',
+ '-static-libgcc',
+ '-static-libstdc++',
+ ),
+ language : ['cpp'],
)
endif
endif