From fe2dd1e8435f200c9a8432c935c84592c5f50902 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Fri, 9 Aug 2019 10:00:52 +0000 Subject: [PATCH] build: handle systems where libc++ is default ld: error: unable to find library -lstdc++fs ld: error: unable to find library -lc++abi --- meson.build | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index d785dfd..aefd356 100644 --- a/meson.build +++ b/meson.build @@ -17,11 +17,13 @@ cpp_link_args = [] if get_option('libcxx') cpp_args += ['-stdlib=libc++'] cpp_link_args += ['-stdlib=libc++', '-lc++abi'] +endif - if compiler.has_link_argument('-lc++fs') - cpp_link_args += ['-lc++fs'] - endif -else +if compiler.has_link_argument('-lc++fs') + cpp_link_args += ['-lc++fs'] +elif compiler.has_link_argument('-lc++experimental') + cpp_link_args += ['-lc++experimental'] +elif compiler.has_link_argument('-lstdc++fs') cpp_link_args += ['-lstdc++fs'] endif