diff --git a/libc/cmake/modules/LLVMLibCRules.cmake b/libc/cmake/modules/LLVMLibCRules.cmake --- a/libc/cmake/modules/LLVMLibCRules.cmake +++ b/libc/cmake/modules/LLVMLibCRules.cmake @@ -146,18 +146,6 @@ PRIVATE "${LIBC_BUILD_DIR}/include;${LIBC_SOURCE_DIR};${LIBC_BUILD_DIR}" ) - if(ADD_ENTRYPOINT_OBJ_COMPILE_OPTIONS) - target_compile_options( - ${target_name}_objects - PRIVATE ${ADD_ENTRYPOINT_OBJ_COMPILE_OPTIONS} - ) - endif() - if(ADD_ENTRYPOINT_OBJ_COMPILE_DEFINITIONS) - target_compile_definitions( - ${target_name}_objects - PRIVATE ${ADD_ENTRYPOINT_OBJ_COMPILE_DEFINITIONS} - ) - endif() add_dependencies( ${target_name}_objects support_common_h @@ -320,8 +308,7 @@ # SRCS # HDRS # DEPENDS -# COMPILE_OPTIONS -# COMPILE_DEFINITIONS +# COMPILE_OPTIONS # ) function(add_libc_unittest target_name) if(NOT LLVM_INCLUDE_TESTS) @@ -332,7 +319,7 @@ "LIBC_UNITTEST" "" # No optional arguments "SUITE" # Single value arguments - "SRCS;HDRS;DEPENDS;COMPILE_OPTIONS;COMPILE_DEFINITIONS" # Multi-value arguments + "SRCS;HDRS;DEPENDS;COMPILE_OPTIONS" # Multi-value arguments ${ARGN} ) if(NOT LIBC_UNITTEST_SRCS) @@ -376,12 +363,7 @@ PRIVATE ${LIBC_UNITTEST_COMPILE_OPTIONS} ) endif() - if(LIBC_UNITTEST_COMPILE_DEFINITIONS) - target_compile_definitions( - ${target_name} - PRIVATE ${LIBC_UNITTEST_COMPILE_DEFINITIONS} - ) - endif() + if(library_deps) target_link_libraries(${target_name} PRIVATE ${library_deps}) endif() diff --git a/libc/test/src/string/memcpy_test.cpp b/libc/test/src/string/memcpy_test.cpp --- a/libc/test/src/string/memcpy_test.cpp +++ b/libc/test/src/string/memcpy_test.cpp @@ -8,12 +8,7 @@ #include "utils/CPP/ArrayRef.h" #include "utils/UnitTest/Test.h" - -namespace __llvm_libc { - -void *memcpy(void *__restrict, const void *__restrict, size_t); - -} // namespace __llvm_libc +#include "src/string/memcpy.h" using __llvm_libc::cpp::Array; using __llvm_libc::cpp::ArrayRef;