| Message ID | 20261012133746.567785-1-barnabas.pocze@ideasonboard.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
Quoting Barnabás Pőcze (2026-10-12 14:37:46) > As iwyu is currently not used to check includes, enable this libc++ feature > to catch more issues related to missing includes. > > Link: https://patchwork.libcamera.org/patch/28400/ > Link: https://libcxx.llvm.org/UserDocumentation.html#libc-configuration-macros > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > --- > Example of a failed pipeline due to this: > > https://gitlab.freedesktop.org/pobrn/libcamera/-/jobs/112422232#L928 Looks like a good idea to me. Are there any other compiler checks of interest we should/could add? Anyway: Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > > --- > .gitlab-ci/meson/libc++.native | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/.gitlab-ci/meson/libc++.native b/.gitlab-ci/meson/libc++.native > index c850a20..d2170ef 100644 > --- a/.gitlab-ci/meson/libc++.native > +++ b/.gitlab-ci/meson/libc++.native > @@ -1,5 +1,5 @@ > # SPDX-License-Identifier: CC0-1.0 > > [built-in options] > -cpp_args = ['-stdlib=libc++'] > +cpp_args = ['-stdlib=libc++', '-D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES=1'] > cpp_link_args = ['-stdlib=libc++'] > -- > 2.56.0
2026. 10. 12. 15:47 keltezéssel, Kieran Bingham írta: > Quoting Barnabás Pőcze (2026-10-12 14:37:46) >> As iwyu is currently not used to check includes, enable this libc++ feature >> to catch more issues related to missing includes. >> >> Link: https://patchwork.libcamera.org/patch/28400/ >> Link: https://libcxx.llvm.org/UserDocumentation.html#libc-configuration-macros >> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> >> --- >> Example of a failed pipeline due to this: >> >> https://gitlab.freedesktop.org/pobrn/libcamera/-/jobs/112422232#L928 > > Looks like a good idea to me. > > Are there any other compiler checks of interest we should/could add? I don't have anything like this at the moment. The two important ones in my opinion are iwyu and clang-tidy. But adding iwyu most likely means that some headers must be annotated to handle "exported" #include statements properly. Not sure how people feel about that. I have experimented multiple times with clang-tidy, but never finished the integration... maybe now. > > Anyway: > > > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > >> >> --- >> .gitlab-ci/meson/libc++.native | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/.gitlab-ci/meson/libc++.native b/.gitlab-ci/meson/libc++.native >> index c850a20..d2170ef 100644 >> --- a/.gitlab-ci/meson/libc++.native >> +++ b/.gitlab-ci/meson/libc++.native >> @@ -1,5 +1,5 @@ >> # SPDX-License-Identifier: CC0-1.0 >> >> [built-in options] >> -cpp_args = ['-stdlib=libc++'] >> +cpp_args = ['-stdlib=libc++', '-D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES=1'] >> cpp_link_args = ['-stdlib=libc++'] >> -- >> 2.56.0
diff --git a/.gitlab-ci/meson/libc++.native b/.gitlab-ci/meson/libc++.native index c850a20..d2170ef 100644 --- a/.gitlab-ci/meson/libc++.native +++ b/.gitlab-ci/meson/libc++.native @@ -1,5 +1,5 @@ # SPDX-License-Identifier: CC0-1.0 [built-in options] -cpp_args = ['-stdlib=libc++'] +cpp_args = ['-stdlib=libc++', '-D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES=1'] cpp_link_args = ['-stdlib=libc++']
As iwyu is currently not used to check includes, enable this libc++ feature to catch more issues related to missing includes. Link: https://patchwork.libcamera.org/patch/28400/ Link: https://libcxx.llvm.org/UserDocumentation.html#libc-configuration-macros Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> --- Example of a failed pipeline due to this: https://gitlab.freedesktop.org/pobrn/libcamera/-/jobs/112422232#L928 --- .gitlab-ci/meson/libc++.native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.56.0