summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meson.build15
1 files changed, 9 insertions, 6 deletions
diff --git a/meson.build b/meson.build
index e9a1c7e3..7850454d 100644
--- a/meson.build
+++ b/meson.build
@@ -113,12 +113,15 @@ if cc.get_id() == 'clang'
endif
endif
- # Use libc++ by default if available instead of libstdc++ when compiling
- # with clang.
- if cc.find_library('c++', required : false).found()
- cpp_arguments += [
- '-stdlib=libc++',
- ]
+ custom_stl = meson.get_external_property('cpp_stdlib', '')
+ if custom_stl == ''
+ # Use libc++ by default if available instead of libstdc++ when compiling
+ # with clang and no custom STL has been configured.
+ if cc.find_library('c++', required : false).found()
+ cpp_arguments += [
+ '-stdlib=libc++',
+ ]
+ endif
endif
cpp_arguments += [