Message ID | 20221024055543.116040-9-nicholas@rothemail.net |
---|---|
State | Superseded |
Headers | show |
Series |
|
Related | show |
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@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',
Looks like this pops up every so often, and the solution is to remove "-stdlib=libc++": https://github.com/conan-io/conan/issues/7339 https://marc.info/?l=llvm-bugs&m=140601983212810&w=4 https://bugs.llvm.org/show_bug.cgi?id=20395 However, I've addressed this error here by explicitly specifying "-werror=false" in the Android build and will be dropping this commit, in line with the preferences I've seen expressed here. On Mon, Oct 24, 2022 at 6:46 PM Laurent Pinchart < laurent.pinchart@ideasonboard.com> wrote: > 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@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 >
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 - cpp_arguments += [ '-Wextra-semi', '-Wthread-safety',
From: Nicholas Roth <nicholas@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] --- meson.build | 8 -------- 1 file changed, 8 deletions(-)