[libcxx-commits] [PATCH] D154246: [libc++] Add check for building with picolibc

David Spickett via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jul 5 09:17:52 PDT 2023


DavidSpickett added a comment.

I got this to build on Linaro's container.

clang 15.0.0 (our current compiler) fails with errors about not finding types that should be in locale.h. The files are all in the right place, and moving to clang 16 fixes this. So I assume some driver changes did that.

clang 16.0.6 failed with this on one part of the build:

  clang-16: error: argument unused during compilation: '-G R-' [-Werror,-Wunused-command-line-argument]

Turns out that `-GR-` is the equivalent of `/GR-` which is the msvc option to disable RTTI (https://learn.microsoft.com/en-us/cpp/build/reference/gr-enable-run-time-type-information?view=msvc-170).

My guess is that some part of clang checked for this `-GR-` or `-fno-rtti` and forgot to claim the other one. This was fixed in https://github.com/llvm/llvm-project/commit/cd18efb61d759405956dbd30e4b5f2720d8e1783 but we will have to wait until 17.0.0 to have that, and I don't want to be building a custom clang for Linaro's bots.

So I think the sensible thing to do right now is add `-Wno-unused-command-line-argument` to the build flags and I will update the container's clang to 16.0.6. Which we would have to do eventually anyway.

I'll let you know once that's done so you can update this diff and see a green CI build before landing.



================
Comment at: libcxx/utils/ci/run-buildbot:616
+
+    flags="--sysroot=${INSTALL_DIR}"
+    generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Armv6M-picolibc.cmake" \
----------------
`flags="--sysroot=${INSTALL_DIR} -Wno-unused-command-line-argument"`

For reasons explained in the top level comment.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154246/new/

https://reviews.llvm.org/D154246



More information about the libcxx-commits mailing list