[libc-commits] [PATCH] D147008: [libc][bazel] add printf and fprintf targets
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed Mar 29 15:04:32 PDT 2023
sivachandra added a comment.
To avoid calling `getenv` on all platforms, I suggest doing this:
1. Add a convenience function declaration, say `cpp::string make_test_file_path(const char *)` in `LibcTest.h`.
2. Add implementations in `cmake.cpp` and `bazel.cpp` for CMake and Bazel restpectively. The one in `cmake.cpp` would just be a passthrough. The one in `bazel.cpp` will implement mostly the logic you have added in this patch.
3. In the CMake target for `LibcUnitTest` add `cmake.cpp` and in the one for Bazel, add `bazel.cpp`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147008/new/
https://reviews.llvm.org/D147008
More information about the libc-commits
mailing list