[libcxx-commits] [PATCH] D155521: Run picolibc tests with qemu
Michael Platings via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jul 18 03:48:55 PDT 2023
michaelplatings added a comment.
In D155521#4509345 <https://reviews.llvm.org/D155521#4509345>, @DavidSpickett wrote:
> Surprised to not see bootcode here, but it is qemu and one can get away without it a lot of the time. Is that the case?
>
> I will add `qemu-system-arm` to our containers. Focal's apt version is 4.2.1 and I checked it has the board and cpu options needed, so I expect it'll work fine.
Thanks very much David.
I think bootcode is coming from the "crt0-semihost" library which is part of picolibc. Source is here <https://github.com/picolibc/picolibc/blob/main/picocrt/machine/arm/crt0.c>.
================
Comment at: libcxx/CMakeLists.txt:480
+if (LIBCXX_INCLUDE_TESTS)
+ find_program(QEMU_SYSTEM_ARM qemu-system-arm)
+endif()
----------------
philnik wrote:
> I'm not super happy with this. Could this instead be set through an environment variable when running the tests with `qemu-system-arm` as the default?
I agree its not ideal, it has the inappropriate intimacy code smell.
I want to keep `find_program` because it's good for developer experience. With environment variables you have to remember to keep them set in your environment whereas with CMake cache variables you can set them once at configure time. There's precedent for using `find_program` in a cache file in `clang/cmake/caches/3-stage-base.cmake` so I've moved the `find_program` to `Armv7M-picolibc.cmake` where it sits more comfortably.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155521/new/
https://reviews.llvm.org/D155521
More information about the libcxx-commits
mailing list