diff --git a/libc/config/linux/CMakeLists.txt b/libc/config/linux/CMakeLists.txt --- a/libc/config/linux/CMakeLists.txt +++ b/libc/config/linux/CMakeLists.txt @@ -1,15 +1,3 @@ -add_gen_header( - linux_syscall_h - DEF_FILE syscall.h.def - GEN_HDR syscall.h - PARAMS - inline_syscalls=${LIBC_TARGET_ARCHITECTURE}/syscall.h.inc - DATA_FILES - ${LIBC_TARGET_ARCHITECTURE}/syscall.h.inc - DEPENDS - libc.src.__support.common -) - add_header( app_h HDR diff --git a/libc/loader/linux/x86_64/CMakeLists.txt b/libc/loader/linux/x86_64/CMakeLists.txt --- a/libc/loader/linux/x86_64/CMakeLists.txt +++ b/libc/loader/linux/x86_64/CMakeLists.txt @@ -3,9 +3,9 @@ SRC start.cpp DEPENDS - libc.config.linux.linux_syscall_h libc.config.linux.app_h libc.include.sys_syscall + libc.src.__support.OSUtil.osutil libc.src.string.memcpy libc.src.sys.mman.mmap COMPILE_OPTIONS diff --git a/libc/loader/linux/x86_64/start.cpp b/libc/loader/linux/x86_64/start.cpp --- a/libc/loader/linux/x86_64/start.cpp +++ b/libc/loader/linux/x86_64/start.cpp @@ -7,9 +7,9 @@ //===----------------------------------------------------------------------===// #include "config/linux/app.h" -#include "config/linux/syscall.h" #include "include/sys/mman.h" #include "include/sys/syscall.h" +#include "src/__support/OSUtil/syscall.h" #include "src/string/memcpy.h" #include "src/sys/mman/mmap.h" diff --git a/libc/src/__support/OSUtil/CMakeLists.txt b/libc/src/__support/OSUtil/CMakeLists.txt --- a/libc/src/__support/OSUtil/CMakeLists.txt +++ b/libc/src/__support/OSUtil/CMakeLists.txt @@ -5,6 +5,7 @@ HDRS io.h quick_exit.h + syscall.h DEPENDS libc.src.__support.OSUtil.linux.linux_util ) diff --git a/libc/src/__support/OSUtil/linux/CMakeLists.txt b/libc/src/__support/OSUtil/linux/CMakeLists.txt --- a/libc/src/__support/OSUtil/linux/CMakeLists.txt +++ b/libc/src/__support/OSUtil/linux/CMakeLists.txt @@ -1,10 +1,12 @@ +add_subdirectory(x86_64) + add_header_library( linux_util HDRS io.h quick_exit.h + syscall.h DEPENDS - libc.config.linux.linux_syscall_h - libc.include.sys_syscall - libc.src.string.string_utils + .x86_64.linux_x86_64_util + libc.src.__support.common ) diff --git a/libc/src/__support/OSUtil/linux/io.h b/libc/src/__support/OSUtil/linux/io.h --- a/libc/src/__support/OSUtil/linux/io.h +++ b/libc/src/__support/OSUtil/linux/io.h @@ -9,9 +9,9 @@ #ifndef LLVM_LIBC_SRC_SUPPORT_OSUTIL_LINUX_IO_H #define LLVM_LIBC_SRC_SUPPORT_OSUTIL_LINUX_IO_H -#include "config/linux/syscall.h" // For internal syscall function. -#include "include/sys/syscall.h" // For syscall numbers. +#include "include/sys/syscall.h" // For syscall numbers. #include "src/string/string_utils.h" +#include "syscall.h" // For internal syscall function. namespace __llvm_libc { diff --git a/libc/src/__support/OSUtil/linux/quick_exit.h b/libc/src/__support/OSUtil/linux/quick_exit.h --- a/libc/src/__support/OSUtil/linux/quick_exit.h +++ b/libc/src/__support/OSUtil/linux/quick_exit.h @@ -9,8 +9,8 @@ #ifndef LLVM_LIBC_SRC_SUPPORT_OSUTIL_LINUX_QUICK_EXIT_H #define LLVM_LIBC_SRC_SUPPORT_OSUTIL_LINUX_QUICK_EXIT_H -#include "config/linux/syscall.h" // For internal syscall function. -#include "include/sys/syscall.h" // For syscall numbers. +#include "include/sys/syscall.h" // For syscall numbers. +#include "syscall.h" // For internal syscall function. namespace __llvm_libc { diff --git a/libc/src/__support/OSUtil/linux/syscall.h b/libc/src/__support/OSUtil/linux/syscall.h new file mode 100644 --- /dev/null +++ b/libc/src/__support/OSUtil/linux/syscall.h @@ -0,0 +1,18 @@ +//===----------------------- Linux syscalls ---------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIBC_SRC_SUPPORT_OSUTIL_LINUX_SYSCALL_H +#define LLVM_LIBC_SRC_SUPPORT_OSUTIL_LINUX_SYSCALL_H + +#include "src/__support/architectures.h" + +#ifdef LLVM_LIBC_ARCH_X86_64 +#include "x86_64/syscall.h" +#endif + +#endif // LLVM_LIBC_SRC_SUPPORT_OSUTIL_LINUX_SYSCALL_H diff --git a/libc/src/__support/OSUtil/linux/x86_64/CMakeLists.txt b/libc/src/__support/OSUtil/linux/x86_64/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/libc/src/__support/OSUtil/linux/x86_64/CMakeLists.txt @@ -0,0 +1,7 @@ +add_header_library( + linux_x86_64_util + HDRS + syscall.h + DEPENDS + libc.src.__support.common +) diff --git a/libc/config/linux/x86_64/syscall.h.inc b/libc/src/__support/OSUtil/linux/x86_64/syscall.h rename from libc/config/linux/x86_64/syscall.h.inc rename to libc/src/__support/OSUtil/linux/x86_64/syscall.h --- a/libc/config/linux/x86_64/syscall.h.inc +++ b/libc/src/__support/OSUtil/linux/x86_64/syscall.h @@ -1,4 +1,4 @@ -//===------------ inline implementation of x86_64 syscalls ----------------===// +//===---------- inline implementation of x86_64 syscalls ----------* C++ *-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,7 +6,8 @@ // //===----------------------------------------------------------------------===// -%%begin() +#ifndef LLVM_LIBC_SRC_SUPPORT_OSUTIL_LINUX_X86_64_SYSCALL_H +#define LLVM_LIBC_SRC_SUPPORT_OSUTIL_LINUX_X86_64_SYSCALL_H #include "src/__support/common.h" @@ -100,7 +101,8 @@ return syscall(__number, (long)ts...); } - #undef SYSCALL_CLOBBER_LIST } // namespace __llvm_libc + +#endif // LLVM_LIBC_SRC_SUPPORT_OSUTIL_LINUX_X86_64_SYSCALL_H diff --git a/libc/config/linux/syscall.h.def b/libc/src/__support/OSUtil/syscall.h rename from libc/config/linux/syscall.h.def rename to libc/src/__support/OSUtil/syscall.h --- a/libc/config/linux/syscall.h.def +++ b/libc/src/__support/OSUtil/syscall.h @@ -6,9 +6,11 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_LIBC_CONFIG_LINUX_SYSCALL_H -#define LLVM_LIBC_CONFIG_LINUX_SYSCALL_H +#ifndef LLVM_LIBC_SRC_SUPPORT_OSUTIL_SYSCALL_H +#define LLVM_LIBC_SRC_SUPPORT_OSUTIL_SYSCALL_H -%%include_file(${inline_syscalls}) +#ifdef __unix__ +#include "linux/syscall.h" +#endif -#endif // LLVM_LIBC_CONFIG_LINUX_SYSCALL_H +#endif // LLVM_LIBC_SRC_SUPPORT_OSUTIL_SYSCALL_H diff --git a/libc/src/assert/CMakeLists.txt b/libc/src/assert/CMakeLists.txt --- a/libc/src/assert/CMakeLists.txt +++ b/libc/src/assert/CMakeLists.txt @@ -8,7 +8,7 @@ DEPENDS # These two dependencies are temporary and should be replaced by fprintf # later. - libc.config.linux.linux_syscall_h + libc.src.__support.OSUtil.osutil libc.include.sys_syscall libc.src.stdlib.abort ) diff --git a/libc/src/assert/__assert_fail.cpp b/libc/src/assert/__assert_fail.cpp --- a/libc/src/assert/__assert_fail.cpp +++ b/libc/src/assert/__assert_fail.cpp @@ -10,8 +10,8 @@ #include "src/stdlib/abort.h" // These includes are temporary. -#include "config/linux/syscall.h" // For internal syscall function. #include "include/sys/syscall.h" // For syscall numbers. +#include "src/__support/OSUtil/syscall.h" // For internal syscall function. namespace __llvm_libc { diff --git a/libc/src/signal/linux/CMakeLists.txt b/libc/src/signal/linux/CMakeLists.txt --- a/libc/src/signal/linux/CMakeLists.txt +++ b/libc/src/signal/linux/CMakeLists.txt @@ -7,9 +7,9 @@ signal.h ../raise.h DEPENDS - libc.config.linux.linux_syscall_h libc.include.signal libc.include.sys_syscall + libc.src.__support.OSUtil.osutil ) add_object_library( @@ -25,8 +25,8 @@ # asan creates asan.module_ctor which uses stack space, causing warnings. -fno-sanitize=address DEPENDS - libc.config.linux.linux_syscall_h libc.include.sys_syscall + libc.src.__support.OSUtil.osutil ) add_entrypoint_object( @@ -38,9 +38,9 @@ ../sigaction.h DEPENDS .__restore - libc.config.linux.linux_syscall_h libc.include.signal libc.include.sys_syscall + libc.src.__support.OSUtil.osutil libc.src.errno.__errno_location ) @@ -52,9 +52,9 @@ signal.h ../sigprocmask.h DEPENDS - libc.config.linux.linux_syscall_h libc.include.signal libc.include.sys_syscall + libc.src.__support.OSUtil.osutil libc.src.errno.__errno_location ) diff --git a/libc/src/signal/linux/__restore.cpp b/libc/src/signal/linux/__restore.cpp --- a/libc/src/signal/linux/__restore.cpp +++ b/libc/src/signal/linux/__restore.cpp @@ -10,8 +10,8 @@ // strongly control the options this file is compiled with. __restore_rt cannot // make any stack allocations so we must ensure this. -#include "config/linux/syscall.h" #include "include/sys/syscall.h" +#include "src/__support/OSUtil/syscall.h" namespace __llvm_libc { diff --git a/libc/src/signal/linux/signal.h b/libc/src/signal/linux/signal.h --- a/libc/src/signal/linux/signal.h +++ b/libc/src/signal/linux/signal.h @@ -9,8 +9,8 @@ #ifndef LLVM_LIBC_SRC_SIGNAL_LINUX_SIGNAL_H #define LLVM_LIBC_SRC_SIGNAL_LINUX_SIGNAL_H -#include "config/linux/syscall.h" // For internal syscall function. -#include "include/sys/syscall.h" // For syscall numbers. +#include "include/sys/syscall.h" // For syscall numbers. +#include "src/__support/OSUtil/syscall.h" // For internal syscall function. #include "include/signal.h" diff --git a/libc/src/stdlib/linux/CMakeLists.txt b/libc/src/stdlib/linux/CMakeLists.txt --- a/libc/src/stdlib/linux/CMakeLists.txt +++ b/libc/src/stdlib/linux/CMakeLists.txt @@ -6,6 +6,6 @@ ../_Exit.h DEPENDS libc.include.sys_syscall - libc.config.linux.linux_syscall_h libc.include.stdlib + libc.src.__support.OSUtil.osutil ) diff --git a/libc/src/stdlib/linux/_Exit.cpp b/libc/src/stdlib/linux/_Exit.cpp --- a/libc/src/stdlib/linux/_Exit.cpp +++ b/libc/src/stdlib/linux/_Exit.cpp @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include "config/linux/syscall.h" // For internal syscall function. -#include "include/sys/syscall.h" // For syscall numbers. +#include "include/sys/syscall.h" // For syscall numbers. +#include "src/__support/OSUtil/syscall.h" // For internal syscall function. #include "src/__support/common.h" #include "src/stdlib/_Exit.h" diff --git a/libc/src/sys/mman/linux/CMakeLists.txt b/libc/src/sys/mman/linux/CMakeLists.txt --- a/libc/src/sys/mman/linux/CMakeLists.txt +++ b/libc/src/sys/mman/linux/CMakeLists.txt @@ -5,9 +5,9 @@ HDRS ../mmap.h DEPENDS - libc.config.linux.linux_syscall_h libc.include.sys_mman libc.include.sys_syscall + libc.src.__support.OSUtil.osutil libc.src.errno.__errno_location ) @@ -18,8 +18,8 @@ HDRS ../munmap.h DEPENDS - libc.config.linux.linux_syscall_h libc.include.sys_mman libc.include.sys_syscall + libc.src.__support.OSUtil.osutil libc.src.errno.__errno_location ) diff --git a/libc/src/sys/mman/linux/mmap.cpp b/libc/src/sys/mman/linux/mmap.cpp --- a/libc/src/sys/mman/linux/mmap.cpp +++ b/libc/src/sys/mman/linux/mmap.cpp @@ -8,8 +8,8 @@ #include "src/sys/mman/mmap.h" -#include "config/linux/syscall.h" // For internal syscall function. -#include "include/sys/syscall.h" // For syscall numbers. +#include "include/sys/syscall.h" // For syscall numbers. +#include "src/__support/OSUtil/syscall.h" // For internal syscall function. #include "src/__support/common.h" #include "src/errno/llvmlibc_errno.h" diff --git a/libc/src/sys/mman/linux/munmap.cpp b/libc/src/sys/mman/linux/munmap.cpp --- a/libc/src/sys/mman/linux/munmap.cpp +++ b/libc/src/sys/mman/linux/munmap.cpp @@ -8,8 +8,8 @@ #include "src/sys/mman/munmap.h" -#include "config/linux/syscall.h" // For internal syscall function. -#include "include/sys/syscall.h" // For syscall numbers. +#include "include/sys/syscall.h" // For syscall numbers. +#include "src/__support/OSUtil/syscall.h" // For internal syscall function. #include "src/__support/common.h" #include "src/errno/llvmlibc_errno.h" diff --git a/libc/src/threads/linux/CMakeLists.txt b/libc/src/threads/linux/CMakeLists.txt --- a/libc/src/threads/linux/CMakeLists.txt +++ b/libc/src/threads/linux/CMakeLists.txt @@ -16,9 +16,9 @@ ../call_once.h DEPENDS .threads_utils - libc.config.linux.linux_syscall_h libc.include.sys_syscall libc.include.threads + libc.src.__support.OSUtil.osutil ) add_header_library( @@ -30,9 +30,9 @@ Thread.h DEPENDS .thread_start_args_h - libc.config.linux.linux_syscall_h libc.include.sys_syscall libc.include.threads + libc.src.__support.OSUtil.osutil ) add_entrypoint_object( @@ -43,11 +43,11 @@ ../thrd_create.h DEPENDS .threads_utils - libc.config.linux.linux_syscall_h libc.include.errno libc.include.sys_syscall libc.include.threads libc.src.__support.common + libc.src.__support.OSUtil.osutil libc.src.errno.__errno_location libc.src.sys.mman.mmap COMPILE_OPTIONS @@ -64,11 +64,11 @@ ../thrd_join.h DEPENDS .threads_utils - libc.config.linux.linux_syscall_h libc.include.sys_syscall libc.include.threads - libc.src.sys.mman.munmap libc.src.__support.common + libc.src.__support.OSUtil.osutil + libc.src.sys.mman.munmap ) add_entrypoint_object( diff --git a/libc/src/threads/linux/CndVar.h b/libc/src/threads/linux/CndVar.h --- a/libc/src/threads/linux/CndVar.h +++ b/libc/src/threads/linux/CndVar.h @@ -12,9 +12,9 @@ #include "Futex.h" #include "Mutex.h" -#include "config/linux/syscall.h" // For syscall functions. -#include "include/sys/syscall.h" // For syscall numbers. -#include "include/threads.h" // For values like thrd_success etc. +#include "include/sys/syscall.h" // For syscall numbers. +#include "include/threads.h" // For values like thrd_success etc. +#include "src/__support/OSUtil/syscall.h" // For syscall functions. #include // For futex operations. #include // For atomic operations diff --git a/libc/src/threads/linux/Mutex.h b/libc/src/threads/linux/Mutex.h --- a/libc/src/threads/linux/Mutex.h +++ b/libc/src/threads/linux/Mutex.h @@ -11,9 +11,9 @@ #include "Futex.h" -#include "config/linux/syscall.h" // For syscall functions. -#include "include/sys/syscall.h" // For syscall numbers. -#include "include/threads.h" // For values like thrd_success etc. +#include "include/sys/syscall.h" // For syscall numbers. +#include "include/threads.h" // For values like thrd_success etc. +#include "src/__support/OSUtil/syscall.h" // For syscall functions. #include // For futex operations. #include diff --git a/libc/src/threads/linux/call_once.cpp b/libc/src/threads/linux/call_once.cpp --- a/libc/src/threads/linux/call_once.cpp +++ b/libc/src/threads/linux/call_once.cpp @@ -7,9 +7,9 @@ //===----------------------------------------------------------------------===// #include "src/threads/call_once.h" -#include "config/linux/syscall.h" // For syscall functions. -#include "include/sys/syscall.h" // For syscall numbers. -#include "include/threads.h" // For call_once related type definition. +#include "include/sys/syscall.h" // For syscall numbers. +#include "include/threads.h" // For call_once related type definition. +#include "src/__support/OSUtil/syscall.h" // For syscall functions. #include "src/__support/common.h" #include "src/threads/linux/Futex.h" diff --git a/libc/src/threads/linux/thrd_create.cpp b/libc/src/threads/linux/thrd_create.cpp --- a/libc/src/threads/linux/thrd_create.cpp +++ b/libc/src/threads/linux/thrd_create.cpp @@ -7,11 +7,11 @@ //===----------------------------------------------------------------------===// #include "src/threads/thrd_create.h" -#include "config/linux/syscall.h" // For syscall function. -#include "include/errno.h" // For E* error values. -#include "include/sys/mman.h" // For PROT_* and MAP_* definitions. -#include "include/sys/syscall.h" // For syscall numbers. -#include "include/threads.h" // For thrd_* type definitions. +#include "include/errno.h" // For E* error values. +#include "include/sys/mman.h" // For PROT_* and MAP_* definitions. +#include "include/sys/syscall.h" // For syscall numbers. +#include "include/threads.h" // For thrd_* type definitions. +#include "src/__support/OSUtil/syscall.h" // For syscall function. #include "src/__support/common.h" #include "src/errno/llvmlibc_errno.h" #include "src/sys/mman/mmap.h" diff --git a/libc/src/threads/linux/thrd_join.cpp b/libc/src/threads/linux/thrd_join.cpp --- a/libc/src/threads/linux/thrd_join.cpp +++ b/libc/src/threads/linux/thrd_join.cpp @@ -7,9 +7,9 @@ //===----------------------------------------------------------------------===// #include "src/threads/thrd_join.h" -#include "config/linux/syscall.h" // For syscall function. -#include "include/sys/syscall.h" // For syscall numbers. -#include "include/threads.h" // For thrd_* type definitions. +#include "include/sys/syscall.h" // For syscall numbers. +#include "include/threads.h" // For thrd_* type definitions. +#include "src/__support/OSUtil/syscall.h" // For syscall function. #include "src/__support/common.h" #include "src/sys/mman/munmap.h" #include "src/threads/linux/Futex.h" diff --git a/libc/src/unistd/linux/CMakeLists.txt b/libc/src/unistd/linux/CMakeLists.txt --- a/libc/src/unistd/linux/CMakeLists.txt +++ b/libc/src/unistd/linux/CMakeLists.txt @@ -6,7 +6,7 @@ ../write.h DEPENDS libc.include.unistd - libc.config.linux.linux_syscall_h libc.include.sys_syscall + libc.src.__support.OSUtil.osutil libc.src.errno.__errno_location ) diff --git a/libc/src/unistd/linux/write.cpp b/libc/src/unistd/linux/write.cpp --- a/libc/src/unistd/linux/write.cpp +++ b/libc/src/unistd/linux/write.cpp @@ -8,8 +8,8 @@ #include "src/unistd/write.h" -#include "config/linux/syscall.h" // For internal syscall function. -#include "include/sys/syscall.h" // For syscall numbers. +#include "include/sys/syscall.h" // For syscall numbers. +#include "src/__support/OSUtil/syscall.h" // For internal syscall function. #include "src/__support/common.h" #include "src/errno/llvmlibc_errno.h" diff --git a/libc/test/CMakeLists.txt b/libc/test/CMakeLists.txt --- a/libc/test/CMakeLists.txt +++ b/libc/test/CMakeLists.txt @@ -18,6 +18,5 @@ return() endif() -add_subdirectory(config) add_subdirectory(integration) add_subdirectory(loader) diff --git a/libc/test/config/CMakeLists.txt b/libc/test/config/CMakeLists.txt deleted file mode 100644 --- a/libc/test/config/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -add_subdirectory(${LIBC_TARGET_OS}) diff --git a/libc/test/config/linux/CMakeLists.txt b/libc/test/config/linux/CMakeLists.txt deleted file mode 100644 --- a/libc/test/config/linux/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -add_libc_testsuite(libc_linux_tests) - -if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_ARCHITECTURE}) - add_subdirectory(${LIBC_TARGET_ARCHITECTURE}) -endif() diff --git a/libc/test/config/linux/x86_64/CMakeLists.txt b/libc/test/config/linux/x86_64/CMakeLists.txt deleted file mode 100644 --- a/libc/test/config/linux/x86_64/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -add_libc_unittest( - libc_linux_x86_64_syscall_unittest - SUITE libc_linux_tests - SRCS syscall_test.cpp - DEPENDS - libc.config.linux.linux_syscall_h -) diff --git a/libc/test/src/__support/CMakeLists.txt b/libc/test/src/__support/CMakeLists.txt --- a/libc/test/src/__support/CMakeLists.txt +++ b/libc/test/src/__support/CMakeLists.txt @@ -48,3 +48,5 @@ DEPENDS ${float_test_file} COMMENT "Test the strtof and strtod implementations against precomputed results." VERBATIM) + +add_subdirectory(OSUtil) diff --git a/libc/test/src/__support/OSUtil/CMakeLists.txt b/libc/test/src/__support/OSUtil/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/libc/test/src/__support/OSUtil/CMakeLists.txt @@ -0,0 +1,3 @@ +add_libc_testsuite(libc_osutil_tests) + +add_subdirectory(linux) diff --git a/libc/test/src/__support/OSUtil/linux/CMakeLists.txt b/libc/test/src/__support/OSUtil/linux/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/libc/test/src/__support/OSUtil/linux/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(x86_64) diff --git a/libc/test/src/__support/OSUtil/linux/x86_64/CMakeLists.txt b/libc/test/src/__support/OSUtil/linux/x86_64/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/libc/test/src/__support/OSUtil/linux/x86_64/CMakeLists.txt @@ -0,0 +1,7 @@ +add_libc_unittest( + syscall_unittest + SUITE libc_osutil_tests + SRCS syscall_test.cpp + DEPENDS + libc.src.__support.OSUtil.osutil +) diff --git a/libc/test/config/linux/x86_64/syscall_test.cpp b/libc/test/src/__support/OSUtil/linux/x86_64/syscall_test.cpp rename from libc/test/config/linux/x86_64/syscall_test.cpp rename to libc/test/src/__support/OSUtil/linux/x86_64/syscall_test.cpp --- a/libc/test/config/linux/x86_64/syscall_test.cpp +++ b/libc/test/src/__support/OSUtil/linux/x86_64/syscall_test.cpp @@ -6,10 +6,9 @@ // //===----------------------------------------------------------------------===// -#include "config/linux/syscall.h" -#include "utils/UnitTest/Test.h" - #include "src/__support/CPP/Functional.h" +#include "src/__support/OSUtil/syscall.h" +#include "utils/UnitTest/Test.h" TEST(LlvmLibcX86_64_SyscallTest, APITest) { // We only do a signature test here. Actual functionality tests are