build: handle systems where libc++ is default

ld: error: unable to find library -lstdc++fs
ld: error: unable to find library -lc++abi
pull/425/head
Jan Beich 2019-08-09 10:00:52 +00:00
parent 1dc557456e
commit fe2dd1e843
1 changed files with 6 additions and 4 deletions

View File

@ -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