diff --git a/libc/fuzzing/string/CMakeLists.txt b/libc/fuzzing/string/CMakeLists.txt --- a/libc/fuzzing/string/CMakeLists.txt +++ b/libc/fuzzing/string/CMakeLists.txt @@ -4,4 +4,5 @@ strcpy_fuzz.cpp DEPENDS strcpy + memcpy ) diff --git a/libc/src/math/round_redirector.cpp b/libc/src/math/round_redirector.cpp --- a/libc/src/math/round_redirector.cpp +++ b/libc/src/math/round_redirector.cpp @@ -13,7 +13,8 @@ namespace __llvm_libc { double __round_redirector(double x) { - return ::round(x); + // Call system round since llvm-libc round is yet to be implemented. + return ::round(x); // LIBC-NOLINT } } // namespace __llvm_libc diff --git a/libc/src/string/CMakeLists.txt b/libc/src/string/CMakeLists.txt --- a/libc/src/string/CMakeLists.txt +++ b/libc/src/string/CMakeLists.txt @@ -19,6 +19,7 @@ strcpy.h DEPENDS string_h + memcpy ) # ------------------------------------------------------------------------------ diff --git a/libc/src/string/strcpy.cpp b/libc/src/string/strcpy.cpp --- a/libc/src/string/strcpy.cpp +++ b/libc/src/string/strcpy.cpp @@ -7,13 +7,15 @@ //===----------------------------------------------------------------------===// #include "src/string/strcpy.h" +#include "src/string/memcpy.h" #include "src/__support/common.h" namespace __llvm_libc { char *LLVM_LIBC_ENTRYPOINT(strcpy)(char *dest, const char *src) { - return reinterpret_cast(::memcpy(dest, src, ::strlen(src) + 1)); + return reinterpret_cast( + __llvm_libc::memcpy(dest, src, ::strlen(src) + 1)); } } // namespace __llvm_libc diff --git a/libc/test/src/string/CMakeLists.txt b/libc/test/src/string/CMakeLists.txt --- a/libc/test/src/string/CMakeLists.txt +++ b/libc/test/src/string/CMakeLists.txt @@ -11,6 +11,7 @@ DEPENDS strcat strcpy + memcpy ) add_libc_unittest( @@ -21,6 +22,7 @@ strcpy_test.cpp DEPENDS strcpy + memcpy ) # Tests all implementations of memcpy that can run on the host.