Skip to content

Commit

Permalink
meson: Correctly locate libc++
Browse files Browse the repository at this point in the history
The meson find_library() function takes a library name without the "lib"
prefix. Its usage to find lic++ is thus not correct, and meson warns
about it:

WARNING: find_library('libc++') starting in "lib" only works by accident and is not portable

Fix it by dropping the "lib" prefix.

Signed-off-by: Laurent Pinchart <[email protected]>
Reviewed-by: Kieran Bingham <[email protected]>
  • Loading branch information
pinchartl committed Jul 28, 2023
1 parent 4694e44 commit eed6a07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ if cc.get_id() == 'clang'

# Use libc++ by default if available instead of libstdc++ when compiling
# with clang.
if cc.find_library('libc++', required : false).found()
if cc.find_library('c++', required : false).found()
cpp_arguments += [
'-stdlib=libc++',
]
Expand Down

0 comments on commit eed6a07

Please sign in to comment.