[libcamera-devel] [PATCH 08/11] Removes code to force using libc++ instead of libstdc++ if available.

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue Oct 25 01:45:40 CEST 2022


Hi Nicholas,

Thank you for the patch.

On Mon, Oct 24, 2022 at 12:55:40AM -0500, Nicholas Roth via libcamera-devel wrote:
> From: Nicholas Roth <nicholas at rothemail.net>
> 
> This breaks during cross-compilation when this is not true for the
> meson-cross cross-compiler target.
> 
> Error:
> clang++: error: argument unused during compilation: '-stdlib=libc++' [-Werror,-Wunused-command-line-argument]

I'm surprised, does the Android version of clang not support that
argument ?

> ---
>  meson.build | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index 56910698..7d0588d2 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -95,14 +95,6 @@ if cc.get_id() == 'clang'
>          ]
>      endif
>  
> -    # Use libc++ by default if available instead of libstdc++ when compiling
> -    # with clang.
> -    if cc.find_library('libc++', required: false).found()
> -        cpp_arguments += [
> -            '-stdlib=libc++',
> -        ]
> -    endif
> -

This changes the behaviour for everybody else, which is not nice. I'd
like to find a better way.

>      cpp_arguments += [
>          '-Wextra-semi',
>          '-Wthread-safety',

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list