[libc][bazel] add file printf targets and support
authorMichael Jones <michaelrj@google.com>
Mon, 27 Mar 2023 22:14:17 +0000 (15:14 -0700)
committerMichael Jones <michaelrj@google.com>
Wed, 26 Apr 2023 21:30:48 +0000 (14:30 -0700)
commitd94fe9728087f905dbd8fc32bc5c4a096b4d28c5
tree63f883df09d61ed6ba61bc0f754acc37753edc36
parentbbc7b30fbf52c0f0b5383b9b9f5ebdb45db98b55
[libc][bazel] add file printf targets and support

This patch adds targets for printf and fprintf to the bazel build.
Additionally, it adds support for the build system to specify where
files should be written for testing purposes. This was necessary to
enable the fprintf test under bazel.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D147008
13 files changed:
libc/src/__support/CMakeLists.txt
libc/src/__support/c_string.h [new file with mode: 0644]
libc/src/stdio/fprintf.cpp
libc/test/UnitTest/BazelFilePath.cpp [new file with mode: 0644]
libc/test/UnitTest/CMakeLists.txt
libc/test/UnitTest/CmakeFilePath.cpp [new file with mode: 0644]
libc/test/UnitTest/LibcTest.h
libc/test/UnitTest/Test.h
libc/test/src/stdio/fprintf_test.cpp
utils/bazel/llvm-project-overlay/libc/BUILD.bazel
utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl
utils/bazel/llvm-project-overlay/libc/test/UnitTest/BUILD.bazel
utils/bazel/llvm-project-overlay/libc/test/src/stdio/BUILD.bazel