[libc-commits] [libc] 8969ae1 - [libc][NFC] Format all CMake files under libc/ (#213132)
via libc-commits
libc-commits at lists.llvm.org
Fri Aug 7 02:07:31 PDT 2026
Author: Jeff Bailey
Date: 2026-08-07T10:07:22+01:00
New Revision: 8969ae16e06587601fb80642a4036592e57c2473
URL: https://github.com/llvm/llvm-project/commit/8969ae16e06587601fb80642a4036592e57c2473
DIFF: https://github.com/llvm/llvm-project/commit/8969ae16e06587601fb80642a4036592e57c2473.diff
LOG: [libc][NFC] Format all CMake files under libc/ (#213132)
Use cmake_format.py from #213102 on all CMakeLists.txt files in libc/
Assisted-by: Automated tooling, human reviewed.
Added:
Modified:
libc/CMakeLists.txt
libc/benchmarks/CMakeLists.txt
libc/benchmarks/gpu/CMakeLists.txt
libc/benchmarks/gpu/src/math/CMakeLists.txt
libc/cmake/caches/armv6m-none-eabi.cmake
libc/cmake/caches/armv7em-none-eabi.cmake
libc/cmake/caches/armv7m-none-eabi.cmake
libc/cmake/caches/armv8.1m.main-none-eabi.cmake
libc/cmake/caches/armv8m.main-none-eabi.cmake
libc/cmake/modules/CheckCompilerFeatures.cmake
libc/cmake/modules/LLVMLibCArchitectures.cmake
libc/cmake/modules/LLVMLibCCheckCpuFeatures.cmake
libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
libc/cmake/modules/LLVMLibCFlagRules.cmake
libc/cmake/modules/LLVMLibCHeaderRules.cmake
libc/cmake/modules/LLVMLibCLibraryRules.cmake
libc/cmake/modules/LLVMLibCObjectRules.cmake
libc/cmake/modules/LLVMLibCTargetNameUtils.cmake
libc/cmake/modules/LLVMLibCTestRules.cmake
libc/cmake/modules/LibcConfig.cmake
libc/cmake/modules/LibcParseArguments.cmake
libc/cmake/modules/prepare_libc_gpu_build.cmake
libc/docs/CMakeLists.txt
libc/examples/examples.cmake
libc/hdr/CMakeLists.txt
libc/hdr/types/CMakeLists.txt
libc/include/CMakeLists.txt
libc/include/llvm-libc-macros/CMakeLists.txt
libc/include/llvm-libc-macros/windows/CMakeLists.txt
libc/include/llvm-libc-types/CMakeLists.txt
libc/lib/CMakeLists.txt
libc/shared/CMakeLists.txt
libc/src/__support/CMakeLists.txt
libc/src/__support/File/CMakeLists.txt
libc/src/__support/HashTable/CMakeLists.txt
libc/src/__support/OSUtil/darwin/CMakeLists.txt
libc/src/__support/math/CMakeLists.txt
libc/src/__support/printf_core/CMakeLists.txt
libc/src/__support/threads/CMakeLists.txt
libc/src/__support/threads/linux/CMakeLists.txt
libc/src/__support/time/CMakeLists.txt
libc/src/__support/wchar/CMakeLists.txt
libc/src/__support/wctype/CMakeLists.txt
libc/src/complex/CMakeLists.txt
libc/src/ctype/CMakeLists.txt
libc/src/dirent/CMakeLists.txt
libc/src/inttypes/CMakeLists.txt
libc/src/math/CMakeLists.txt
libc/src/math/generic/CMakeLists.txt
libc/src/nl_types/CMakeLists.txt
libc/src/setjmp/CMakeLists.txt
libc/src/setjmp/arm/CMakeLists.txt
libc/src/setjmp/riscv/CMakeLists.txt
libc/src/setjmp/x86_64/CMakeLists.txt
libc/src/stdio/CMakeLists.txt
libc/src/stdio/generic/CMakeLists.txt
libc/src/stdio/gpu/CMakeLists.txt
libc/src/stdio/scanf_core/CMakeLists.txt
libc/src/stdlib/CMakeLists.txt
libc/src/string/CMakeLists.txt
libc/src/strings/CMakeLists.txt
libc/src/sys/auxv/linux/CMakeLists.txt
libc/src/sys/mman/CMakeLists.txt
libc/src/sys/sendfile/CMakeLists.txt
libc/src/sys/statvfs/linux/CMakeLists.txt
libc/src/sys/time/CMakeLists.txt
libc/src/sys/time/linux/CMakeLists.txt
libc/src/sys/utsname/linux/CMakeLists.txt
libc/src/termios/CMakeLists.txt
libc/src/threads/CMakeLists.txt
libc/src/time/CMakeLists.txt
libc/src/time/darwin/CMakeLists.txt
libc/src/time/linux/CMakeLists.txt
libc/src/time/windows/CMakeLists.txt
libc/src/ucontext/CMakeLists.txt
libc/src/ucontext/x86_64/CMakeLists.txt
libc/src/unistd/CMakeLists.txt
libc/startup/baremetal/CMakeLists.txt
libc/startup/baremetal/aarch64/CMakeLists.txt
libc/startup/baremetal/arm/CMakeLists.txt
libc/startup/gpu/CMakeLists.txt
libc/startup/linux/CMakeLists.txt
libc/startup/linux/aarch64/CMakeLists.txt
libc/startup/linux/riscv/CMakeLists.txt
libc/startup/linux/x86_64/CMakeLists.txt
libc/startup/uefi/CMakeLists.txt
libc/test/CMakeLists.txt
libc/test/UnitTest/CMakeLists.txt
libc/test/include/CMakeLists.txt
libc/test/integration/scudo/CMakeLists.txt
libc/test/integration/src/__support/threads/CMakeLists.txt
libc/test/integration/startup/CMakeLists.txt
libc/test/integration/startup/gpu/CMakeLists.txt
libc/test/shared/CMakeLists.txt
libc/test/src/CMakeLists.txt
libc/test/src/__support/CMakeLists.txt
libc/test/src/__support/CPP/CMakeLists.txt
libc/test/src/__support/RPC/CMakeLists.txt
libc/test/src/__support/wchar/CMakeLists.txt
libc/test/src/compiler/CMakeLists.txt
libc/test/src/dirent/CMakeLists.txt
libc/test/src/fenv/CMakeLists.txt
libc/test/src/libgen/CMakeLists.txt
libc/test/src/math/CMakeLists.txt
libc/test/src/math/performance_testing/CMakeLists.txt
libc/test/src/math/smoke/CMakeLists.txt
libc/test/src/net/CMakeLists.txt
libc/test/src/stdfix/CMakeLists.txt
libc/test/src/stdio/CMakeLists.txt
libc/test/src/stdlib/CMakeLists.txt
libc/test/src/string/memory_utils/CMakeLists.txt
libc/test/src/sys/ioctl/linux/CMakeLists.txt
libc/test/src/sys/mman/linux/CMakeLists.txt
libc/test/src/sys/prctl/linux/CMakeLists.txt
libc/test/utils/FPUtil/CMakeLists.txt
Removed:
################################################################################
diff --git a/libc/CMakeLists.txt b/libc/CMakeLists.txt
index 7e42ba2a76df2..e37d1a5414516 100644
--- a/libc/CMakeLists.txt
+++ b/libc/CMakeLists.txt
@@ -23,7 +23,7 @@ include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
NO_POLICY_SCOPE)
include(CheckCXXCompilerFlag)
-if (LIBC_CMAKE_VERBOSE_LOGGING)
+if(LIBC_CMAKE_VERBOSE_LOGGING)
get_directory_property(LIBC_OLD_PREPROCESSOR_DEFS COMPILE_DEFINITIONS)
foreach(OLD_DEF ${LIBC_OLD_PREPROCESSOR_DEFS})
message(STATUS "Undefining ${OLD_DEF}")
@@ -38,7 +38,7 @@ set_directory_properties(PROPERTIES
# to set a few preprocessor defines which we do not want.
COMPILE_DEFINITIONS ""
)
-if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+if(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions("-D_DEBUG")
endif()
@@ -111,7 +111,7 @@ if(COMMAND_RETURN_CODE EQUAL 0)
"${COMPILER_RESOURCE_DIR}" CACHE PATH "path to compiler resource dir"
)
message(STATUS "Set COMPILER_RESOURCE_DIR to "
- "${COMPILER_RESOURCE_DIR} using --print-resource-dir")
+ "${COMPILER_RESOURCE_DIR} using --print-resource-dir")
else()
# Try with GCC option: -print-search-dirs, which will output in the form:
# install: <path>
@@ -129,9 +129,9 @@ else()
string(REPLACE "\n" ";" COMPILER_RESOURCE_DIR "${COMPILER_RESOURCE_DIR}")
list(GET COMPILER_RESOURCE_DIR 1 COMPILER_RESOURCE_DIR)
message(STATUS "Set COMPILER_RESOURCE_DIR to "
- "${COMPILER_RESOURCE_DIR} using --print-search-dirs")
-else()
- if (LIBC_TARGET_OS_IS_GPU)
+ "${COMPILER_RESOURCE_DIR} using --print-search-dirs")
+ else()
+ if(LIBC_TARGET_OS_IS_GPU)
message(FATAL_ERROR "COMPILER_RESOURCE_DIR must be set for GPU builds")
else()
set(COMPILER_RESOURCE_DIR OFF)
@@ -202,7 +202,7 @@ endif()
# also set flags to enable or disable wide character support within other
# functions (e.g. printf)." ON)
-#TODO: Add carve-out specific config files to the list here.
+# TODO: Add carve-out specific config files to the list here.
include(LibcConfig)
# Config loading happens in three steps:
@@ -318,7 +318,7 @@ if(LLVM_LIBC_ENABLE_LINTING)
set(LLVM_LIBC_ENABLE_LINTING OFF)
message(WARNING "C++ compiler is not clang++, linting with be disabled.")
else()
- if (NOT LLVM_LIBC_CLANG_TIDY)
+ if(NOT LLVM_LIBC_CLANG_TIDY)
find_program(LLVM_LIBC_CLANG_TIDY NAMES clang-tidy)
endif()
@@ -366,10 +366,10 @@ endif()
option(LLVM_LIBC_INCLUDE_SCUDO "Include the SCUDO standalone as the allocator for LLVM libc" OFF)
if(LLVM_LIBC_INCLUDE_SCUDO)
- if (NOT ("compiler-rt" IN_LIST LLVM_ENABLE_PROJECTS OR "compiler-rt" IN_LIST LLVM_ENABLE_RUNTIMES))
+ if(NOT ("compiler-rt" IN_LIST LLVM_ENABLE_PROJECTS OR "compiler-rt" IN_LIST LLVM_ENABLE_RUNTIMES))
message(FATAL_ERROR "SCUDO cannot be included without adding compiler-rt to LLVM_ENABLE_PROJECTS or LLVM_ENABLE_RUNTIMES")
endif()
- if (DEFINED COMPILER_RT_BUILD_SANITIZERS AND NOT COMPILER_RT_BUILD_SANITIZERS)
+ if(DEFINED COMPILER_RT_BUILD_SANITIZERS AND NOT COMPILER_RT_BUILD_SANITIZERS)
message(FATAL_ERROR "Disabling COMPILER_RT_BUILD_SANITIZERS will produce a libc without malloc/free")
endif()
endif()
@@ -388,21 +388,21 @@ set(TARGET_LLVMLIBC_REMOVED_ENTRYPOINTS "")
# Check entrypoints.txt
if(EXISTS "${LIBC_CONFIG_PATH}/entrypoints.txt")
- include("${LIBC_CONFIG_PATH}/entrypoints.txt")
+ include("${LIBC_CONFIG_PATH}/entrypoints.txt")
else()
message(FATAL_ERROR "${LIBC_CONFIG_PATH}/entrypoints.txt file not found.")
endif()
# Check headers.txt
if(EXISTS "${LIBC_CONFIG_PATH}/headers.txt")
- include("${LIBC_CONFIG_PATH}/headers.txt")
+ include("${LIBC_CONFIG_PATH}/headers.txt")
elseif(LLVM_LIBC_FULL_BUILD)
message(FATAL_ERROR "${LIBC_CONFIG_PATH}/headers.txt file not found and fullbuild requested.")
endif()
# Check exclude.txt that appends to TARGET_LLVMLIBC_REMOVED_ENTRYPOINTS list
if(EXISTS "${LIBC_CONFIG_PATH}/exclude.txt")
- include("${LIBC_CONFIG_PATH}/exclude.txt")
+ include("${LIBC_CONFIG_PATH}/exclude.txt")
endif()
# #TODO: Set up support for premade configs adding their own exclude lists.
@@ -422,7 +422,7 @@ foreach(entrypoint IN LISTS TARGET_LLVMLIBC_ENTRYPOINTS)
string(FIND ${entrypoint} "." last_dot_loc REVERSE)
if(${last_dot_loc} EQUAL -1)
message(FATAL_ERROR "Invalid entrypoint target name ${entrypoint}; Expected"
- " a '.' (dot) in the name.")
+ " a '.' (dot) in the name.")
endif()
math(EXPR name_loc "${last_dot_loc} + 1")
string(SUBSTRING ${entrypoint} ${name_loc} -1 entrypoint_name)
@@ -459,6 +459,6 @@ endif()
add_subdirectory(benchmarks)
-if (LIBC_INCLUDE_DOCS)
+if(LIBC_INCLUDE_DOCS)
add_subdirectory(docs)
endif()
diff --git a/libc/benchmarks/CMakeLists.txt b/libc/benchmarks/CMakeLists.txt
index 795b443de313c..fe49377a01986 100644
--- a/libc/benchmarks/CMakeLists.txt
+++ b/libc/benchmarks/CMakeLists.txt
@@ -20,7 +20,7 @@ if(LIBC_BENCHMARKS_HAS_LLVM_SUPPORT)
set(LLVM_LINK_COMPONENTS
Support
TargetParser
- )
+ )
endif()
#==============================================================================
@@ -52,9 +52,9 @@ function(add_libc_benchmark_unittest target_name)
)
target_link_libraries(${target_name}
PRIVATE
- default_gtest_main
- default_gtest
- ${LIBC_BENCHMARKS_UNITTEST_DEPENDS}
+ default_gtest_main
+ default_gtest
+ ${LIBC_BENCHMARKS_UNITTEST_DEPENDS}
)
llvm_update_compile_flags(${target_name})
@@ -72,35 +72,35 @@ endfunction()
include(ExternalProject)
ExternalProject_Add(google-benchmark-libc
- EXCLUDE_FROM_ALL ON
- PREFIX google-benchmark-libc
- SOURCE_DIR ${LLVM_THIRD_PARTY_DIR}/benchmark
- INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/google-benchmark-libc
- BUILD_BYPRODUCTS
- ${CMAKE_CURRENT_BINARY_DIR}/google-benchmark-libc/lib/libbenchmark.a
- ${CMAKE_CURRENT_BINARY_DIR}/google-benchmark-libc/lib/libbenchmark_main.a
- CMAKE_CACHE_ARGS
- -DBENCHMARK_ENABLE_EXCEPTIONS:BOOL=OFF
- -DBENCHMARK_ENABLE_LTO:BOOL=OFF
- -DBENCHMARK_ENABLE_TESTING:BOOL=OFF
- -DBENCHMARK_ENABLE_WERROR:BOOL=${LLVM_ENABLE_WERROR}
- -DBENCHMARK_FORCE_WERROR:BOOL=OFF
- -DBENCHMARK_USE_LIBCXX:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=Release
-
- -DCMAKE_SYSTEM_NAME:STRING=${CMAKE_SYSTEM_NAME}
- -DCMAKE_SYSTEM_PROCESSOR:STRING=${CMAKE_SYSTEM_PROCESSOR}
- -DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER}
- -DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER}
- -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
- -DCMAKE_FIND_ROOT_PATH:STRING=${CMAKE_FIND_ROOT_PATH}
-
- -DBUILD_SHARED_LIBS:BOOL=OFF
- -DCMAKE_EXE_LINKER_FLAGS:STRING=-static
-
- -DCMAKE_CXX_STANDARD:STRING=14
- -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
- )
+ EXCLUDE_FROM_ALL ON
+ PREFIX google-benchmark-libc
+ SOURCE_DIR ${LLVM_THIRD_PARTY_DIR}/benchmark
+ INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/google-benchmark-libc
+ BUILD_BYPRODUCTS
+ ${CMAKE_CURRENT_BINARY_DIR}/google-benchmark-libc/lib/libbenchmark.a
+ ${CMAKE_CURRENT_BINARY_DIR}/google-benchmark-libc/lib/libbenchmark_main.a
+ CMAKE_CACHE_ARGS
+ -DBENCHMARK_ENABLE_EXCEPTIONS:BOOL=OFF
+ -DBENCHMARK_ENABLE_LTO:BOOL=OFF
+ -DBENCHMARK_ENABLE_TESTING:BOOL=OFF
+ -DBENCHMARK_ENABLE_WERROR:BOOL=${LLVM_ENABLE_WERROR}
+ -DBENCHMARK_FORCE_WERROR:BOOL=OFF
+ -DBENCHMARK_USE_LIBCXX:BOOL=OFF
+ -DCMAKE_BUILD_TYPE:STRING=Release
+
+ -DCMAKE_SYSTEM_NAME:STRING=${CMAKE_SYSTEM_NAME}
+ -DCMAKE_SYSTEM_PROCESSOR:STRING=${CMAKE_SYSTEM_PROCESSOR}
+ -DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER}
+ -DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER}
+ -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
+ -DCMAKE_FIND_ROOT_PATH:STRING=${CMAKE_FIND_ROOT_PATH}
+
+ -DBUILD_SHARED_LIBS:BOOL=OFF
+ -DCMAKE_EXE_LINKER_FLAGS:STRING=-static
+
+ -DCMAKE_CXX_STANDARD:STRING=14
+ -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
+)
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/google-benchmark-libc/include")
@@ -126,23 +126,23 @@ add_custom_target(libc-benchmark-util-tests)
# libc-benchmark
add_library(libc-benchmark
- STATIC
- EXCLUDE_FROM_ALL
+ STATIC
+ EXCLUDE_FROM_ALL
LibcBenchmark.cpp
LibcBenchmark.h
)
target_include_directories(libc-benchmark
- PUBLIC ${LLVM_INCLUDE_DIR} ${LLVM_MAIN_INCLUDE_DIR}
+ PUBLIC ${LLVM_INCLUDE_DIR} ${LLVM_MAIN_INCLUDE_DIR}
)
target_link_libraries(libc-benchmark
- PUBLIC
+ PUBLIC
benchmark::benchmark
Threads::Threads
)
if(LIBC_BENCHMARKS_HAS_LLVM_SUPPORT)
target_link_libraries(libc-benchmark
- PUBLIC
+ PUBLIC
LLVMSupport
LLVMTargetParser
)
@@ -154,14 +154,14 @@ add_dependencies(libc-benchmark google-benchmark-libc)
llvm_update_compile_flags(libc-benchmark)
add_libc_benchmark_unittest(libc-benchmark-test
- SRCS LibcBenchmarkTest.cpp
- DEPENDS libc-benchmark
+ SRCS LibcBenchmarkTest.cpp
+ DEPENDS libc-benchmark
)
# libc-memory-benchmark
add_library(libc-memory-benchmark
- STATIC
- EXCLUDE_FROM_ALL
+ STATIC
+ EXCLUDE_FROM_ALL
LibcMemoryBenchmark.cpp
LibcMemoryBenchmark.h
LibcFunctionPrototypes.h
@@ -169,26 +169,26 @@ add_library(libc-memory-benchmark
MemorySizeDistributions.h
)
target_include_directories(libc-memory-benchmark
- PUBLIC
+ PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${LIBC_SOURCE_DIR}
)
target_link_libraries(libc-memory-benchmark
- PUBLIC
+ PUBLIC
libc-benchmark
)
llvm_update_compile_flags(libc-memory-benchmark)
add_libc_benchmark_unittest(libc-memory-benchmark-test
- SRCS LibcMemoryBenchmarkTest.cpp
- DEPENDS libc-memory-benchmark
+ SRCS LibcMemoryBenchmarkTest.cpp
+ DEPENDS libc-memory-benchmark
)
if(LIBC_BENCHMARKS_HAS_LLVM_SUPPORT)
# json
add_library(json
- STATIC
- EXCLUDE_FROM_ALL
+ STATIC
+ EXCLUDE_FROM_ALL
JSON.cpp
JSON.h
)
@@ -196,8 +196,8 @@ if(LIBC_BENCHMARKS_HAS_LLVM_SUPPORT)
llvm_update_compile_flags(json)
add_libc_benchmark_unittest(json-test
- SRCS JSONTest.cpp
- DEPENDS json
+ SRCS JSONTest.cpp
+ DEPENDS json
)
#==============================================================================
@@ -211,16 +211,16 @@ if(LIBC_BENCHMARKS_HAS_LLVM_SUPPORT)
get_target_property(required_cpu_features ${fq_config_name} REQUIRE_CPU_FEATURES)
cpu_supports(can_run "${required_cpu_features}")
if(can_run)
- set(benchmark_name ${fq_config_name}_benchmark)
- add_executable(${benchmark_name}
- EXCLUDE_FROM_ALL
- LibcMemoryBenchmarkMain.cpp
- )
- get_target_property(entrypoint_object_file ${fq_config_name} "OBJECT_FILE_RAW")
- target_link_libraries(${benchmark_name} PUBLIC json ${entrypoint_object_file})
- string(TOUPPER ${name} name_upper)
- target_compile_definitions(${benchmark_name} PRIVATE "-DLIBC_BENCHMARK_FUNCTION_${name_upper}=LIBC_NAMESPACE::${name}" "-DLIBC_BENCHMARK_FUNCTION_NAME=\"${fq_config_name}\"")
- llvm_update_compile_flags(${benchmark_name})
+ set(benchmark_name ${fq_config_name}_benchmark)
+ add_executable(${benchmark_name}
+ EXCLUDE_FROM_ALL
+ LibcMemoryBenchmarkMain.cpp
+ )
+ get_target_property(entrypoint_object_file ${fq_config_name} "OBJECT_FILE_RAW")
+ target_link_libraries(${benchmark_name} PUBLIC json ${entrypoint_object_file})
+ string(TOUPPER ${name} name_upper)
+ target_compile_definitions(${benchmark_name} PRIVATE "-DLIBC_BENCHMARK_FUNCTION_${name_upper}=LIBC_NAMESPACE::${name}" "-DLIBC_BENCHMARK_FUNCTION_NAME=\"${fq_config_name}\"")
+ llvm_update_compile_flags(${benchmark_name})
else()
message(STATUS "Skipping benchmark for '${fq_config_name}' insufficient host cpu features '${required_cpu_features}'")
endif()
@@ -249,14 +249,14 @@ add_executable(libc.benchmarks.memory_functions.opt_host
)
target_link_libraries(libc.benchmarks.memory_functions.opt_host
PRIVATE
- libc-memory-benchmark
- libc.src.string.memcmp_opt_host.__internal__
- libc.src.string.memcpy_opt_host.__internal__
- libc.src.string.memmove_opt_host.__internal__
- libc.src.string.memset_opt_host.__internal__
- libc.src.strings.bcmp_opt_host.__internal__
- libc.src.strings.bzero_opt_host.__internal__
- benchmark_main
+ libc-memory-benchmark
+ libc.src.string.memcmp_opt_host.__internal__
+ libc.src.string.memcpy_opt_host.__internal__
+ libc.src.string.memmove_opt_host.__internal__
+ libc.src.string.memset_opt_host.__internal__
+ libc.src.strings.bcmp_opt_host.__internal__
+ libc.src.strings.bzero_opt_host.__internal__
+ benchmark_main
)
llvm_update_compile_flags(libc.benchmarks.memory_functions.opt_host)
add_dependencies(libc.benchmarks.memory_functions.opt_host google-benchmark-libc)
@@ -268,15 +268,15 @@ if(LIBC_TYPES_HAS_FLOAT16)
)
target_include_directories(libc.benchmarks.rsqrtf16.opt_host
PRIVATE
- ${LIBC_SOURCE_DIR}
- ${LIBC_INCLUDE_DIR}
+ ${LIBC_SOURCE_DIR}
+ ${LIBC_INCLUDE_DIR}
)
target_link_libraries(libc.benchmarks.rsqrtf16.opt_host
PRIVATE
- benchmark_main
- libc-benchmark
- libc.src.errno.errno.__internal__
- libc.src.__support.math.rsqrtf16
+ benchmark_main
+ libc-benchmark
+ libc.src.errno.errno.__internal__
+ libc.src.__support.math.rsqrtf16
)
llvm_update_compile_flags(libc.benchmarks.rsqrtf16.opt_host)
- endif()
+endif()
diff --git a/libc/benchmarks/gpu/CMakeLists.txt b/libc/benchmarks/gpu/CMakeLists.txt
index 629e51c39dbb3..596f84fb5ec33 100644
--- a/libc/benchmarks/gpu/CMakeLists.txt
+++ b/libc/benchmarks/gpu/CMakeLists.txt
@@ -23,7 +23,7 @@ function(add_benchmark benchmark_name)
DEPENDS
libc.src.stdio.printf
${BENCHMARK_DEPENDS}
- ${BENCHMARK_UNPARSED_ARGUMENTS}
+ ${BENCHMARK_UNPARSED_ARGUMENTS}
COMPILE_OPTIONS
-flto
)
@@ -31,7 +31,7 @@ function(add_benchmark benchmark_name)
set(fq_build_target_name ${fq_target_name}.__build__)
add_dependencies(gpu-benchmark ${fq_target_name})
-endfunction(add_benchmark)
+endfunction()
function(add_benchmark_framework_library name)
cmake_parse_arguments(
@@ -43,7 +43,7 @@ function(add_benchmark_framework_library name)
)
if(NOT TEST_LIB_SRCS)
message(FATAL_ERROR "'add_benchmark_framework_library' requires SRCS; for "
- "header only libraries, use 'add_header_library'")
+ "header only libraries, use 'add_header_library'")
endif()
foreach(lib IN ITEMS ${name}.hermetic)
@@ -51,8 +51,8 @@ function(add_benchmark_framework_library name)
${lib}
STATIC
EXCLUDE_FROM_ALL
- ${TEST_LIB_SRCS}
- ${TEST_LIB_HDRS}
+ ${TEST_LIB_SRCS}
+ ${TEST_LIB_HDRS}
)
target_include_directories(${lib} PRIVATE ${LIBC_SOURCE_DIR})
if(TARGET libc.src.time.clock)
diff --git a/libc/benchmarks/gpu/src/math/CMakeLists.txt b/libc/benchmarks/gpu/src/math/CMakeLists.txt
index 53da45d9eb2ba..c94e44606a85e 100644
--- a/libc/benchmarks/gpu/src/math/CMakeLists.txt
+++ b/libc/benchmarks/gpu/src/math/CMakeLists.txt
@@ -4,7 +4,7 @@ set(math_benchmark_flags "")
if(LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
if(CUDAToolkit_FOUND)
set(libdevice_path ${CUDAToolkit_BIN_DIR}/../nvvm/libdevice/libdevice.10.bc)
- if (EXISTS ${libdevice_path})
+ if(EXISTS ${libdevice_path})
list(APPEND math_benchmark_flags
"SHELL:-Xclang -mlink-builtin-bitcode -Xclang ${libdevice_path}")
# Compile definition needed so the benchmark knows to register
@@ -19,7 +19,7 @@ if(LIBC_TARGET_ARCHITECTURE_IS_AMDGPU)
if(AMDDeviceLibs_FOUND)
get_target_property(ocml_path ocml IMPORTED_LOCATION)
list(APPEND math_benchmark_flags
- "SHELL:-Xclang -mlink-builtin-bitcode -Xclang ${ocml_path}")
+ "SHELL:-Xclang -mlink-builtin-bitcode -Xclang ${ocml_path}")
list(APPEND math_benchmark_flags "-DAMDGPU_MATH_FOUND=1")
endif()
endif()
diff --git a/libc/cmake/caches/armv6m-none-eabi.cmake b/libc/cmake/caches/armv6m-none-eabi.cmake
index d1d614655e557..5d367ff7c28e1 100644
--- a/libc/cmake/caches/armv6m-none-eabi.cmake
+++ b/libc/cmake/caches/armv6m-none-eabi.cmake
@@ -2,7 +2,7 @@ set(CMAKE_SYSTEM_PROCESSOR arm CACHE STRING "")
set(RUNTIMES_TARGET_TRIPLE "armv6m-none-eabi" CACHE STRING "")
foreach(lang C;CXX;ASM)
- set(CMAKE_${lang}_FLAGS "-march=armv6m -mcpu=cortex-m0plus -mfloat-abi=soft -Wno-atomic-alignment" CACHE STRING "")
+ set(CMAKE_${lang}_FLAGS "-march=armv6m -mcpu=cortex-m0plus -mfloat-abi=soft -Wno-atomic-alignment" CACHE STRING "")
endforeach()
include(${CMAKE_CURRENT_LIST_DIR}/baremetal_common.cmake)
diff --git a/libc/cmake/caches/armv7em-none-eabi.cmake b/libc/cmake/caches/armv7em-none-eabi.cmake
index 2b6df8fdf40ab..122ef8204e38b 100644
--- a/libc/cmake/caches/armv7em-none-eabi.cmake
+++ b/libc/cmake/caches/armv7em-none-eabi.cmake
@@ -2,7 +2,7 @@ set(CMAKE_SYSTEM_PROCESSOR arm CACHE STRING "")
set(RUNTIMES_TARGET_TRIPLE "armv7em-none-eabi" CACHE STRING "")
foreach(lang C;CXX;ASM)
- set(CMAKE_${lang}_FLAGS "-march=armv7em -mcpu=cortex-m4 -mfloat-abi=soft -Wno-atomic-alignment" CACHE STRING "")
+ set(CMAKE_${lang}_FLAGS "-march=armv7em -mcpu=cortex-m4 -mfloat-abi=soft -Wno-atomic-alignment" CACHE STRING "")
endforeach()
include(${CMAKE_CURRENT_LIST_DIR}/baremetal_common.cmake)
diff --git a/libc/cmake/caches/armv7m-none-eabi.cmake b/libc/cmake/caches/armv7m-none-eabi.cmake
index fe76828fa529f..ec7c64d5c839c 100644
--- a/libc/cmake/caches/armv7m-none-eabi.cmake
+++ b/libc/cmake/caches/armv7m-none-eabi.cmake
@@ -2,7 +2,7 @@ set(CMAKE_SYSTEM_PROCESSOR arm CACHE STRING "")
set(RUNTIMES_TARGET_TRIPLE "armv7m-none-eabi" CACHE STRING "")
foreach(lang C;CXX;ASM)
- set(CMAKE_${lang}_FLAGS "-march=armv7m -mcpu=cortex-m4 -mfloat-abi=soft -Wno-atomic-alignment" CACHE STRING "")
+ set(CMAKE_${lang}_FLAGS "-march=armv7m -mcpu=cortex-m4 -mfloat-abi=soft -Wno-atomic-alignment" CACHE STRING "")
endforeach()
include(${CMAKE_CURRENT_LIST_DIR}/baremetal_common.cmake)
diff --git a/libc/cmake/caches/armv8.1m.main-none-eabi.cmake b/libc/cmake/caches/armv8.1m.main-none-eabi.cmake
index 4095facce46ac..09e87b6d12553 100644
--- a/libc/cmake/caches/armv8.1m.main-none-eabi.cmake
+++ b/libc/cmake/caches/armv8.1m.main-none-eabi.cmake
@@ -2,7 +2,7 @@ set(CMAKE_SYSTEM_PROCESSOR arm CACHE STRING "")
set(RUNTIMES_TARGET_TRIPLE "armv8.1m.main-none-eabi" CACHE STRING "")
foreach(lang C;CXX;ASM)
- set(CMAKE_${lang}_FLAGS "-mfloat-abi=hard -march=armv8.1-m.main+mve.fp+fp.dp -mcpu=cortex-m55" CACHE STRING "")
+ set(CMAKE_${lang}_FLAGS "-mfloat-abi=hard -march=armv8.1-m.main+mve.fp+fp.dp -mcpu=cortex-m55" CACHE STRING "")
endforeach()
include(${CMAKE_CURRENT_LIST_DIR}/baremetal_common.cmake)
diff --git a/libc/cmake/caches/armv8m.main-none-eabi.cmake b/libc/cmake/caches/armv8m.main-none-eabi.cmake
index 4b69f6a822e71..d46739de0f10c 100644
--- a/libc/cmake/caches/armv8m.main-none-eabi.cmake
+++ b/libc/cmake/caches/armv8m.main-none-eabi.cmake
@@ -2,7 +2,7 @@ set(CMAKE_SYSTEM_PROCESSOR arm CACHE STRING "")
set(RUNTIMES_TARGET_TRIPLE "armv8m.main-none-eabi" CACHE STRING "")
foreach(lang C;CXX;ASM)
- set(CMAKE_${lang}_FLAGS "-mfloat-abi=softfp -march=armv8m.main+fp+dsp -mcpu=cortex-m33" CACHE STRING "")
+ set(CMAKE_${lang}_FLAGS "-mfloat-abi=softfp -march=armv8m.main+fp+dsp -mcpu=cortex-m33" CACHE STRING "")
endforeach()
include(${CMAKE_CURRENT_LIST_DIR}/baremetal_common.cmake)
diff --git a/libc/cmake/modules/CheckCompilerFeatures.cmake b/libc/cmake/modules/CheckCompilerFeatures.cmake
index 5eb083a27e6bf..9fdc878d13ef3 100644
--- a/libc/cmake/modules/CheckCompilerFeatures.cmake
+++ b/libc/cmake/modules/CheckCompilerFeatures.cmake
@@ -68,13 +68,13 @@ foreach(feature IN LISTS ALL_COMPILER_FEATURES)
if(${feature} STREQUAL "fixed_point")
list(APPEND compile_options "-ffixed-point")
elseif(${feature} STREQUAL "stdc_fenv_access")
- if (MSVC)
+ if(MSVC)
list(APPEND compile_options "/WX")
else()
list(APPEND compile_options "-Wall -Werror")
endif()
elseif(${feature} MATCHES "^builtin_" OR
- ${feature} STREQUAL "float16_conversion")
+ ${feature} STREQUAL "float16_conversion")
set(compile_options ${LIBC_COMPILE_OPTIONS_DEFAULT})
set(link_options -nostdlib)
# The compiler might handle calls to math builtins by generating calls to
@@ -164,4 +164,3 @@ check_cxx_compiler_flag("-nostdlibinc" LIBC_CC_SUPPORTS_NOSTDLIBINC)
# clang-all, gcc-8+
check_cxx_compiler_flag("-Wextra-semi" LIBC_CC_SUPPORTS_EXTRA_SEMI)
-
diff --git a/libc/cmake/modules/LLVMLibCArchitectures.cmake b/libc/cmake/modules/LLVMLibCArchitectures.cmake
index e5e75d9b5a090..3149c16f9e2eb 100644
--- a/libc/cmake/modules/LLVMLibCArchitectures.cmake
+++ b/libc/cmake/modules/LLVMLibCArchitectures.cmake
@@ -13,7 +13,7 @@ if(MSVC)
set(LIBC_TARGET_ARCHITECTURE ${CMAKE_HOST_SYSTEM_PROCESSOR})
if(LIBC_TARGET_TRIPLE)
message(WARNING "libc build: Detected MSVC or equivalent compiler; "
- "LIBC_TARGET_TRIPLE is ignored and a host build is assumed.")
+ "LIBC_TARGET_TRIPLE is ignored and a host build is assumed.")
endif()
return()
endif()
@@ -80,21 +80,21 @@ function(get_arch_and_system_from_triple triple arch_var sys_var)
endif()
set(${sys_var} ${target_sys} PARENT_SCOPE)
-endfunction(get_arch_and_system_from_triple)
+endfunction()
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -c -v
- RESULT_VARIABLE libc_compiler_info_result
- OUTPUT_VARIABLE libc_compiler_info
- ERROR_VARIABLE libc_compiler_info)
+ RESULT_VARIABLE libc_compiler_info_result
+ OUTPUT_VARIABLE libc_compiler_info
+ ERROR_VARIABLE libc_compiler_info)
if(NOT (libc_compiler_info_result EQUAL "0"))
message(FATAL_ERROR "libc build: error querying compiler info from the "
- "compiler: ${libc_compiler_info}")
+ "compiler: ${libc_compiler_info}")
endif()
string(REGEX MATCH "Target: [-_a-zA-Z0-9.]+[ \r\n]+"
- libc_compiler_target_info ${libc_compiler_info})
+ libc_compiler_target_info ${libc_compiler_info})
if(NOT libc_compiler_target_info)
message(FATAL_ERROR "libc build: could not read compiler target info from:\n"
- "${libc_compiler_info}")
+ "${libc_compiler_info}")
endif()
string(STRIP ${libc_compiler_target_info} libc_compiler_target_info)
string(SUBSTRING ${libc_compiler_target_info} 8 -1 libc_compiler_triple)
@@ -102,9 +102,9 @@ string(SUBSTRING ${libc_compiler_target_info} 8 -1 libc_compiler_triple)
# One should not set LLVM_RUNTIMES_TARGET and LIBC_TARGET_TRIPLE
if(LLVM_RUNTIMES_TARGET AND LIBC_TARGET_TRIPLE)
message(FATAL_ERROR
- "libc build: Specify only LLVM_DEFAULT_TARGET_TRIPLE if you are doing a "
- "runtimes/bootstrap build. If you are doing a standalone build, "
- "specify only LIBC_TARGET_TRIPLE.")
+ "libc build: Specify only LLVM_DEFAULT_TARGET_TRIPLE if you are doing a "
+ "runtimes/bootstrap build. If you are doing a standalone build, "
+ "specify only LIBC_TARGET_TRIPLE.")
endif()
set(explicit_target_triple)
@@ -124,7 +124,7 @@ if(explicit_target_triple)
get_arch_and_system_from_triple(${explicit_target_triple} libc_arch libc_sys)
if(NOT libc_arch OR NOT libc_sys)
message(FATAL_ERROR
- "libc build: Invalid or unknown triple: ${explicit_target_triple}")
+ "libc build: Invalid or unknown triple: ${explicit_target_triple}")
endif()
set(LIBC_TARGET_ARCHITECTURE ${libc_arch})
set(LIBC_TARGET_OS ${libc_sys})
@@ -136,22 +136,22 @@ if(explicit_target_triple)
set(LIBC_CROSSBUILD TRUE)
if(CMAKE_COMPILER_IS_GNUCXX)
message(FATAL_ERROR
- "GCC target triple (${libc_compiler_triple}) and the explicity "
- "specified target triple (${explicit_target_triple}) do not match.")
+ "GCC target triple (${libc_compiler_triple}) and the explicity "
+ "specified target triple (${explicit_target_triple}) do not match.")
else()
list(APPEND
- LIBC_COMPILE_OPTIONS_DEFAULT "--target=${explicit_target_triple}")
+ LIBC_COMPILE_OPTIONS_DEFAULT "--target=${explicit_target_triple}")
endif()
else()
set(LIBC_CROSSBUILD FALSE)
endif()
else()
get_arch_and_system_from_triple(${libc_compiler_triple}
- compiler_arch compiler_sys)
+ compiler_arch compiler_sys)
if(NOT compiler_arch OR NOT compiler_sys)
message(FATAL_ERROR
- "libc build: Unknown compiler default target triple: "
- "${libc_compiler_triple}")
+ "libc build: Unknown compiler default target triple: "
+ "${libc_compiler_triple}")
endif()
set(LIBC_TARGET_ARCHITECTURE ${compiler_arch})
set(LIBC_TARGET_OS ${compiler_sys})
@@ -192,7 +192,7 @@ elseif(LIBC_TARGET_ARCHITECTURE STREQUAL "power")
set(LIBC_TARGET_ARCHITECTURE_IS_POWERPC TRUE)
else()
message(FATAL_ERROR
- "Unsupported libc target architecture ${LIBC_TARGET_ARCHITECTURE}")
+ "Unsupported libc target architecture ${LIBC_TARGET_ARCHITECTURE}")
endif()
if(LIBC_TARGET_OS STREQUAL "baremetal")
@@ -200,7 +200,7 @@ if(LIBC_TARGET_OS STREQUAL "baremetal")
elseif(LIBC_TARGET_OS STREQUAL "linux")
set(LIBC_TARGET_OS_IS_LINUX TRUE)
elseif(LIBC_TARGET_OS STREQUAL "poky" OR LIBC_TARGET_OS STREQUAL "suse" OR
- LIBC_TARGET_OS STREQUAL "redhat")
+ LIBC_TARGET_OS STREQUAL "redhat")
# poky are custom Linux-base systems created by yocto. Since these are Linux
# images, we change the LIBC_TARGET_OS to linux. This define is used to
# include the right directories during compilation.
@@ -222,7 +222,7 @@ elseif(LIBC_TARGET_OS STREQUAL "uefi")
set(LIBC_TARGET_OS_IS_UEFI TRUE)
else()
message(FATAL_ERROR
- "Unsupported libc target operating system ${LIBC_TARGET_OS}")
+ "Unsupported libc target operating system ${LIBC_TARGET_OS}")
endif()
# If the compiler target triple is not the same as the triple specified by
@@ -230,15 +230,15 @@ endif()
# if the compiler is clang. If the compiler is GCC we just error out as there
# is no equivalent of an option like --target.
if(explicit_target_triple AND
- (NOT (libc_compiler_triple STREQUAL explicit_target_triple)))
+ (NOT (libc_compiler_triple STREQUAL explicit_target_triple)))
set(LIBC_CROSSBUILD TRUE)
if(CMAKE_COMPILER_IS_GNUCXX)
message(FATAL_ERROR
- "GCC target triple (${libc_compiler_triple}) and the explicity "
- "specified target triple (${explicit_target_triple}) do not match.")
+ "GCC target triple (${libc_compiler_triple}) and the explicity "
+ "specified target triple (${explicit_target_triple}) do not match.")
else()
list(APPEND
- LIBC_COMPILE_OPTIONS_DEFAULT "--target=${explicit_target_triple}")
+ LIBC_COMPILE_OPTIONS_DEFAULT "--target=${explicit_target_triple}")
endif()
endif()
@@ -257,10 +257,10 @@ if(LIBC_TARGET_OS_IS_DARWIN)
endif()
# Windows does not support full mode build.
-if (LIBC_TARGET_OS_IS_WINDOWS AND LLVM_LIBC_FULL_BUILD)
+if(LIBC_TARGET_OS_IS_WINDOWS AND LLVM_LIBC_FULL_BUILD)
message(FATAL_ERROR "Windows does not support full mode build.")
-endif ()
+endif()
message(STATUS
- "Building libc for ${LIBC_TARGET_ARCHITECTURE} on ${LIBC_TARGET_OS} with "
- "LIBC_COMPILE_OPTIONS_DEFAULT: ${LIBC_COMPILE_OPTIONS_DEFAULT}")
+ "Building libc for ${LIBC_TARGET_ARCHITECTURE} on ${LIBC_TARGET_OS} with "
+ "LIBC_COMPILE_OPTIONS_DEFAULT: ${LIBC_COMPILE_OPTIONS_DEFAULT}")
diff --git a/libc/cmake/modules/LLVMLibCCheckCpuFeatures.cmake b/libc/cmake/modules/LLVMLibCCheckCpuFeatures.cmake
index 4207c2b6b3cba..05b56d62e6c17 100644
--- a/libc/cmake/modules/LLVMLibCCheckCpuFeatures.cmake
+++ b/libc/cmake/modules/LLVMLibCCheckCpuFeatures.cmake
@@ -28,7 +28,7 @@ endif()
# treats -march=native as a literal string and will silently serve object
# files compiled for a
diff erent CPU model.
set(LIBC_COMPILE_OPTIONS_NATIVE "${_libc_native_default}" CACHE STRING
- "Compile options for host-native builds. Set to empty to disable -march=native.")
+ "Compile options for host-native builds. Set to empty to disable -march=native.")
# Making sure ALL_CPU_FEATURES is sorted.
list(SORT ALL_CPU_FEATURES)
diff --git a/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake b/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
index 4f8f3f5d13b82..94dd69a3c1072 100644
--- a/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
+++ b/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
@@ -64,7 +64,7 @@ function(_get_compile_options_from_flags output_var)
endif()
if(LIBC_COMPILER_HAS_BUILTIN_CEIL_FLOOR_RINT_TRUNC)
list(APPEND compile_options
- "-D__LIBC_USE_BUILTIN_CEIL_FLOOR_RINT_TRUNC")
+ "-D__LIBC_USE_BUILTIN_CEIL_FLOOR_RINT_TRUNC")
endif()
if(LIBC_COMPILER_HAS_BUILTIN_ROUND)
list(APPEND compile_options "-D__LIBC_USE_BUILTIN_ROUND")
@@ -82,9 +82,9 @@ function(_get_compile_options_from_flags output_var)
list(APPEND compile_options "-D__LIBC_USE_BUILTIN_FMAXF16_FMINF16")
endif()
if("FullFP16" IN_LIST LIBC_CPU_FEATURES AND
- CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
list(APPEND compile_options
- "SHELL:-Xclang -target-feature -Xclang +fullfp16")
+ "SHELL:-Xclang -target-feature -Xclang +fullfp16")
endif()
endif()
elseif(MSVC)
@@ -98,7 +98,7 @@ function(_get_compile_options_from_flags output_var)
endif()
set(${output_var} ${compile_options} PARENT_SCOPE)
-endfunction(_get_compile_options_from_flags)
+endfunction()
function(_get_compile_options_from_config output_var)
set(config_options "")
@@ -198,7 +198,7 @@ function(_get_compile_options_from_config output_var)
endif()
set(${output_var} ${config_options} PARENT_SCOPE)
-endfunction(_get_compile_options_from_config)
+endfunction()
function(_get_compile_options_from_arch output_var)
# Set options that are not found in src/__support/macros/properties/architectures.h
@@ -206,18 +206,18 @@ function(_get_compile_options_from_arch output_var)
# TODO: we probably want to unify these at some point for consistency
set(config_options "")
- if (LIBC_TARGET_OS_IS_BAREMETAL)
+ if(LIBC_TARGET_OS_IS_BAREMETAL)
libc_add_definition(config_options "LIBC_TARGET_OS_IS_BAREMETAL")
endif()
- if (LIBC_TARGET_OS_IS_GPU)
+ if(LIBC_TARGET_OS_IS_GPU)
libc_add_definition(config_options "LIBC_TARGET_OS_IS_GPU")
endif()
- if (LIBC_TARGET_OS_IS_UEFI)
+ if(LIBC_TARGET_OS_IS_UEFI)
libc_add_definition(config_options "LIBC_TARGET_OS_IS_UEFI")
endif()
set(${output_var} ${config_options} PARENT_SCOPE)
-endfunction(_get_compile_options_from_arch)
+endfunction()
function(_get_common_compile_options output_var flags)
_get_compile_options_from_flags(compile_flags ${flags})
@@ -244,7 +244,7 @@ function(_get_common_compile_options output_var flags)
endif()
# TODO: We should set this unconditionally on Linux.
if(LIBC_TARGET_OS_IS_LINUX AND
- (LIBC_CC_SUPPORTS_NOSTDLIBINC OR COMPILER_RESOURCE_DIR))
+ (LIBC_CC_SUPPORTS_NOSTDLIBINC OR COMPILER_RESOURCE_DIR))
# We use -idirafter to avoid preempting libc's own headers in case the
# directory (e.g. /usr/include) contains other headers.
foreach(path IN LISTS LIBC_KERNEL_HEADERS)
@@ -270,16 +270,16 @@ function(_get_common_compile_options output_var flags)
list(APPEND compile_options "-fno-unwind-tables")
list(APPEND compile_options "-fno-asynchronous-unwind-tables")
list(APPEND compile_options "-fno-rtti")
- if (LIBC_CC_SUPPORTS_PATTERN_INIT)
+ if(LIBC_CC_SUPPORTS_PATTERN_INIT)
list(APPEND compile_options "-ftrivial-auto-var-init=pattern")
endif()
- if (LIBC_CONF_KEEP_FRAME_POINTER)
+ if(LIBC_CONF_KEEP_FRAME_POINTER)
list(APPEND compile_options "-fno-omit-frame-pointer")
- if (LIBC_TARGET_ARCHITECTURE_IS_X86_64)
+ if(LIBC_TARGET_ARCHITECTURE_IS_X86_64)
list(APPEND compile_options "-mno-omit-leaf-frame-pointer")
endif()
endif()
- if (LIBC_CONF_ENABLE_STRONG_STACK_PROTECTOR)
+ if(LIBC_CONF_ENABLE_STRONG_STACK_PROTECTOR)
list(APPEND compile_options "-fstack-protector-strong")
endif()
list(APPEND compile_options "-Wall")
@@ -330,7 +330,7 @@ function(_get_common_compile_options output_var flags)
list(APPEND compile_options "/EHs-c-")
list(APPEND compile_options "/GR-")
endif()
- if (LIBC_TARGET_OS_IS_GPU)
+ if(LIBC_TARGET_OS_IS_GPU)
list(APPEND compile_options "-nogpulib")
list(APPEND compile_options "-fvisibility=hidden")
list(APPEND compile_options "-fconvergent-functions")
diff --git a/libc/cmake/modules/LLVMLibCFlagRules.cmake b/libc/cmake/modules/LLVMLibCFlagRules.cmake
index 70a3f9b64483e..23fc9215d13c9 100644
--- a/libc/cmake/modules/LLVMLibCFlagRules.cmake
+++ b/libc/cmake/modules/LLVMLibCFlagRules.cmake
@@ -39,7 +39,7 @@ function(extract_flag_modifier input_flag output_flag modifier)
set(${output_flag} ${input_flag} PARENT_SCOPE)
set(${modifier} "" PARENT_SCOPE)
endif()
-endfunction(extract_flag_modifier)
+endfunction()
function(remove_duplicated_flags input_flags output_flags)
set(out_flags "")
@@ -72,7 +72,7 @@ function(remove_duplicated_flags input_flags output_flags)
endforeach()
set(${output_flags} "${out_flags}" PARENT_SCOPE)
-endfunction(remove_duplicated_flags)
+endfunction()
# Collect flags from dependency list. To see which flags come with each
# dependence, pass `SHOW_INTERMEDIATE_OBJECTS=DEPS` to cmake.
@@ -100,12 +100,12 @@ function(get_flags_from_dep_list output_list)
list(APPEND flag_list ${flag})
endif()
endforeach()
- endforeach(dep)
+ endforeach()
list(REMOVE_DUPLICATES flag_list)
set(${output_list} ${flag_list} PARENT_SCOPE)
-endfunction(get_flags_from_dep_list)
+endfunction()
# Given a `flag` without modifier, scan through the list of dependency, append
# `.__NO_flag` to any target that has `flag` in its FLAGS property.
@@ -125,9 +125,9 @@ function(get_fq_dep_list_without_flag output_list flag)
else()
list(APPEND fq_dep_no_flag_list ${fq_dep_name})
endif()
- endforeach(dep)
+ endforeach()
set(${output_list} ${fq_dep_no_flag_list} PARENT_SCOPE)
-endfunction(get_fq_dep_list_without_flag)
+endfunction()
# Check if a `flag` is set
function(check_flag result flag_name)
@@ -140,7 +140,7 @@ function(check_flag result flag_name)
else()
set(${result} FALSE PARENT_SCOPE)
endif()
-endfunction(check_flag)
+endfunction()
# Generate all flags' combinations and call the corresponding function provided
# by `CREATE_TARGET` to create a target for each combination.
@@ -203,7 +203,7 @@ function(expand_flags_for_target target_name flags)
CREATE_TARGET ${EXPAND_FLAGS_CREATE_TARGET}
${EXPAND_FLAGS_UNPARSED_ARGUMENTS}
)
-endfunction(expand_flags_for_target)
+endfunction()
# Collect all flags from a target's dependency, and then forward to
# `expand_flags_for_target to generate all flags' combinations and call
@@ -224,7 +224,7 @@ function(add_target_with_flags target_name)
if(NOT ADD_TO_EXPAND_CREATE_TARGET)
message(FATAL_ERROR "Missing function to create targets. Please specify "
- "`CREATE_TARGET <function>`")
+ "`CREATE_TARGET <function>`")
endif()
get_fq_target_name(${target_name} fq_target_name)
@@ -251,7 +251,7 @@ function(add_target_with_flags target_name)
if("${modifier}" STREQUAL "ONLY" AND SKIP_FLAG_EXPANSION_${flag})
if(SHOW_INTERMEDIATE_OBJECTS)
message(STATUS "Not generating ${fq_target_name} since "
- "${flag} is not available on the host.")
+ "${flag} is not available on the host.")
endif()
return()
endif()
@@ -272,7 +272,7 @@ function(add_target_with_flags target_name)
CREATE_TARGET ${ADD_TO_EXPAND_CREATE_TARGET}
${ADD_TO_EXPAND_UNPARSED_ARGUMENTS}
)
-endfunction(add_target_with_flags)
+endfunction()
# Special flags
set(FMA_OPT_FLAG "FMA_OPT")
@@ -286,7 +286,7 @@ set(MISC_MATH_BASIC_OPS_OPT_FLAG "MISC_MATH_BASIC_OPS_OPT")
# Skip FMA_OPT flag for targets that don't support fma.
if(NOT DEFINED SKIP_FLAG_EXPANSION_FMA_OPT)
if(NOT((LIBC_TARGET_ARCHITECTURE_IS_X86_64 AND (LIBC_CPU_FEATURES MATCHES "FMA")) OR
- LIBC_TARGET_ARCHITECTURE_IS_ANY_RISCV))
+ LIBC_TARGET_ARCHITECTURE_IS_ANY_RISCV))
set(SKIP_FLAG_EXPANSION_FMA_OPT TRUE)
endif()
endif()
@@ -304,7 +304,7 @@ endif()
# SSE4.2 support.
if(NOT DEFINED SKIP_FLAG_EXPANSION_ROUND_OPT)
if(NOT((LIBC_TARGET_ARCHITECTURE_IS_X86_64 AND (LIBC_CPU_FEATURES MATCHES "SSE4_2")) OR
- LIBC_TARGET_ARCHITECTURE_IS_AARCH64 OR LIBC_TARGET_OS_IS_GPU))
+ LIBC_TARGET_ARCHITECTURE_IS_AARCH64 OR LIBC_TARGET_OS_IS_GPU))
set(SKIP_FLAG_EXPANSION_ROUND_OPT TRUE)
endif()
endif()
diff --git a/libc/cmake/modules/LLVMLibCHeaderRules.cmake b/libc/cmake/modules/LLVMLibCHeaderRules.cmake
index 88e183d8f4ec4..9e3845da27fa9 100644
--- a/libc/cmake/modules/LLVMLibCHeaderRules.cmake
+++ b/libc/cmake/modules/LLVMLibCHeaderRules.cmake
@@ -9,7 +9,7 @@
function(add_header target_name)
cmake_parse_arguments(
"ADD_HEADER"
- "" # No optional arguments
+ "" # No optional arguments
"HDR;DEST_HDR" # Single value arguments
"DEPENDS"
${ARGN}
@@ -70,14 +70,14 @@ function(add_header target_name)
HEADER_FILE_PATH ${dest_file}
DEPS "${fq_deps_list}"
)
-endfunction(add_header)
+endfunction()
function(add_gen_header target_name)
cmake_parse_arguments(
"ADD_GEN_HDR"
"PROXY;PUBLIC" # No optional arguments
"YAML_FILE;GEN_HDR" # Single value arguments
- "DEPENDS" # Multi value arguments
+ "DEPENDS" # Multi value arguments
${ARGN}
)
get_fq_target_name(${target_name} fq_target_name)
@@ -95,12 +95,12 @@ function(add_gen_header target_name)
set(absolute_path ${CMAKE_CURRENT_SOURCE_DIR}/${ADD_GEN_HDR_GEN_HDR})
file(RELATIVE_PATH relative_path ${LIBC_INCLUDE_SOURCE_DIR} ${absolute_path})
set(out_file ${LIBC_INCLUDE_DIR}/${relative_path})
- if (ADD_GEN_HDR_PROXY)
+ if(ADD_GEN_HDR_PROXY)
set(proxy_arg "--proxy")
endif()
set(dep_file "${out_file}.d")
set(yaml_file ${CMAKE_SOURCE_DIR}/${ADD_GEN_HDR_YAML_FILE})
-
+
if(LLVM_LIBC_ALL_HEADERS)
set(entry_points "")
else()
@@ -116,12 +116,12 @@ function(add_gen_header target_name)
OUTPUT ${out_file}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMAND ${Python3_EXECUTABLE} "${LIBC_SOURCE_DIR}/utils/hdrgen/main.py"
- --output ${out_file}
- --depfile ${dep_file}
- --write-if-changed
- ${proxy_arg}
- ${yaml_file}
- "@${rsp_file}"
+ --output ${out_file}
+ --depfile ${dep_file}
+ --write-if-changed
+ ${proxy_arg}
+ ${yaml_file}
+ "@${rsp_file}"
DEPENDS ${yaml_file} ${rsp_file}
DEPFILE ${dep_file}
COMMENT "Generating header ${ADD_GEN_HDR_GEN_HDR} from ${yaml_file}"
@@ -162,4 +162,4 @@ function(add_gen_header target_name)
)
-endfunction(add_gen_header)
+endfunction()
diff --git a/libc/cmake/modules/LLVMLibCLibraryRules.cmake b/libc/cmake/modules/LLVMLibCLibraryRules.cmake
index a90877dfb2746..62f24b5736be8 100644
--- a/libc/cmake/modules/LLVMLibCLibraryRules.cmake
+++ b/libc/cmake/modules/LLVMLibCLibraryRules.cmake
@@ -13,7 +13,7 @@ function(collect_object_file_deps target result)
foreach(dep IN LISTS deps)
collect_object_file_deps(${dep} dep_targets)
list(APPEND all_deps ${dep_targets})
- endforeach(dep)
+ endforeach()
list(REMOVE_DUPLICATES all_deps)
set(${result} ${all_deps} PARENT_SCOPE)
return()
@@ -26,7 +26,7 @@ function(collect_object_file_deps target result)
get_target_property(aliasee ${entrypoint_target} "DEPS")
if(NOT aliasee)
message(FATAL_ERROR
- "Entrypoint alias ${entrypoint_target} does not have an aliasee.")
+ "Entrypoint alias ${entrypoint_target} does not have an aliasee.")
endif()
set(entrypoint_target ${aliasee})
endif()
@@ -34,7 +34,7 @@ function(collect_object_file_deps target result)
foreach(dep IN LISTS deps)
collect_object_file_deps(${dep} dep_targets)
list(APPEND all_deps ${dep_targets})
- endforeach(dep)
+ endforeach()
list(REMOVE_DUPLICATES all_deps)
set(${result} ${all_deps} PARENT_SCOPE)
return()
@@ -47,16 +47,16 @@ function(collect_object_file_deps target result)
set(${result} ${deps} PARENT_SCOPE)
return()
endif()
-endfunction(collect_object_file_deps)
+endfunction()
function(get_all_object_file_deps result fq_deps_list)
set(all_deps "")
foreach(dep ${fq_deps_list})
get_target_property(dep_type ${dep} "TARGET_TYPE")
if(NOT ((${dep_type} STREQUAL ${ENTRYPOINT_OBJ_TARGET_TYPE}) OR
- (${dep_type} STREQUAL ${ENTRYPOINT_EXT_TARGET_TYPE})))
+ (${dep_type} STREQUAL ${ENTRYPOINT_EXT_TARGET_TYPE})))
message(FATAL_ERROR "Dependency '${dep}' of 'add_entrypoint_collection' is "
- "not an 'add_entrypoint_object' or 'add_entrypoint_external' target.")
+ "not an 'add_entrypoint_object' or 'add_entrypoint_external' target.")
endif()
collect_object_file_deps(${dep} recursive_deps)
list(APPEND all_deps ${recursive_deps})
@@ -69,13 +69,13 @@ function(get_all_object_file_deps result fq_deps_list)
get_target_property(aliasee ${entrypoint_target} "DEPS")
if(NOT aliasee)
message(FATAL_ERROR
- "Entrypoint alias ${entrypoint_target} does not have an aliasee.")
+ "Entrypoint alias ${entrypoint_target} does not have an aliasee.")
endif()
set(entrypoint_target ${aliasee})
endif()
endif()
list(APPEND all_deps ${entrypoint_target})
- endforeach(dep)
+ endforeach()
list(REMOVE_DUPLICATES all_deps)
set(${result} ${all_deps} PARENT_SCOPE)
endfunction()
@@ -106,7 +106,7 @@ function(llvm_link_bitcode target_name)
)
add_custom_target(${target_name} ALL DEPENDS ${ARG_OUTPUT})
set_target_properties(${target_name} PROPERTIES TARGET_FILE ${ARG_OUTPUT})
-endfunction(llvm_link_bitcode)
+endfunction()
# A rule to build a library from a collection of entrypoint objects and bundle
# it in a single LLVM IR module.
@@ -122,7 +122,7 @@ function(add_bitcode_entrypoint_library target_name base_target_name)
INPUTS $<TARGET_FILE:${base_target_name}>
DEPENDS ${base_target_name}
)
-endfunction(add_bitcode_entrypoint_library)
+endfunction()
# A rule to build a library from a collection of entrypoint objects.
# Usage:
@@ -143,7 +143,7 @@ function(add_entrypoint_library target_name)
)
if(NOT ENTRYPOINT_LIBRARY_DEPENDS)
message(FATAL_ERROR "'add_entrypoint_library' target requires a DEPENDS list "
- "of 'add_entrypoint_object' targets.")
+ "of 'add_entrypoint_object' targets.")
endif()
get_fq_deps_list(fq_deps_list ${ENTRYPOINT_LIBRARY_DEPENDS})
@@ -152,15 +152,15 @@ function(add_entrypoint_library target_name)
set(objects "")
foreach(dep IN LISTS all_deps)
list(APPEND objects $<$<STREQUAL:$<TARGET_NAME_IF_EXISTS:${dep}>,${dep}>:$<TARGET_OBJECTS:${dep}>>)
- endforeach(dep)
+ endforeach()
add_library(
${target_name}
STATIC
- ${objects}
+ ${objects}
)
set_target_properties(${target_name} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${LIBC_LIBRARY_DIR})
-endfunction(add_entrypoint_library)
+endfunction()
set(HDR_LIBRARY_TARGET_TYPE "HDR_LIBRARY")
@@ -196,7 +196,7 @@ function(create_header_library fq_target_name)
# location, not to be linked against.
set(link_lib "")
foreach(dep ${ADD_HEADER_DEPENDS})
- if (NOT dep MATCHES "__copied_hdr__")
+ if(NOT dep MATCHES "__copied_hdr__")
list(APPEND link_lib ${dep})
endif()
endforeach()
@@ -214,7 +214,7 @@ function(create_header_library fq_target_name)
DEPS "${ADD_HEADER_DEPENDS}"
FLAGS "${ADD_HEADER_FLAGS}"
)
-endfunction(create_header_library)
+endfunction()
# Rule to add header only libraries.
# Usage
@@ -231,4 +231,4 @@ function(add_header_library target_name)
CREATE_TARGET create_header_library
${ARGN}
)
-endfunction(add_header_library)
+endfunction()
diff --git a/libc/cmake/modules/LLVMLibCObjectRules.cmake b/libc/cmake/modules/LLVMLibCObjectRules.cmake
index c90feff035c60..d05e3f183bcdb 100644
--- a/libc/cmake/modules/LLVMLibCObjectRules.cmake
+++ b/libc/cmake/modules/LLVMLibCObjectRules.cmake
@@ -8,7 +8,7 @@ function(check_entrypoint_deps entrypoint_deps)
set(fq_deps_list "")
list(APPEND fq_deps_list ${ARGN})
- #don't warn for deps that are allowed, such as errno
+ # don't warn for deps that are allowed, such as errno
set(ALLOWED_DEPS
"libc.src.errno.errno"
"libc.src.setjmp.longjmp"
@@ -54,17 +54,17 @@ function(create_object_library fq_target_name)
if(ADD_OBJECT_ALIAS)
if(ADD_OBJECT_SRCS OR ADD_OBJECT_HDRS)
message(FATAL_ERROR
- "${fq_target_name}: object library alias cannot have SRCS and/or HDRS.")
+ "${fq_target_name}: object library alias cannot have SRCS and/or HDRS.")
endif()
list(LENGTH fq_deps_list depends_size)
if(NOT ${depends_size} EQUAL 1)
message(FATAL_ERROR
- "${fq_targe_name}: object library alias should have exactly one DEPENDS.")
+ "${fq_targe_name}: object library alias should have exactly one DEPENDS.")
endif()
add_library(
${fq_target_name}
ALIAS
- ${fq_deps_list}
+ ${fq_deps_list}
)
return()
endif()
@@ -87,15 +87,15 @@ function(create_object_library fq_target_name)
${fq_target_name}
EXCLUDE_FROM_ALL
OBJECT
- ${ADD_OBJECT_SRCS}
- ${ADD_OBJECT_HDRS}
+ ${ADD_OBJECT_SRCS}
+ ${ADD_OBJECT_HDRS}
)
target_include_directories(${fq_target_name} SYSTEM PRIVATE ${LIBC_INCLUDE_DIR})
target_include_directories(${fq_target_name} PRIVATE ${LIBC_SOURCE_DIR})
target_include_directories(${fq_target_name} PRIVATE ${LIBC_BUILD_DIR})
target_compile_options(${fq_target_name} PRIVATE ${compile_options})
- #loop through the deps, check if any have the TARGET_TYPE of ENTRYPOINT_OBJ_TARGET_TYPE, and print a warning if they do.
+ # loop through the deps, check if any have the TARGET_TYPE of ENTRYPOINT_OBJ_TARGET_TYPE, and print a warning if they do.
if(LIBC_CMAKE_VERBOSE_LOGGING)
set(entrypoint_deps "")
if(NOT "${fq_deps_list}" STREQUAL "")
@@ -143,14 +143,14 @@ function(create_object_library fq_target_name)
PROPERTIES
OBJECT_FILES "$<TARGET_OBJECTS:${target_objects}>"
)
-endfunction(create_object_library)
+endfunction()
function(add_object_library target_name)
add_target_with_flags(
${target_name}
CREATE_TARGET create_object_library
${ARGN})
-endfunction(add_object_library)
+endfunction()
# A rule for entrypoint object targets.
@@ -171,7 +171,7 @@ function(create_entrypoint_object fq_target_name)
"ADD_ENTRYPOINT_OBJ"
"ALIAS;REDIRECTED" # Optional argument
"NAME;CXX_STANDARD" # Single value arguments
- "SRCS;HDRS;DEPENDS;COMPILE_OPTIONS;FLAGS" # Multi value arguments
+ "SRCS;HDRS;DEPENDS;COMPILE_OPTIONS;FLAGS" # Multi value arguments
${ARGN}
)
@@ -209,12 +209,12 @@ function(create_entrypoint_object fq_target_name)
if(SHOW_INTERMEDIATE_OBJECTS)
message(STATUS "Adding entrypoint object ${fq_target_name} as an alias of"
- " ${fq_dep_name}")
+ " ${fq_dep_name}")
endif()
if(NOT TARGET ${fq_dep_name})
message(WARNING "Aliasee ${fq_dep_name} for entrypoint alias ${target_name} missing; "
- "Target ${target_name} will be ignored.")
+ "Target ${target_name} will be ignored.")
return()
endif()
@@ -234,7 +234,7 @@ function(create_entrypoint_object fq_target_name)
${internal_target_name}
EXCLUDE_FROM_ALL
OBJECT
- ${object_file_raw}
+ ${object_file_raw}
)
endif()
@@ -243,7 +243,7 @@ function(create_entrypoint_object fq_target_name)
${fq_target_name}
EXCLUDE_FROM_ALL
OBJECT
- ${object_file}
+ ${object_file}
)
add_dependencies(${fq_target_name} ${fq_dep_name} ${internal_target_name})
set_target_properties(
@@ -271,7 +271,7 @@ function(create_entrypoint_object fq_target_name)
list(APPEND common_compile_options ${ADD_ENTRYPOINT_OBJ_COMPILE_OPTIONS})
get_fq_deps_list(fq_deps_list ${ADD_ENTRYPOINT_OBJ_DEPENDS})
- #loop through the deps, check if any have the TARGET_TYPE of entrypoint_target_type, and print a warning if they do.
+ # loop through the deps, check if any have the TARGET_TYPE of entrypoint_target_type, and print a warning if they do.
if(LIBC_CMAKE_VERBOSE_LOGGING)
set(entrypoint_deps "")
if(NOT "${fq_deps_list}" STREQUAL "")
@@ -300,8 +300,8 @@ function(create_entrypoint_object fq_target_name)
# A future change should switch this to a normal static library.
EXCLUDE_FROM_ALL
OBJECT
- ${ADD_ENTRYPOINT_OBJ_SRCS}
- ${ADD_ENTRYPOINT_OBJ_HDRS}
+ ${ADD_ENTRYPOINT_OBJ_SRCS}
+ ${ADD_ENTRYPOINT_OBJ_HDRS}
)
target_compile_options(${internal_target_name} BEFORE PRIVATE ${common_compile_options})
target_include_directories(${internal_target_name} SYSTEM PRIVATE ${LIBC_INCLUDE_DIR})
@@ -315,8 +315,8 @@ function(create_entrypoint_object fq_target_name)
# an archive (like libc.a).
EXCLUDE_FROM_ALL
OBJECT
- ${ADD_ENTRYPOINT_OBJ_SRCS}
- ${ADD_ENTRYPOINT_OBJ_HDRS}
+ ${ADD_ENTRYPOINT_OBJ_SRCS}
+ ${ADD_ENTRYPOINT_OBJ_HDRS}
)
target_compile_options(${fq_target_name} BEFORE PRIVATE ${common_compile_options} -DLIBC_COPT_PUBLIC_PACKAGING)
target_include_directories(${fq_target_name} SYSTEM PRIVATE ${LIBC_INCLUDE_DIR})
@@ -329,7 +329,7 @@ function(create_entrypoint_object fq_target_name)
# known problematic ones on the entrypoints that implement them.
if(LIBC_TARGET_OS_IS_GPU)
set(libc_builtins bcmp strlen memmem bzero memcmp memcpy memmem memmove
- memset strcmp strstr)
+ memset strcmp strstr)
if(${ADD_ENTRYPOINT_OBJ_NAME} IN_LIST libc_builtins)
target_compile_options(${fq_target_name} PRIVATE -fno-builtin-${ADD_ENTRYPOINT_OBJ_NAME})
endif()
@@ -365,7 +365,7 @@ function(create_entrypoint_object fq_target_name)
if(LLVM_LIBC_ENABLE_LINTING AND TARGET ${internal_target_name})
if(NOT LLVM_LIBC_CLANG_TIDY)
message(FATAL_ERROR "Something is wrong! LLVM_LIBC_ENABLE_LINTING is "
- "ON but LLVM_LIBC_CLANG_TIDY is not set.")
+ "ON but LLVM_LIBC_CLANG_TIDY is not set.")
endif()
# We only want a second invocation of clang-tidy to run
@@ -400,13 +400,13 @@ function(create_entrypoint_object fq_target_name)
# Until this is fixed upstream, we use -fno-caret-diagnostics to surpress
# these.
COMMAND ${LLVM_LIBC_CLANG_TIDY}
- "--extra-arg=-fno-caret-diagnostics" --quiet
- # Path to directory containing compile_commands.json
- -p ${PROJECT_BINARY_DIR}
- ${ADD_ENTRYPOINT_OBJ_SRCS}
- # See above: this might be a second invocation of clang-tidy depending on
- # the conditions above.
- ${restrict_system_headers_check_invocation}
+ "--extra-arg=-fno-caret-diagnostics" --quiet
+ # Path to directory containing compile_commands.json
+ -p ${PROJECT_BINARY_DIR}
+ ${ADD_ENTRYPOINT_OBJ_SRCS}
+ # See above: this might be a second invocation of clang-tidy depending on
+ # the conditions above.
+ ${restrict_system_headers_check_invocation}
# We have two options for running commands, add_custom_command and
# add_custom_target. We don't want to run the linter unless source files
# have changed. add_custom_target explicitly runs everytime therefore we
@@ -420,7 +420,7 @@ function(create_entrypoint_object fq_target_name)
add_dependencies(libc-lint ${fq_target_name}.__lint__)
endif()
-endfunction(create_entrypoint_object)
+endfunction()
function(add_entrypoint_object target_name)
cmake_parse_arguments(
@@ -441,7 +441,7 @@ function(add_entrypoint_object target_name)
CREATE_TARGET create_entrypoint_object
${ADD_ENTRYPOINT_OBJ_UNPARSED_ARGUMENTS}
)
-endfunction(add_entrypoint_object)
+endfunction()
# A rule for external entrypoint targets.
# Usage:
@@ -454,7 +454,7 @@ function(add_entrypoint_external target_name)
"ADD_ENTRYPOINT_EXT"
"" # No optional arguments
"" # No single value arguments
- "DEPENDS" # Multi value arguments
+ "DEPENDS" # Multi value arguments
${ARGN}
)
get_fq_target_name(${target_name} fq_target_name)
@@ -469,7 +469,7 @@ function(add_entrypoint_external target_name)
"DEPS" "${ADD_ENTRYPOINT_EXT_DEPENDS}"
)
-endfunction(add_entrypoint_external)
+endfunction()
# Helper to define a function with multiple implementations
# - Computes flags to satisfy required/rejected features and arch,
diff --git a/libc/cmake/modules/LLVMLibCTargetNameUtils.cmake b/libc/cmake/modules/LLVMLibCTargetNameUtils.cmake
index 4fbc06b4e8584..90dee905e3104 100644
--- a/libc/cmake/modules/LLVMLibCTargetNameUtils.cmake
+++ b/libc/cmake/modules/LLVMLibCTargetNameUtils.cmake
@@ -2,13 +2,13 @@ function(get_fq_target_name local_name target_name_var)
file(RELATIVE_PATH rel_path ${LIBC_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
string(REPLACE "/" "." fq_name "libc.${rel_path}.${local_name}")
set(${target_name_var} ${fq_name} PARENT_SCOPE)
-endfunction(get_fq_target_name)
+endfunction()
function(is_relative_target_name target_name output_var)
string(FIND ${target_name} "." dot_loc)
string(COMPARE EQUAL "0" ${dot_loc} is_relative)
set(${output_var} ${is_relative} PARENT_SCOPE)
-endfunction(is_relative_target_name)
+endfunction()
function(get_fq_dep_name fq_name name)
is_relative_target_name(${name} "is_relative")
@@ -20,13 +20,13 @@ function(get_fq_dep_name fq_name name)
else()
set(${fq_name} ${name} PARENT_SCOPE)
endif()
-endfunction(get_fq_dep_name)
+endfunction()
function(get_fq_deps_list output_list)
set(fq_dep_name_list "")
foreach(dep IN LISTS ARGN)
get_fq_dep_name(fq_dep_name ${dep})
list(APPEND fq_dep_name_list ${fq_dep_name})
- endforeach(dep)
+ endforeach()
set(${output_list} ${fq_dep_name_list} PARENT_SCOPE)
-endfunction(get_fq_deps_list)
+endfunction()
diff --git a/libc/cmake/modules/LLVMLibCTestRules.cmake b/libc/cmake/modules/LLVMLibCTestRules.cmake
index b19cdbdae170e..231e7b444bfda 100644
--- a/libc/cmake/modules/LLVMLibCTestRules.cmake
+++ b/libc/cmake/modules/LLVMLibCTestRules.cmake
@@ -11,7 +11,7 @@ function(_get_common_test_compile_options output_var c_test flags)
# Death test executor is only available in Linux for now.
if(NOT ${LIBC_TARGET_OS} STREQUAL "linux")
- if (MSVC)
+ if(MSVC)
list(REMOVE_ITEM config_flags "/DLIBC_ADD_NULL_CHECKS")
else()
list(REMOVE_ITEM config_flags "-DLIBC_ADD_NULL_CHECKS")
@@ -19,16 +19,16 @@ function(_get_common_test_compile_options output_var c_test flags)
endif()
set(compile_options
- ${LIBC_COMPILE_OPTIONS_DEFAULT}
- ${LIBC_TEST_COMPILE_OPTIONS_DEFAULT}
- ${compile_flags}
- ${config_flags}
- ${arch_flags})
+ ${LIBC_COMPILE_OPTIONS_DEFAULT}
+ ${LIBC_TEST_COMPILE_OPTIONS_DEFAULT}
+ ${compile_flags}
+ ${config_flags}
+ ${arch_flags})
libc_add_definition(compile_options
- "LIBC_TEST_FLOAT_RANGE_COUNT=${LIBC_TEST_FLOAT_RANGE_COUNT}")
+ "LIBC_TEST_FLOAT_RANGE_COUNT=${LIBC_TEST_FLOAT_RANGE_COUNT}")
libc_add_definition(compile_options
- "LIBC_TEST_SUBPROCESS_TESTS=${LIBC_TEST_SUBPROCESS_TESTS}")
+ "LIBC_TEST_SUBPROCESS_TESTS=${LIBC_TEST_SUBPROCESS_TESTS}")
if(LIBC_TEST_SUBPROCESS_TESTS)
# EXPECT_DEATH and ASSERT_DEATH might be quite slow. LIBC_TEST_SKIP_DEATH_TESTS
@@ -68,7 +68,7 @@ function(_get_common_test_compile_options output_var c_test flags)
list(APPEND compile_options "-Wextra")
# -DLIBC_WNO_ERROR=ON if you can't build cleanly with -Werror.
if(NOT LIBC_WNO_ERROR)
- # list(APPEND compile_options "-Werror")
+ # list(APPEND compile_options "-Werror")
endif()
if(NOT (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "13.0.0"))
list(APPEND compile_options "-Wconversion")
@@ -121,12 +121,12 @@ function(_get_hermetic_test_compile_options output_var c_test flags)
# The GPU build requires overriding the default CMake triple and architecture.
if(LIBC_TARGET_ARCHITECTURE_IS_AMDGPU)
list(APPEND compile_options
- -Wno-multi-gpu -nogpulib -mcpu=${LIBC_GPU_TARGET_ARCHITECTURE} -flto
- -mcode-object-version=${LIBC_GPU_CODE_OBJECT_VERSION})
+ -Wno-multi-gpu -nogpulib -mcpu=${LIBC_GPU_TARGET_ARCHITECTURE} -flto
+ -mcode-object-version=${LIBC_GPU_CODE_OBJECT_VERSION})
elseif(LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
list(APPEND compile_options
- -Wno-multi-gpu --cuda-path=${LIBC_CUDA_ROOT}
- -nogpulib -march=${LIBC_GPU_TARGET_ARCHITECTURE} -fno-use-cxa-atexit)
+ -Wno-multi-gpu --cuda-path=${LIBC_CUDA_ROOT}
+ -nogpulib -march=${LIBC_GPU_TARGET_ARCHITECTURE} -fno-use-cxa-atexit)
endif()
set(${output_var} ${compile_options} PARENT_SCOPE)
@@ -154,11 +154,11 @@ function(get_object_files_for_test result skipped_entrypoints_list)
list(REMOVE_DUPLICATES unchecked_list)
foreach(dep IN LISTS unchecked_list)
- if (NOT TARGET ${dep})
+ if(NOT TARGET ${dep})
# Skip tests with undefined dependencies.
# Compiler-RT targets are added only if they are enabled. However, such targets may not be defined
# at the time of the libc build. We should skip checking such targets.
- if (NOT ${dep} MATCHES "^RTScudo.*|^RTGwp.*")
+ if(NOT ${dep} MATCHES "^RTScudo.*|^RTGwp.*")
list(APPEND skipped_list ${dep})
endif()
continue()
@@ -221,14 +221,14 @@ function(get_object_files_for_test result skipped_entrypoints_list)
list(APPEND object_files ${dep_obj})
list(APPEND skipped_list ${dep_skip})
- endforeach(dep)
+ endforeach()
list(REMOVE_DUPLICATES object_files)
set(${result} ${object_files} PARENT_SCOPE)
list(REMOVE_DUPLICATES skipped_list)
set(${skipped_entrypoints_list} ${skipped_list} PARENT_SCOPE)
-endfunction(get_object_files_for_test)
+endfunction()
function(get_link_options link_options)
set(link_opts "")
@@ -266,28 +266,28 @@ function(create_libc_unittest fq_target_name)
)
if(NOT LIBC_UNITTEST_SRCS)
message(FATAL_ERROR "'add_libc_unittest' target requires a SRCS list of .cpp "
- "files.")
+ "files.")
endif()
if(NOT LIBC_UNITTEST_DEPENDS)
message(FATAL_ERROR "'add_libc_unittest' target requires a DEPENDS list of "
- "'add_entrypoint_object' targets.")
+ "'add_entrypoint_object' targets.")
endif()
get_fq_deps_list(fq_deps_list ${LIBC_UNITTEST_DEPENDS})
if(NOT LIBC_UNITTEST_C_TEST)
list(APPEND fq_deps_list libc.src.__support.StringUtil.error_to_string
- libc.test.UnitTest.ErrnoSetterMatcher)
+ libc.test.UnitTest.ErrnoSetterMatcher)
endif()
list(REMOVE_DUPLICATES fq_deps_list)
_get_common_test_compile_options(compile_options "${LIBC_UNITTEST_C_TEST}"
- "${LIBC_UNITTEST_FLAGS}")
+ "${LIBC_UNITTEST_FLAGS}")
libc_add_definition(compile_options "LIBC_TEST=UNIT")
get_link_options(link_options
- ${compile_options}
- ${LIBC_LINK_OPTIONS_DEFAULT}
- ${LIBC_TEST_LINK_OPTIONS_DEFAULT}
+ ${compile_options}
+ ${LIBC_LINK_OPTIONS_DEFAULT}
+ ${LIBC_TEST_LINK_OPTIONS_DEFAULT}
)
list(APPEND compile_options ${LIBC_UNITTEST_COMPILE_OPTIONS})
@@ -301,7 +301,7 @@ function(create_libc_unittest fq_target_name)
endif()
get_object_files_for_test(
- link_object_files skipped_entrypoints_list ${fq_deps_list})
+ link_object_files skipped_entrypoints_list ${fq_deps_list})
if(skipped_entrypoints_list)
# If a test is OS/target machine independent, it has to be skipped if the
# OS/target machine combination does not provide any dependent entrypoints.
@@ -322,7 +322,7 @@ function(create_libc_unittest fq_target_name)
# is happening here at the entrypoint level.
if(LIBC_CMAKE_VERBOSE_LOGGING)
set(msg "Skipping unittest ${fq_target_name} as it has missing deps: "
- "${skipped_entrypoints_list}.")
+ "${skipped_entrypoints_list}.")
message(STATUS ${msg})
endif()
return()
@@ -404,7 +404,7 @@ function(create_libc_unittest fq_target_name)
if(TARGET libc-unit-tests-build)
add_dependencies(libc-unit-tests-build ${fq_build_target_name})
endif()
-endfunction(create_libc_unittest)
+endfunction()
function(add_libc_unittest target_name)
add_target_with_flags(
@@ -412,17 +412,17 @@ function(add_libc_unittest target_name)
CREATE_TARGET create_libc_unittest
${ARGN}
)
-endfunction(add_libc_unittest)
+endfunction()
function(add_libc_exhaustive_testsuite suite_name)
add_custom_target(${suite_name})
add_dependencies(exhaustive-check-libc ${suite_name})
-endfunction(add_libc_exhaustive_testsuite)
+endfunction()
function(add_libc_long_running_testsuite suite_name)
add_custom_target(${suite_name})
add_dependencies(libc-long-running-tests ${suite_name})
-endfunction(add_libc_long_running_testsuite)
+endfunction()
# Rule to add a fuzzer test.
# Usage
@@ -442,11 +442,11 @@ function(add_libc_fuzzer target_name)
)
if(NOT LIBC_FUZZER_SRCS)
message(FATAL_ERROR "'add_libc_fuzzer' target requires a SRCS list of .cpp "
- "files.")
+ "files.")
endif()
if(NOT LIBC_FUZZER_DEPENDS)
message(FATAL_ERROR "'add_libc_fuzzer' target requires a DEPENDS list of "
- "'add_entrypoint_object' targets.")
+ "'add_entrypoint_object' targets.")
endif()
list(APPEND LIBC_FUZZER_LINK_LIBRARIES "")
@@ -462,11 +462,11 @@ function(add_libc_fuzzer target_name)
get_fq_target_name(${target_name} fq_target_name)
get_fq_deps_list(fq_deps_list ${LIBC_FUZZER_DEPENDS})
get_object_files_for_test(
- link_object_files skipped_entrypoints_list ${fq_deps_list})
+ link_object_files skipped_entrypoints_list ${fq_deps_list})
if(skipped_entrypoints_list)
if(LIBC_CMAKE_VERBOSE_LOGGING)
set(msg "Skipping fuzzer target ${fq_target_name} as it has missing deps: "
- "${skipped_entrypoints_list}.")
+ "${skipped_entrypoints_list}.")
message(STATUS ${msg})
endif()
add_custom_target(${fq_target_name})
@@ -495,7 +495,7 @@ function(add_libc_fuzzer target_name)
)
set_target_properties(${fq_target_name}
- PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+ PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
add_dependencies(
${fq_target_name}
@@ -505,14 +505,14 @@ function(add_libc_fuzzer target_name)
target_compile_options(${fq_target_name}
PRIVATE
- ${LIBC_FUZZER_COMPILE_OPTIONS})
+ ${LIBC_FUZZER_COMPILE_OPTIONS})
-endfunction(add_libc_fuzzer)
+endfunction()
# Get libgcc_s to be used in hermetic and integration tests.
if(NOT MSVC AND NOT LIBC_CC_SUPPORTS_NOSTDLIBPP)
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -print-file-name=libgcc_s.so.1
- OUTPUT_VARIABLE LIBGCC_S_LOCATION)
+ OUTPUT_VARIABLE LIBGCC_S_LOCATION)
string(STRIP ${LIBGCC_S_LOCATION} LIBGCC_S_LOCATION)
endif()
@@ -567,18 +567,18 @@ function(add_integration_test test_name)
get_fq_deps_list(fq_deps_list ${INTEGRATION_TEST_DEPENDS})
list(APPEND fq_deps_list
- # All integration tests use the operating system's startup object with the
- # integration test object and need to inherit the same dependencies.
- libc.startup.${LIBC_TARGET_OS}.crt1
- libc.test.IntegrationTest.test
- # We always add the memory functions objects. This is because the
- # compiler's codegen can emit calls to the C memory functions.
- libc.src.string.memcmp
- libc.src.string.memcpy
- libc.src.string.memmove
- libc.src.string.memset
- libc.src.strings.bcmp
- libc.src.strings.bzero
+ # All integration tests use the operating system's startup object with the
+ # integration test object and need to inherit the same dependencies.
+ libc.startup.${LIBC_TARGET_OS}.crt1
+ libc.test.IntegrationTest.test
+ # We always add the memory functions objects. This is because the
+ # compiler's codegen can emit calls to the C memory functions.
+ libc.src.string.memcmp
+ libc.src.string.memcpy
+ libc.src.string.memmove
+ libc.src.string.memset
+ libc.src.strings.bcmp
+ libc.src.strings.bzero
)
if(libc.src.compiler.__stack_chk_fail IN_LIST TARGET_LLVMLIBC_ENTRYPOINTS)
@@ -592,11 +592,11 @@ function(add_integration_test test_name)
# TODO: Instead of gathering internal object files from entrypoints,
# collect the object files with public names of entrypoints.
get_object_files_for_test(
- link_object_files skipped_entrypoints_list ${fq_deps_list})
+ link_object_files skipped_entrypoints_list ${fq_deps_list})
if(skipped_entrypoints_list)
if(LIBC_CMAKE_VERBOSE_LOGGING)
set(msg "Skipping integration test ${fq_target_name} as it has missing deps: "
- "${skipped_entrypoints_list}.")
+ "${skipped_entrypoints_list}.")
message(STATUS ${msg})
endif()
return()
@@ -608,12 +608,12 @@ function(add_integration_test test_name)
${fq_target_name}.__libc__
STATIC
EXCLUDE_FROM_ALL
- ${link_object_files}
+ ${link_object_files}
)
set_target_properties(${fq_target_name}.__libc__
- PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+ PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
set_target_properties(${fq_target_name}.__libc__
- PROPERTIES ARCHIVE_OUTPUT_NAME ${fq_target_name}.libc)
+ PROPERTIES ARCHIVE_OUTPUT_NAME ${fq_target_name}.libc)
set(fq_build_target_name ${fq_target_name}.__build__)
add_executable(
@@ -623,13 +623,13 @@ function(add_integration_test test_name)
${INTEGRATION_TEST_HDRS}
)
set_target_properties(${fq_build_target_name}
- PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+ PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
target_include_directories(${fq_build_target_name} SYSTEM PRIVATE ${LIBC_INCLUDE_DIR})
target_include_directories(${fq_build_target_name} PRIVATE ${LIBC_SOURCE_DIR})
_get_hermetic_test_compile_options(compile_options "" "")
target_compile_options(${fq_build_target_name} PRIVATE
- ${compile_options} ${INTEGRATION_TEST_COMPILE_OPTIONS})
+ ${compile_options} ${INTEGRATION_TEST_COMPILE_OPTIONS})
set(compiler_runtime "")
@@ -676,8 +676,8 @@ function(add_integration_test test_name)
${compiler_runtime}
)
add_dependencies(${fq_build_target_name}
- libc.test.IntegrationTest.test
- ${INTEGRATION_TEST_DEPENDS})
+ libc.test.IntegrationTest.test
+ ${INTEGRATION_TEST_DEPENDS})
# We have to use a separate var to store the command as a list because
# the COMMAND option of `add_custom_target` cannot handle empty vars in the
@@ -686,11 +686,11 @@ function(add_integration_test test_name)
# to expand the list (by including the option COMMAND_EXPAND_LISTS). This
# makes `add_custom_target` construct the correct command and execute it.
set(test_cmd
- ${INTEGRATION_TEST_ENV}
- $<$<BOOL:${LIBC_TARGET_ARCHITECTURE_IS_NVPTX}>:LIBOMPTARGET_STACK_SIZE=3072>
- ${CMAKE_CROSSCOMPILING_EMULATOR}
- ${INTEGRATION_TEST_LOADER_ARGS}
- $<TARGET_FILE:${fq_build_target_name}> ${INTEGRATION_TEST_ARGS})
+ ${INTEGRATION_TEST_ENV}
+ $<$<BOOL:${LIBC_TARGET_ARCHITECTURE_IS_NVPTX}>:LIBOMPTARGET_STACK_SIZE=3072>
+ ${CMAKE_CROSSCOMPILING_EMULATOR}
+ ${INTEGRATION_TEST_LOADER_ARGS}
+ $<TARGET_FILE:${fq_build_target_name}> ${INTEGRATION_TEST_ARGS})
# Generate a sidecar .params file alongside the executable for any test that
# requires specific command-line arguments or environment variables. The
# LibcTest lit format reads this file at test time. Format: one arg per line,
@@ -710,7 +710,7 @@ function(add_integration_test test_name)
if(INTEGRATION_TEST_LOADER_ARGS OR INTEGRATION_TEST_ARGS OR INTEGRATION_TEST_ENV)
file(GENERATE
- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${fq_build_target_name}.params"
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${fq_build_target_name}.params"
CONTENT "${_params_content}"
)
endif()
@@ -733,7 +733,7 @@ function(add_integration_test test_name)
if(TARGET libc-integration-tests-build)
add_dependencies(libc-integration-tests-build ${fq_build_target_name})
endif()
-endfunction(add_integration_test)
+endfunction()
# Rule to add a hermetic program. A hermetic program is one whose executable is fully
# statically linked and consists of pieces drawn only from LLVM's libc. Nothing,
@@ -780,37 +780,37 @@ function(add_libc_hermetic test_name)
get_fq_deps_list(fq_deps_list ${HERMETIC_TEST_DEPENDS})
list(APPEND fq_deps_list
- # Hermetic tests use the platform's startup object. So, their deps also
- # have to be collected.
- libc.startup.${LIBC_TARGET_OS}.crt1
- # We always add the memory functions objects. This is because the
- # compiler's codegen can emit calls to the C memory functions.
- libc.src.__support.StringUtil.error_to_string
- libc.src.string.memcmp
- libc.src.string.memcpy
- libc.src.string.memmove
- libc.src.string.memset
- libc.src.strings.bcmp
- libc.src.strings.bzero
+ # Hermetic tests use the platform's startup object. So, their deps also
+ # have to be collected.
+ libc.startup.${LIBC_TARGET_OS}.crt1
+ # We always add the memory functions objects. This is because the
+ # compiler's codegen can emit calls to the C memory functions.
+ libc.src.__support.StringUtil.error_to_string
+ libc.src.string.memcmp
+ libc.src.string.memcpy
+ libc.src.string.memmove
+ libc.src.string.memset
+ libc.src.strings.bcmp
+ libc.src.strings.bzero
)
- if (LIBC_TARGET_ARCHITECTURE_IS_AARCH64 AND NOT(LIBC_TARGET_OS_IS_BAREMETAL))
+ if(LIBC_TARGET_ARCHITECTURE_IS_AARCH64 AND NOT(LIBC_TARGET_OS_IS_BAREMETAL))
list(APPEND fq_deps_list libc.src.sys.auxv.getauxval)
endif()
# Syscalls used by death tests.
if(LIBC_TEST_SUBPROCESS_TESTS AND NOT HERMETIC_TEST_C_TEST)
list(APPEND fq_deps_list
- libc.src.poll.poll
- libc.src.signal.kill
- libc.src.stdio.fflush
- libc.src.stdio.stderr
- libc.src.stdio.stdout
- libc.src.stdlib.exit
- libc.src.string.strsignal
- libc.src.sys.wait.waitpid
- libc.src.unistd.close
- libc.src.unistd.fork
- libc.src.unistd.pipe
+ libc.src.poll.poll
+ libc.src.signal.kill
+ libc.src.stdio.fflush
+ libc.src.stdio.stderr
+ libc.src.stdio.stdout
+ libc.src.stdlib.exit
+ libc.src.string.strsignal
+ libc.src.sys.wait.waitpid
+ libc.src.unistd.close
+ libc.src.unistd.fork
+ libc.src.unistd.pipe
)
endif()
@@ -830,11 +830,11 @@ function(add_libc_hermetic test_name)
# TODO: Instead of gathering internal object files from entrypoints,
# collect the object files with public names of entrypoints.
get_object_files_for_test(
- link_object_files skipped_entrypoints_list ${fq_deps_list})
+ link_object_files skipped_entrypoints_list ${fq_deps_list})
if(skipped_entrypoints_list)
if(LIBC_CMAKE_VERBOSE_LOGGING)
set(msg "Skipping hermetic test ${fq_target_name} as it has missing deps: "
- "${skipped_entrypoints_list}.")
+ "${skipped_entrypoints_list}.")
message(STATUS ${msg})
endif()
return()
@@ -846,12 +846,12 @@ function(add_libc_hermetic test_name)
${fq_target_name}.__libc__
STATIC
EXCLUDE_FROM_ALL
- ${link_object_files}
+ ${link_object_files}
)
set_target_properties(${fq_target_name}.__libc__
- PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+ PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
set_target_properties(${fq_target_name}.__libc__
- PROPERTIES ARCHIVE_OUTPUT_NAME ${fq_target_name}.libc)
+ PROPERTIES ARCHIVE_OUTPUT_NAME ${fq_target_name}.libc)
if(HERMETIC_TEST_NO_RUN_POSTBUILD)
set(fq_build_target_name ${fq_target_name})
@@ -878,10 +878,10 @@ function(add_libc_hermetic test_name)
target_include_directories(${fq_build_target_name} SYSTEM PRIVATE ${LIBC_INCLUDE_DIR})
target_include_directories(${fq_build_target_name} PRIVATE ${LIBC_SOURCE_DIR})
_get_hermetic_test_compile_options(compile_options "${HERMETIC_TEST_C_TEST}"
- "${HERMETIC_TEST_FLAGS}")
+ "${HERMETIC_TEST_FLAGS}")
target_compile_options(${fq_build_target_name} PRIVATE
- ${compile_options}
- ${HERMETIC_TEST_COMPILE_OPTIONS})
+ ${compile_options}
+ ${HERMETIC_TEST_COMPILE_OPTIONS})
set(link_libraries "")
set(compiler_runtime "")
@@ -936,14 +936,14 @@ function(add_libc_hermetic test_name)
LibcHermeticTestSupport.hermetic
${fq_target_name}.__libc__
${compiler_runtime}
- )
+ )
add_dependencies(${fq_build_target_name}
- LibcTest.hermetic
- libc.test.UnitTest.ErrnoSetterMatcher
- ${fq_deps_list})
+ LibcTest.hermetic
+ libc.test.UnitTest.ErrnoSetterMatcher
+ ${fq_deps_list})
if(NOT HERMETIC_TEST_NO_RUN_POSTBUILD)
- if (LIBC_TEST_CMD)
+ if(LIBC_TEST_CMD)
# In the form of "<command> binary=@BINARY@", e.g. "qemu-system-arm -loader$<COMMA>file=@BINARY@"
string(REPLACE "@BINARY@" "$<TARGET_FILE:${fq_build_target_name}>" test_cmd_parsed ${LIBC_TEST_CMD})
string(REPLACE " " ";" test_cmd "${test_cmd_parsed}")
@@ -954,28 +954,28 @@ function(add_libc_hermetic test_name)
$<TARGET_FILE:${fq_build_target_name}> ${HERMETIC_TEST_ARGS})
endif()
- set(_params_content "")
- foreach(_arg IN LISTS HERMETIC_TEST_LOADER_ARGS)
- string(APPEND _params_content "${_arg}\n")
- endforeach()
- string(APPEND _params_content "---\n")
- foreach(_arg IN LISTS HERMETIC_TEST_ARGS)
- string(APPEND _params_content "${_arg}\n")
- endforeach()
- string(APPEND _params_content "---\n")
- foreach(_env_entry IN LISTS HERMETIC_TEST_ENV)
- string(APPEND _params_content "${_env_entry}\n")
- endforeach()
- if(LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
- string(APPEND _params_content "LIBOMPTARGET_STACK_SIZE=3072\n")
- endif()
+ set(_params_content "")
+ foreach(_arg IN LISTS HERMETIC_TEST_LOADER_ARGS)
+ string(APPEND _params_content "${_arg}\n")
+ endforeach()
+ string(APPEND _params_content "---\n")
+ foreach(_arg IN LISTS HERMETIC_TEST_ARGS)
+ string(APPEND _params_content "${_arg}\n")
+ endforeach()
+ string(APPEND _params_content "---\n")
+ foreach(_env_entry IN LISTS HERMETIC_TEST_ENV)
+ string(APPEND _params_content "${_env_entry}\n")
+ endforeach()
+ if(LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
+ string(APPEND _params_content "LIBOMPTARGET_STACK_SIZE=3072\n")
+ endif()
- if(HERMETIC_TEST_LOADER_ARGS OR HERMETIC_TEST_ARGS OR HERMETIC_TEST_ENV OR LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
- file(GENERATE
- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${fq_build_target_name}.params"
- CONTENT "${_params_content}"
- )
- endif()
+ if(HERMETIC_TEST_LOADER_ARGS OR HERMETIC_TEST_ARGS OR HERMETIC_TEST_ENV OR LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
+ file(GENERATE
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${fq_build_target_name}.params"
+ CONTENT "${_params_content}"
+ )
+ endif()
add_custom_target(
${fq_target_name}
@@ -1014,7 +1014,7 @@ function(add_libc_hermetic test_name)
add_dependencies(libc-hermetic-tests-build ${fq_build_target_name})
endif()
endif()
-endfunction(add_libc_hermetic)
+endfunction()
# A convenience function to add both a unit test as well as a hermetic test.
function(add_libc_test test_name)
@@ -1034,7 +1034,7 @@ function(add_libc_test test_name)
LINK_LIBRARIES
LibcTest.hermetic
LibcDeathTestExecutors.hermetic
- ${LIBC_TEST_UNPARSED_ARGUMENTS}
+ ${LIBC_TEST_UNPARSED_ARGUMENTS}
)
get_fq_target_name(${test_name} fq_test_name)
if(TARGET ${fq_test_name}.__hermetic__ AND TARGET ${fq_test_name}.__unit__)
@@ -1046,7 +1046,7 @@ function(add_libc_test test_name)
endif()
endif()
endif()
-endfunction(add_libc_test)
+endfunction()
# Tests all implementations that can run on the target CPU.
function(add_libc_multi_impl_test name suite)
diff --git a/libc/cmake/modules/LibcConfig.cmake b/libc/cmake/modules/LibcConfig.cmake
index dd6e3cf49375c..1d0e814f8ef9c 100644
--- a/libc/cmake/modules/LibcConfig.cmake
+++ b/libc/cmake/modules/LibcConfig.cmake
@@ -154,32 +154,32 @@ function(generate_config_doc config_file doc_file)
math(EXPR group_count_1 "${group_count} - 1")
set(doc_string ".. _configure:\n"
- "..\n"
- " Do not edit this file directly. CMake will auto generate it.\n"
- " If the changes are intended, add this file to your commit.\n"
- "\n"
- "==========================\n"
- "Configure Options\n"
- "==========================\n"
- "\n"
- "Below is the full set of options one can use to configure the libc build.\n"
- "An option can be given an explicit value on the CMake command line using\n"
- "the following syntax:\n"
- "\n"
- ".. code-block:: sh\n"
- "\n"
- " $> cmake <other build options> -D<libc config option name>=<option value> <more options>\n"
- "\n"
- "For example:\n"
- "\n"
- ".. code-block:: sh\n"
- "\n"
- " $> cmake <other build options> -DLIBC_CONF_PRINTF_DISABLE_FLOAT=ON <more options>\n"
- "\n"
- "See the main ``config/config.json``, and the platform and architecture specific\n"
- "overrides in ``config/<platform>/config.json`` and ``config/<platform>/<arch>/config.json,``\n"
- "to learn about the defaults for your platform and target.\n"
- "\n")
+ "..\n"
+ " Do not edit this file directly. CMake will auto generate it.\n"
+ " If the changes are intended, add this file to your commit.\n"
+ "\n"
+ "==========================\n"
+ "Configure Options\n"
+ "==========================\n"
+ "\n"
+ "Below is the full set of options one can use to configure the libc build.\n"
+ "An option can be given an explicit value on the CMake command line using\n"
+ "the following syntax:\n"
+ "\n"
+ ".. code-block:: sh\n"
+ "\n"
+ " $> cmake <other build options> -D<libc config option name>=<option value> <more options>\n"
+ "\n"
+ "For example:\n"
+ "\n"
+ ".. code-block:: sh\n"
+ "\n"
+ " $> cmake <other build options> -DLIBC_CONF_PRINTF_DISABLE_FLOAT=ON <more options>\n"
+ "\n"
+ "See the main ``config/config.json``, and the platform and architecture specific\n"
+ "overrides in ``config/<platform>/config.json`` and ``config/<platform>/<arch>/config.json,``\n"
+ "to learn about the defaults for your platform and target.\n"
+ "\n")
foreach(group_num RANGE ${group_count_1})
string(JSON group_name ERROR_VARIABLE json_error MEMBER ${json_config} ${group_num})
diff --git a/libc/cmake/modules/LibcParseArguments.cmake b/libc/cmake/modules/LibcParseArguments.cmake
index ef4a2aff0ce82..50cb585b414af 100644
--- a/libc/cmake/modules/LibcParseArguments.cmake
+++ b/libc/cmake/modules/LibcParseArguments.cmake
@@ -72,7 +72,7 @@ endmacro()
# Assume that *_OVERLAY and *_FULL_BUILD args have been merged properly.
macro(forward_arguments name_prefix output)
set(${output} "")
-
+
foreach(argument ${LLVM_LIBC_OPTIONAL_ARGS})
if(${name_prefix}_${argument})
list(APPEND output ${argument})
diff --git a/libc/cmake/modules/prepare_libc_gpu_build.cmake b/libc/cmake/modules/prepare_libc_gpu_build.cmake
index aba4d11bf41a1..3bfa98b1dcba7 100644
--- a/libc/cmake/modules/prepare_libc_gpu_build.cmake
+++ b/libc/cmake/modules/prepare_libc_gpu_build.cmake
@@ -1,19 +1,19 @@
if(NOT LIBC_TARGET_OS_IS_GPU)
message(FATAL_ERROR
- "libc build: Invalid attempt to set up GPU architectures.")
+ "libc build: Invalid attempt to set up GPU architectures.")
endif()
# Ensure the compiler is a valid clang when building the GPU target.
set(req_ver "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}")
if(LLVM_VERSION_MAJOR AND NOT (CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang" AND
- ${CMAKE_CXX_COMPILER_VERSION} VERSION_EQUAL "${req_ver}"))
- message(WARNING "libc for GPU requires an up-to-date clang. CMake compiler "
- "'${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}' "
- " is not 'Clang ${req_ver}'.")
+ ${CMAKE_CXX_COMPILER_VERSION} VERSION_EQUAL "${req_ver}"))
+ message(WARNING "libc for GPU requires an up-to-date clang. CMake compiler "
+ "'${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}' "
+ " is not 'Clang ${req_ver}'.")
endif()
if(NOT LLVM_LIBC_FULL_BUILD)
message(FATAL_ERROR "LLVM_LIBC_FULL_BUILD must be enabled to build libc for "
- "GPU.")
+ "GPU.")
endif()
# Set the required flags globally so standard CMake utilities can compile.
@@ -43,27 +43,27 @@ endif()
set(gpu_test_architecture "")
if(DEFINED LLVM_TARGETS_TO_BUILD AND LIBC_TARGET_ARCHITECTURE_IS_AMDGPU
- AND NOT "AMDGPU" IN_LIST LLVM_TARGETS_TO_BUILD)
+ AND NOT "AMDGPU" IN_LIST LLVM_TARGETS_TO_BUILD)
set(LIBC_GPU_TESTS_DISABLED TRUE)
message(STATUS "AMDGPU backend is not available, tests will not be built")
elseif(DEFINED LLVM_TARGETS_TO_BUILD AND LIBC_TARGET_ARCHITECTURE_IS_NVPTX
- AND NOT "NVPTX" IN_LIST LLVM_TARGETS_TO_BUILD)
+ AND NOT "NVPTX" IN_LIST LLVM_TARGETS_TO_BUILD)
set(LIBC_GPU_TESTS_DISABLED TRUE)
message(STATUS "NVPTX backend is not available, tests will not be built")
elseif(LIBC_GPU_TEST_ARCHITECTURE)
set(LIBC_GPU_TESTS_DISABLED FALSE)
set(gpu_test_architecture ${LIBC_GPU_TEST_ARCHITECTURE})
message(STATUS "Using user-specified GPU architecture for testing: "
- "'${gpu_test_architecture}'")
+ "'${gpu_test_architecture}'")
elseif(PLATFORM_HAS_GPU)
set(LIBC_GPU_TESTS_DISABLED FALSE)
set(gpu_test_architecture "native")
message(STATUS "Using GPU architecture detected on the system for testing: "
- "'native'")
+ "'native'")
else()
set(LIBC_GPU_TESTS_DISABLED TRUE)
message(STATUS "No GPU architecture detected or provided, tests will not be "
- "built")
+ "built")
endif()
set(LIBC_GPU_TARGET_ARCHITECTURE "${gpu_test_architecture}")
diff --git a/libc/docs/CMakeLists.txt b/libc/docs/CMakeLists.txt
index 08a56dfc9a819..73da7448c0d49 100644
--- a/libc/docs/CMakeLists.txt
+++ b/libc/docs/CMakeLists.txt
@@ -1,116 +1,116 @@
-if (LLVM_ENABLE_SPHINX)
-include(AddSphinxTarget)
-if (SPHINX_FOUND)
- if (${SPHINX_OUTPUT_HTML})
- # Similar to clang, we copy our static documentation files from libc/docs/
- # to the $build_dir/libc/docs/. That way, we can have a mix of both static
- # committed files and dynamically generated .rst files. We don't want the
- # dynamically generated .rst files to pollute the source tree.
- # Maintain a list of headers for which we dynamically generate html docs
- # for via docgen. For more complex docs (such as per arch support, a la
- # math.h), those should be omitted and exist statically in
- # libc/docs/headers/.
- list(APPEND docgen_list
- aio
- arpa/inet
- assert
- byteswap
- cpio
- ctype
- dirent
- dlfcn
- endian
- errno
- fcntl
- fenv
- float
- glob
- inttypes
- libgen
- locale
- nl_types
- net/if
- netinet/in
- netinet/tcp
- poll
- pthread
- pwd
- sched
- setjmp
- signal
- spawn
- stdbit
- stdio
- stdlib
- string
- strings
- sys/ipc
- sys/mman
- sys/resource
- sys/select
- sys/sem
- sys/socket
- sys/stat
- sys/statvfs
- sys/time
- sys/uio
- sys/utsname
- sys/wait
- termios
- threads
- time
- uchar
- unistd
- wchar
- wctype
- )
- foreach(stem IN LISTS docgen_list)
- list(APPEND libc_generated_docs "headers/${stem}.rst")
- endforeach()
- list(APPEND libc_generated_docs configure.rst)
- add_sphinx_source_sync_target(copy-libc-rst-docs
- "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}"
- PRESERVE_DOCS ${libc_generated_docs})
- add_custom_command(TARGET copy-libc-rst-docs POST_BUILD
- COMMAND "${CMAKE_COMMAND}" -E copy_if_
diff erent
- "${CMAKE_CURRENT_SOURCE_DIR}/../Maintainers.md"
- "${CMAKE_CURRENT_BINARY_DIR}"
+if(LLVM_ENABLE_SPHINX)
+ include(AddSphinxTarget)
+ if(SPHINX_FOUND)
+ if(${SPHINX_OUTPUT_HTML})
+ # Similar to clang, we copy our static documentation files from libc/docs/
+ # to the $build_dir/libc/docs/. That way, we can have a mix of both static
+ # committed files and dynamically generated .rst files. We don't want the
+ # dynamically generated .rst files to pollute the source tree.
+ # Maintain a list of headers for which we dynamically generate html docs
+ # for via docgen. For more complex docs (such as per arch support, a la
+ # math.h), those should be omitted and exist statically in
+ # libc/docs/headers/.
+ list(APPEND docgen_list
+ aio
+ arpa/inet
+ assert
+ byteswap
+ cpio
+ ctype
+ dirent
+ dlfcn
+ endian
+ errno
+ fcntl
+ fenv
+ float
+ glob
+ inttypes
+ libgen
+ locale
+ nl_types
+ net/if
+ netinet/in
+ netinet/tcp
+ poll
+ pthread
+ pwd
+ sched
+ setjmp
+ signal
+ spawn
+ stdbit
+ stdio
+ stdlib
+ string
+ strings
+ sys/ipc
+ sys/mman
+ sys/resource
+ sys/select
+ sys/sem
+ sys/socket
+ sys/stat
+ sys/statvfs
+ sys/time
+ sys/uio
+ sys/utsname
+ sys/wait
+ termios
+ threads
+ time
+ uchar
+ unistd
+ wchar
+ wctype
+ )
+ foreach(stem IN LISTS docgen_list)
+ list(APPEND libc_generated_docs "headers/${stem}.rst")
+ endforeach()
+ list(APPEND libc_generated_docs configure.rst)
+ add_sphinx_source_sync_target(copy-libc-rst-docs
+ "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}"
+ PRESERVE_DOCS ${libc_generated_docs})
+ add_custom_command(TARGET copy-libc-rst-docs POST_BUILD
+ COMMAND "${CMAKE_COMMAND}" -E copy_if_
diff erent
+ "${CMAKE_CURRENT_SOURCE_DIR}/../Maintainers.md"
+ "${CMAKE_CURRENT_BINARY_DIR}"
)
- # For headers that are nested in directories, we need to
- # `mkdir $build_dir/libc/docs/headers/$dir`. Otherwise, the invocation of
- # docgen below will fail since the output file would be placed in a
- # directory that does not exist, leading to a `No such file or directory`
- # error from the shell.
- file(MAKE_DIRECTORY
- "${CMAKE_CURRENT_BINARY_DIR}/headers/arpa/"
- "${CMAKE_CURRENT_BINARY_DIR}/headers/net/"
- "${CMAKE_CURRENT_BINARY_DIR}/headers/netinet/"
- "${CMAKE_CURRENT_BINARY_DIR}/headers/sys/"
- )
+ # For headers that are nested in directories, we need to
+ # `mkdir $build_dir/libc/docs/headers/$dir`. Otherwise, the invocation of
+ # docgen below will fail since the output file would be placed in a
+ # directory that does not exist, leading to a `No such file or directory`
+ # error from the shell.
+ file(MAKE_DIRECTORY
+ "${CMAKE_CURRENT_BINARY_DIR}/headers/arpa/"
+ "${CMAKE_CURRENT_BINARY_DIR}/headers/net/"
+ "${CMAKE_CURRENT_BINARY_DIR}/headers/netinet/"
+ "${CMAKE_CURRENT_BINARY_DIR}/headers/sys/"
+ )
- # Change sphinx to build from $build_dir/libc/docs/ rather than
- # llvm-project/libc/docs/.
- add_sphinx_target(html libc SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}")
- # Depend on the copy target.
- add_dependencies(docs-libc-html copy-libc-rst-docs)
+ # Change sphinx to build from $build_dir/libc/docs/ rather than
+ # llvm-project/libc/docs/.
+ add_sphinx_target(html libc SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}")
+ # Depend on the copy target.
+ add_dependencies(docs-libc-html copy-libc-rst-docs)
- foreach(stem IN LISTS docgen_list)
- # It is an error in cmake to have a target name that contains a "/", but
- # docgen relies on the "/" to find headers nested under directories.
- # Replace with underscore and namespace the target to avoid collisions
- # with other runtime targets in combined builds.
- string(REPLACE "/" "_" stem_rst ${stem})
- set(docgen_target_name libc-docgen-${stem_rst})
+ foreach(stem IN LISTS docgen_list)
+ # It is an error in cmake to have a target name that contains a "/", but
+ # docgen relies on the "/" to find headers nested under directories.
+ # Replace with underscore and namespace the target to avoid collisions
+ # with other runtime targets in combined builds.
+ string(REPLACE "/" "_" stem_rst ${stem})
+ set(docgen_target_name libc-docgen-${stem_rst})
- # docgen invocation.
- add_custom_target(${docgen_target_name}
- COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../utils/docgen/docgen.py ${stem}.h >
- ${CMAKE_CURRENT_BINARY_DIR}/headers/${stem}.rst)
- add_dependencies(${docgen_target_name} copy-libc-rst-docs)
- # depend on the docgen invocation.
- add_dependencies(docs-libc-html ${docgen_target_name})
- endforeach()
+ # docgen invocation.
+ add_custom_target(${docgen_target_name}
+ COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../utils/docgen/docgen.py ${stem}.h >
+ ${CMAKE_CURRENT_BINARY_DIR}/headers/${stem}.rst)
+ add_dependencies(${docgen_target_name} copy-libc-rst-docs)
+ # depend on the docgen invocation.
+ add_dependencies(docs-libc-html ${docgen_target_name})
+ endforeach()
+ endif()
endif()
endif()
-endif()
diff --git a/libc/examples/examples.cmake b/libc/examples/examples.cmake
index 6bb6b41c252f5..9ca1510f48c9d 100644
--- a/libc/examples/examples.cmake
+++ b/libc/examples/examples.cmake
@@ -11,6 +11,6 @@ function(add_example name)
target_link_options(${name} PRIVATE -l:libllvmlibc.a)
else()
message(FATAL_ERROR "Either LLVM_LIBC_FULL_BUILD should be on or "
- "LIBC_OVERLAY_ARCHIVE_DIR should be set.")
+ "LIBC_OVERLAY_ARCHIVE_DIR should be set.")
endif()
endfunction()
diff --git a/libc/hdr/CMakeLists.txt b/libc/hdr/CMakeLists.txt
index a3eb7769e3c91..0effabc3759cf 100644
--- a/libc/hdr/CMakeLists.txt
+++ b/libc/hdr/CMakeLists.txt
@@ -253,7 +253,7 @@ add_proxy_header_library(
libc.include.llvm-libc-macros.unistd_macros
)
-if (WIN32)
+if(WIN32)
set(windows_addtional_time_macros libc.include.llvm-libc-macros.windows.time_macros_ext)
else()
set(windows_addtional_time_macros "")
diff --git a/libc/hdr/types/CMakeLists.txt b/libc/hdr/types/CMakeLists.txt
index f56ddda2dc9fe..72b93c0e5dd0e 100644
--- a/libc/hdr/types/CMakeLists.txt
+++ b/libc/hdr/types/CMakeLists.txt
@@ -1021,7 +1021,7 @@ add_proxy_header_library(
add_proxy_header_library(
Elf32_Xword
HDRS
- Elf32_Xword.h
+ Elf32_Xword.h
FULL_BUILD_DEPENDS
libc.include.llvm-libc-types.Elf32_Xword
)
@@ -1029,7 +1029,7 @@ add_proxy_header_library(
add_proxy_header_library(
Elf32_auxv_t
HDRS
- Elf32_auxv_t.h
+ Elf32_auxv_t.h
FULL_BUILD_DEPENDS
libc.include.llvm-libc-types.Elf32_auxv_t
)
@@ -1173,7 +1173,7 @@ add_proxy_header_library(
add_proxy_header_library(
Elf64_auxv_t
HDRS
- Elf64_auxv_t.h
+ Elf64_auxv_t.h
FULL_BUILD_DEPENDS
libc.include.llvm-libc-types.Elf64_auxv_t
)
@@ -1291,4 +1291,3 @@ add_proxy_header_library(
FULL_BUILD_DEPENDS
libc.include.llvm-libc-types.tcflag_t
)
-
diff --git a/libc/include/CMakeLists.txt b/libc/include/CMakeLists.txt
index 8ad2a43e07cbb..ac5d249410a17 100644
--- a/libc/include/CMakeLists.txt
+++ b/libc/include/CMakeLists.txt
@@ -1110,7 +1110,7 @@ add_header_macro(
.llvm-libc-types.struct_pollfd
.llvm-libc-types.nfds_t
.llvm-libc-macros.poll-macros
- )
+)
add_header_macro(
sys_poll
@@ -1127,7 +1127,7 @@ add_header_macro(
DEPENDS
.llvm-libc-macros.nl_types_macros
.llvm-libc-types.nl_catd
- )
+)
add_header_macro(
langinfo
@@ -1138,7 +1138,7 @@ add_header_macro(
.llvm-libc-macros.langinfo_macros
.llvm-libc-types.nl_item
.llvm-libc-types.locale_t
- )
+)
# UEFI spec references "Uefi.h" so we use that name for compatibility
add_header_macro(
@@ -1170,7 +1170,7 @@ function(get_all_install_header_targets out_var)
endforeach()
list(REMOVE_DUPLICATES all_deps)
set(${out_var} ${all_deps} PARENT_SCOPE)
-endfunction(get_all_install_header_targets)
+endfunction()
get_all_install_header_targets(all_install_header_targets ${TARGET_PUBLIC_HEADERS})
add_custom_target(generate-libc-headers DEPENDS ${all_install_header_targets})
@@ -1182,13 +1182,13 @@ foreach(target IN LISTS all_install_header_targets)
get_target_property(header_file ${target} HEADER_FILE_PATH)
if(NOT header_file)
message(FATAL_ERROR "Installable header file '${target}' does not have the "
- "HEADER_FILE_PATH property set.")
+ "HEADER_FILE_PATH property set.")
endif()
file(RELATIVE_PATH relative_path ${LIBC_INCLUDE_DIR} ${header_file})
get_filename_component(nested_dir ${relative_path} DIRECTORY)
install(FILES ${header_file}
- DESTINATION ${LIBC_INSTALL_INCLUDE_DIR}/${nested_dir}
- COMPONENT libc-headers)
+ DESTINATION ${LIBC_INSTALL_INCLUDE_DIR}/${nested_dir}
+ COMPONENT libc-headers)
# The GPU optionally provides the supported declarations externally so
# offloading languages like CUDA and OpenMP know what is supported by libc. We
# install these in the compiler's resource directory at a preset location.
@@ -1201,19 +1201,19 @@ foreach(target IN LISTS all_install_header_targets)
file(RELATIVE_PATH relative_path ${LIBC_INCLUDE_DIR} ${decls_file})
get_filename_component(nested_dir ${relative_path} DIRECTORY)
set(install_dir
- ${CMAKE_INSTALL_PREFIX}/${resource_dir}/llvm_libc_wrappers/${nested_dir})
+ ${CMAKE_INSTALL_PREFIX}/${resource_dir}/llvm_libc_wrappers/${nested_dir})
install(FILES ${decls_file}
- DESTINATION ${install_dir}
- COMPONENT libc-headers)
+ DESTINATION ${install_dir}
+ COMPONENT libc-headers)
endif()
endforeach()
if(LLVM_LIBC_FULL_BUILD)
add_custom_target(install-libc-headers
- DEPENDS libc-headers
- COMMAND "${CMAKE_COMMAND}"
- -DCMAKE_INSTALL_COMPONENT=libc-headers
- -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
+ DEPENDS libc-headers
+ COMMAND "${CMAKE_COMMAND}"
+ -DCMAKE_INSTALL_COMPONENT=libc-headers
+ -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
# Stripping is a no-op for headers
add_custom_target(install-libc-headers-stripped DEPENDS install-libc-headers)
endif()
diff --git a/libc/include/llvm-libc-macros/CMakeLists.txt b/libc/include/llvm-libc-macros/CMakeLists.txt
index 0ac23eae063b1..e2f2486639bce 100644
--- a/libc/include/llvm-libc-macros/CMakeLists.txt
+++ b/libc/include/llvm-libc-macros/CMakeLists.txt
@@ -7,7 +7,7 @@ function(add_macro_header name)
"DEPENDS" # Multi-value arguments
${ARGN}
)
- if (MACRO_HEADER_DEST_HDR)
+ if(MACRO_HEADER_DEST_HDR)
set(dest_header_arg DEST_HDR ${MACRO_HEADER_DEST_HDR})
endif()
if(TARGET libc.include.llvm-libc-macros.${LIBC_TARGET_OS}.${name})
@@ -30,7 +30,7 @@ function(add_macro_header name)
${MACRO_HEADER_DEPENDS}
)
endif()
-endfunction(add_macro_header)
+endfunction()
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS})
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS})
@@ -466,7 +466,7 @@ add_macro_header(
sysexits-macros.h
)
-if (LIBC_CONF_PRINTF_MODULAR)
+if(LIBC_CONF_PRINTF_MODULAR)
add_macro_header(
_LIBC_MODULAR_FORMAT_PRINTF
HDR
@@ -477,7 +477,7 @@ else()
_LIBC_MODULAR_FORMAT_PRINTF
HDR
_LIBC_MODULAR_FORMAT_PRINTF-disable.h
- DEST_HDR
+ DEST_HDR
_LIBC_MODULAR_FORMAT_PRINTF.h
)
endif()
diff --git a/libc/include/llvm-libc-macros/windows/CMakeLists.txt b/libc/include/llvm-libc-macros/windows/CMakeLists.txt
index 48afc795178a0..70837bf8a283a 100644
--- a/libc/include/llvm-libc-macros/windows/CMakeLists.txt
+++ b/libc/include/llvm-libc-macros/windows/CMakeLists.txt
@@ -3,4 +3,3 @@ add_header(
HDR
time-macros-ext.h
)
-
diff --git a/libc/include/llvm-libc-types/CMakeLists.txt b/libc/include/llvm-libc-types/CMakeLists.txt
index e17d8ec5794fa..a63c884040150 100644
--- a/libc/include/llvm-libc-types/CMakeLists.txt
+++ b/libc/include/llvm-libc-types/CMakeLists.txt
@@ -214,14 +214,14 @@ add_header(__getoptargv_t HDR __getoptargv_t.h)
add_header(wchar_t HDR wchar_t.h)
add_header(char8_t HDR char8_t.h)
add_header(
- char16_t
+ char16_t
HDR
char16_t.h
DEPENDS
libc.include.llvm-libc-macros.stdint_macros
)
add_header(
- char32_t
+ char32_t
HDR
char32_t.h
DEPENDS
@@ -234,7 +234,7 @@ add_header(socklen_t HDR socklen_t.h)
add_header(struct_sockaddr HDR struct_sockaddr.h DEPENDS .sa_family_t)
add_header(struct_sockaddr_in HDR struct_sockaddr_in.h DEPENDS .in_port_t .sa_family_t .struct_in_addr)
add_header(
- struct_sockaddr_in6
+ struct_sockaddr_in6
HDR
struct_sockaddr_in6.h
DEPENDS
@@ -304,21 +304,21 @@ add_header(fsblkcnt_t HDR fsblkcnt_t.h)
add_header(fsfilcnt_t HDR fsfilcnt_t.h)
add_header(
struct_statvfs
-HDR
- struct_statvfs.h
-DEPENDS
- .fsblkcnt_t
- .fsfilcnt_t
+ HDR
+ struct_statvfs.h
+ DEPENDS
+ .fsblkcnt_t
+ .fsfilcnt_t
)
add_header(fsid_t HDR fsid_t.h)
add_header(
struct_statfs
-HDR
- struct_statfs.h
-DEPENDS
- .fsblkcnt_t
- .fsfilcnt_t
- .fsid_t
+ HDR
+ struct_statfs.h
+ DEPENDS
+ .fsblkcnt_t
+ .fsfilcnt_t
+ .fsid_t
)
add_header(locale_t HDR locale_t.h)
add_header(struct_lconv HDR struct_lconv.h)
@@ -451,7 +451,7 @@ add_header(
HDR
Elf32_Versym.h
DEPENDS
- .Elf32_Half
+ .Elf32_Half
)
add_header(Elf64_Addr HDR Elf64_Addr.h DEPENDS libc.include.llvm-libc-macros.stdint_macros)
@@ -575,7 +575,7 @@ add_header(
HDR
Elf64_Versym.h
DEPENDS
- .Elf64_Half
+ .Elf64_Half
)
# UEFI
@@ -702,18 +702,18 @@ add_header(EFI_SYSTEM_TABLE
.EFI_TABLE_HEADER
.char16_t
)
-add_header(__action_closure_fn_t
- HDR
- __action_closure_fn_t.h
- DEPENDS
- .posix_tnode
+add_header(__action_closure_fn_t
+ HDR
+ __action_closure_fn_t.h
+ DEPENDS
+ .posix_tnode
.VISIT
)
-add_header(__action_fn_t
- HDR
- __action_fn_t.h
- DEPENDS
- .posix_tnode
+add_header(__action_fn_t
+ HDR
+ __action_fn_t.h
+ DEPENDS
+ .posix_tnode
.VISIT
)
add_header(__free_fn_t HDR __free_fn_t.h)
diff --git a/libc/lib/CMakeLists.txt b/libc/lib/CMakeLists.txt
index a12c020a2aae8..f10c6c43fc0d1 100644
--- a/libc/lib/CMakeLists.txt
+++ b/libc/lib/CMakeLists.txt
@@ -5,7 +5,7 @@ if(LLVM_LIBC_FULL_BUILD)
list(APPEND libc_archive_names c m mvec)
list(APPEND libc_archive_targets libc libm libmvec)
list(APPEND libc_archive_entrypoint_lists
- TARGET_LIBC_ENTRYPOINTS TARGET_LIBM_ENTRYPOINTS TARGET_LIBMVEC_ENTRYPOINTS)
+ TARGET_LIBC_ENTRYPOINTS TARGET_LIBM_ENTRYPOINTS TARGET_LIBMVEC_ENTRYPOINTS)
else()
list(APPEND libc_archive_names llvmlibc)
list(APPEND libc_archive_targets libc)
@@ -15,7 +15,7 @@ endif()
set(added_archive_targets "")
set(added_bitcode_targets "")
foreach(archive IN ZIP_LISTS
- libc_archive_names libc_archive_targets libc_archive_entrypoint_lists)
+ libc_archive_names libc_archive_targets libc_archive_entrypoint_lists)
if(NOT ${archive_2})
# If an entrypoint list is missing, then skip adding targets for it.
continue()
@@ -64,9 +64,9 @@ install(
foreach(file ${added_bitcode_targets})
install(FILES $<TARGET_PROPERTY:${file},TARGET_FILE>
- DESTINATION ${LIBC_INSTALL_LIBRARY_DIR}
- RENAME $<TARGET_PROPERTY:${file},OUTPUT_NAME>
- COMPONENT libc
+ DESTINATION ${LIBC_INSTALL_LIBRARY_DIR}
+ RENAME $<TARGET_PROPERTY:${file},OUTPUT_NAME>
+ COMPONENT libc
)
endforeach()
@@ -107,21 +107,21 @@ if(LLVM_LIBC_FULL_BUILD)
endif()
add_custom_target(install-libc
- DEPENDS ${added_archive_targets}
- ${added_bitcode_targets}
- ${added_empty_archives}
- ${startup_target}
- ${header_install_target}
- COMMAND "${CMAKE_COMMAND}"
- -DCMAKE_INSTALL_COMPONENT=libc
- -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
+ DEPENDS ${added_archive_targets}
+ ${added_bitcode_targets}
+ ${added_empty_archives}
+ ${startup_target}
+ ${header_install_target}
+ COMMAND "${CMAKE_COMMAND}"
+ -DCMAKE_INSTALL_COMPONENT=libc
+ -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
add_custom_target(install-libc-stripped
- DEPENDS ${added_archive_targets}
- ${added_bitcode_targets}
- ${added_empty_archives}
- ${startup_target}
- ${header_install_target}
- COMMAND "${CMAKE_COMMAND}"
- -DCMAKE_INSTALL_COMPONENT=libc
- -DCMAKE_INSTALL_DO_STRIP=1
- -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
+ DEPENDS ${added_archive_targets}
+ ${added_bitcode_targets}
+ ${added_empty_archives}
+ ${startup_target}
+ ${header_install_target}
+ COMMAND "${CMAKE_COMMAND}"
+ -DCMAKE_INSTALL_COMPONENT=libc
+ -DCMAKE_INSTALL_DO_STRIP=1
+ -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
diff --git a/libc/shared/CMakeLists.txt b/libc/shared/CMakeLists.txt
index d27484909f652..1237254aeebfe 100644
--- a/libc/shared/CMakeLists.txt
+++ b/libc/shared/CMakeLists.txt
@@ -1,16 +1,16 @@
set(LLVM_LIBC_SHARED_RPC_EXPORT_HEADERS
- "${CMAKE_CURRENT_SOURCE_DIR}/rpc.h"
- "${CMAKE_CURRENT_SOURCE_DIR}/rpc_util.h"
- "${CMAKE_CURRENT_SOURCE_DIR}/rpc_dispatch.h"
- "${CMAKE_CURRENT_SOURCE_DIR}/rpc_server.h"
- "${CMAKE_CURRENT_SOURCE_DIR}/rpc_opcodes.h"
+ "${CMAKE_CURRENT_SOURCE_DIR}/rpc.h"
+ "${CMAKE_CURRENT_SOURCE_DIR}/rpc_util.h"
+ "${CMAKE_CURRENT_SOURCE_DIR}/rpc_dispatch.h"
+ "${CMAKE_CURRENT_SOURCE_DIR}/rpc_server.h"
+ "${CMAKE_CURRENT_SOURCE_DIR}/rpc_opcodes.h"
)
# Install the freestanding RPC interface to the compiler tree.
if(LIBC_TARGET_OS_IS_GPU)
foreach(header_path IN LISTS LLVM_LIBC_SHARED_RPC_EXPORT_HEADERS)
install(FILES "${header_path}"
- DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/shared"
- COMPONENT libc-headers)
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/shared"
+ COMPONENT libc-headers)
endforeach()
endif()
diff --git a/libc/src/__support/CMakeLists.txt b/libc/src/__support/CMakeLists.txt
index 12761e6a524b9..17bedd1a428ae 100644
--- a/libc/src/__support/CMakeLists.txt
+++ b/libc/src/__support/CMakeLists.txt
@@ -162,10 +162,10 @@ list(APPEND wctype_utils_deps
libc.hdr.types.wchar_t
)
-if ("${LIBC_CONF_WCTYPE_MODE}" STREQUAL "LIBC_WCTYPE_MODE_UTF8")
+if("${LIBC_CONF_WCTYPE_MODE}" STREQUAL "LIBC_WCTYPE_MODE_UTF8")
list(APPEND wctype_utils_deps
- libc.src.__support.wctype.wctype_classification_utils
- libc.src.__support.wctype.wctype_conversion_utils
+ libc.src.__support.wctype.wctype_classification_utils
+ libc.src.__support.wctype.wctype_conversion_utils
)
endif()
diff --git a/libc/src/__support/File/CMakeLists.txt b/libc/src/__support/File/CMakeLists.txt
index 7fcca3c139788..f369fec9a915c 100644
--- a/libc/src/__support/File/CMakeLists.txt
+++ b/libc/src/__support/File/CMakeLists.txt
@@ -1,5 +1,5 @@
if(NOT (TARGET libc.src.__support.threads.mutex)
- OR LIBC_TARGET_OS_IS_GPU)
+ OR LIBC_TARGET_OS_IS_GPU)
# Not all platforms have a mutex implementation. If mutex is unvailable,
# we just skip everything about files.
return()
diff --git a/libc/src/__support/HashTable/CMakeLists.txt b/libc/src/__support/HashTable/CMakeLists.txt
index 6dfe2391e7316..f6494dc6e877e 100644
--- a/libc/src/__support/HashTable/CMakeLists.txt
+++ b/libc/src/__support/HashTable/CMakeLists.txt
@@ -12,7 +12,7 @@ add_header_library(
)
list(FIND TARGET_ENTRYPOINT_NAME_LIST getrandom getrandom_index)
-if (NOT ${getrandom_index} EQUAL -1)
+if(NOT ${getrandom_index} EQUAL -1)
message(STATUS "Using getrandom for hashtable randomness")
libc_set_definition(randomness_compile_flags LIBC_HASHTABLE_USE_GETRANDOM)
set(randomness_extra_depends
diff --git a/libc/src/__support/OSUtil/darwin/CMakeLists.txt b/libc/src/__support/OSUtil/darwin/CMakeLists.txt
index 9e69bf7d0cbab..c0420e554dc4b 100644
--- a/libc/src/__support/OSUtil/darwin/CMakeLists.txt
+++ b/libc/src/__support/OSUtil/darwin/CMakeLists.txt
@@ -12,7 +12,7 @@ add_object_library(
io.h
syscall.h
DEPENDS
- .${LIBC_TARGET_ARCHITECTURE}.darwin_${LIBC_TARGET_ARCHITECTURE}_util
+ .${LIBC_TARGET_ARCHITECTURE}.darwin_${LIBC_TARGET_ARCHITECTURE}_util
libc.src.__support.common
libc.src.__support.CPP.string_view
libc.include.sys_syscall
diff --git a/libc/src/__support/math/CMakeLists.txt b/libc/src/__support/math/CMakeLists.txt
index 9f4624682eafe..7945c12e388a7 100644
--- a/libc/src/__support/math/CMakeLists.txt
+++ b/libc/src/__support/math/CMakeLists.txt
@@ -4457,7 +4457,7 @@ add_header_library(
)
add_header_library(
- nexttoward
+ nexttoward
HDRS
nexttoward.h
DEPENDS
diff --git a/libc/src/__support/printf_core/CMakeLists.txt b/libc/src/__support/printf_core/CMakeLists.txt
index a2e47e778a8c7..3617bb7ac1ea2 100644
--- a/libc/src/__support/printf_core/CMakeLists.txt
+++ b/libc/src/__support/printf_core/CMakeLists.txt
@@ -48,7 +48,7 @@ endif()
set(target_error_mapper libc.src.__support.printf_core.${LIBC_TARGET_OS}.error_mapper)
if(NOT TARGET ${target_error_mapper})
- set(target_error_mapper libc.src.__support.printf_core.generic.error_mapper)
+ set(target_error_mapper libc.src.__support.printf_core.generic.error_mapper)
endif()
if(LIBC_CONF_PRINTF_DISABLE_WIDE)
@@ -74,7 +74,7 @@ add_header_library(
printf_config
HDRS
printf_config.h
- ${printf_config_copts}
+ ${printf_config_copts}
)
add_header_library(
@@ -212,6 +212,5 @@ add_header_library(
libc.src.__support.arg_list
libc.src.__support.printf_core.printf_main
libc.src.__support.printf_core.writer
- ${use_system_file}
+ ${use_system_file}
)
-
diff --git a/libc/src/__support/threads/CMakeLists.txt b/libc/src/__support/threads/CMakeLists.txt
index cc51b4f239b89..100346a84b7c2 100644
--- a/libc/src/__support/threads/CMakeLists.txt
+++ b/libc/src/__support/threads/CMakeLists.txt
@@ -169,7 +169,7 @@ if(TARGET libc.src.__support.threads.futex_utils)
)
endif()
-if (LLVM_LIBC_FULL_BUILD)
+if(LLVM_LIBC_FULL_BUILD)
set(identifier_dependency_on_thread libc.src.__support.threads.thread)
endif()
diff --git a/libc/src/__support/threads/linux/CMakeLists.txt b/libc/src/__support/threads/linux/CMakeLists.txt
index 14d57299dfd3f..7d349f6d9bd00 100644
--- a/libc/src/__support/threads/linux/CMakeLists.txt
+++ b/libc/src/__support/threads/linux/CMakeLists.txt
@@ -56,9 +56,9 @@ add_object_library(
COMPILE_OPTIONS
${libc_opt_high_flag}
-fno-omit-frame-pointer # This allows us to sniff out the thread args from
- # the new thread's stack reliably.
- -Wno-frame-address # Yes, calling __builtin_return_address with a
- # value other than 0 is dangerous. We know.
+ # the new thread's stack reliably.
+ -Wno-frame-address # Yes, calling __builtin_return_address with a
+ # value other than 0 is dangerous. We know.
)
add_header_library(
diff --git a/libc/src/__support/time/CMakeLists.txt b/libc/src/__support/time/CMakeLists.txt
index f007f95bbee42..00d7dba572fc7 100644
--- a/libc/src/__support/time/CMakeLists.txt
+++ b/libc/src/__support/time/CMakeLists.txt
@@ -8,7 +8,7 @@ add_header_library(
)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS}
- AND TARGET libc.src.__support.OSUtil.osutil)
+ AND TARGET libc.src.__support.OSUtil.osutil)
add_subdirectory(${LIBC_TARGET_OS})
else()
message(STATUS "Skip libc.src.__support.time.* targets.")
@@ -31,7 +31,7 @@ add_header_library(
libc.src.__support.time.units
)
-if(TARGET libc.src.__support.time.${LIBC_TARGET_OS}.clock_settime)
+if(TARGET libc.src.__support.time.${LIBC_TARGET_OS}.clock_settime)
add_object_library(
clock_settime
ALIAS
diff --git a/libc/src/__support/wchar/CMakeLists.txt b/libc/src/__support/wchar/CMakeLists.txt
index ce42fc3bef202..32f1a2ec7e068 100644
--- a/libc/src/__support/wchar/CMakeLists.txt
+++ b/libc/src/__support/wchar/CMakeLists.txt
@@ -19,7 +19,7 @@ add_header_library(
libc.src.__support.CPP.type_traits
libc.src.__support.error_or
.mbstate
- .character_converter
+ .character_converter
)
add_header_library(
diff --git a/libc/src/__support/wctype/CMakeLists.txt b/libc/src/__support/wctype/CMakeLists.txt
index 64708fe6a40da..bb67e72d001c9 100644
--- a/libc/src/__support/wctype/CMakeLists.txt
+++ b/libc/src/__support/wctype/CMakeLists.txt
@@ -66,4 +66,3 @@ add_object_library(
.lower_to_upper
.upper_to_lower
)
-
diff --git a/libc/src/complex/CMakeLists.txt b/libc/src/complex/CMakeLists.txt
index 5f334dd0be462..b43792a72e1f9 100644
--- a/libc/src/complex/CMakeLists.txt
+++ b/libc/src/complex/CMakeLists.txt
@@ -41,4 +41,3 @@ add_complex_entrypoint_object(cabs)
add_complex_entrypoint_object(cabsf)
add_complex_entrypoint_object(carg)
add_complex_entrypoint_object(cargf)
-
diff --git a/libc/src/ctype/CMakeLists.txt b/libc/src/ctype/CMakeLists.txt
index 68e982bd4529e..d0469828a155e 100644
--- a/libc/src/ctype/CMakeLists.txt
+++ b/libc/src/ctype/CMakeLists.txt
@@ -115,7 +115,7 @@ add_entrypoint_object(
HDRS
isupper.h
DEPENDS
- libc.src.__support.CPP.limits
+ libc.src.__support.CPP.limits
libc.src.__support.ctype_utils
)
@@ -285,7 +285,7 @@ add_entrypoint_object(
HDRS
isupper_l.h
DEPENDS
- libc.src.__support.CPP.limits
+ libc.src.__support.CPP.limits
libc.src.__support.ctype_utils
libc.hdr.types.locale_t
)
diff --git a/libc/src/dirent/CMakeLists.txt b/libc/src/dirent/CMakeLists.txt
index ea17bd4cfbba3..d0ec22e1cc75b 100644
--- a/libc/src/dirent/CMakeLists.txt
+++ b/libc/src/dirent/CMakeLists.txt
@@ -62,4 +62,3 @@ add_entrypoint_object(
libc.src.__support.File.dir
libc.src.errno.errno
)
-
diff --git a/libc/src/inttypes/CMakeLists.txt b/libc/src/inttypes/CMakeLists.txt
index 4860ed838bc85..ba8b6058b2c9f 100644
--- a/libc/src/inttypes/CMakeLists.txt
+++ b/libc/src/inttypes/CMakeLists.txt
@@ -69,4 +69,3 @@ add_entrypoint_object(
libc.src.__support.str_to_integer
libc.src.errno.errno
)
-
diff --git a/libc/src/math/CMakeLists.txt b/libc/src/math/CMakeLists.txt
index 8c9a184ca517f..9fc4232807c4a 100644
--- a/libc/src/math/CMakeLists.txt
+++ b/libc/src/math/CMakeLists.txt
@@ -51,7 +51,7 @@ add_math_entrypoint_object(acoshf16)
add_math_entrypoint_object(acospif)
add_math_entrypoint_object(acospif16)
-
+
add_math_entrypoint_object(asin)
add_math_entrypoint_object(asinbf16)
add_math_entrypoint_object(asinf)
diff --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt
index d5661f6f55e91..1a81f84db853d 100644
--- a/libc/src/math/generic/CMakeLists.txt
+++ b/libc/src/math/generic/CMakeLists.txt
@@ -165,7 +165,7 @@ add_entrypoint_object(
)
add_entrypoint_object(
- ceilbf16
+ ceilbf16
SRCS
ceilbf16.cpp
HDRS
@@ -190,7 +190,7 @@ add_entrypoint_object(
daddf128.cpp
HDRS
../daddf128.h
- DEPENDS
+ DEPENDS
libc.src.__support.math.daddf128
)
@@ -607,7 +607,7 @@ add_entrypoint_object(
)
add_entrypoint_object(
- truncbf16
+ truncbf16
SRCS
truncbf16.cpp
HDRS
@@ -667,7 +667,7 @@ add_entrypoint_object(
)
add_entrypoint_object(
- floorbf16
+ floorbf16
SRCS
floorbf16.cpp
HDRS
@@ -727,7 +727,7 @@ add_entrypoint_object(
)
add_entrypoint_object(
- roundbf16
+ roundbf16
SRCS
roundbf16.cpp
HDRS
@@ -4752,7 +4752,7 @@ add_entrypoint_object(
libc.src.__support.math.cbrt
)
-add_entrypoint_object (
+add_entrypoint_object(
cbrtbf16
SRCS
cbrtbf16.cpp
diff --git a/libc/src/nl_types/CMakeLists.txt b/libc/src/nl_types/CMakeLists.txt
index 9783e0ecb9678..6948267413ca3 100644
--- a/libc/src/nl_types/CMakeLists.txt
+++ b/libc/src/nl_types/CMakeLists.txt
@@ -28,4 +28,3 @@ add_entrypoint_object(
DEPENDS
libc.include.llvm-libc-types.nl_catd
)
-
diff --git a/libc/src/setjmp/CMakeLists.txt b/libc/src/setjmp/CMakeLists.txt
index 8b8e74f0955eb..f703c69293e5a 100644
--- a/libc/src/setjmp/CMakeLists.txt
+++ b/libc/src/setjmp/CMakeLists.txt
@@ -29,7 +29,7 @@ add_entrypoint_object(
.${LIBC_TARGET_ARCHITECTURE}.longjmp
)
-if (TARGET libc.src.setjmp.sigsetjmp_epilogue)
+if(TARGET libc.src.setjmp.sigsetjmp_epilogue)
add_entrypoint_object(
siglongjmp
SRCS
diff --git a/libc/src/setjmp/arm/CMakeLists.txt b/libc/src/setjmp/arm/CMakeLists.txt
index 7a48da3d29e0e..fdffef053ed38 100644
--- a/libc/src/setjmp/arm/CMakeLists.txt
+++ b/libc/src/setjmp/arm/CMakeLists.txt
@@ -8,7 +8,7 @@ add_entrypoint_object(
libc.hdr.types.jmp_buf
)
-if (TARGET libc.src.setjmp.sigsetjmp_epilogue)
+if(TARGET libc.src.setjmp.sigsetjmp_epilogue)
add_entrypoint_object(
sigsetjmp
SRCS
diff --git a/libc/src/setjmp/riscv/CMakeLists.txt b/libc/src/setjmp/riscv/CMakeLists.txt
index ee3ea28c47a0a..00fd0d610f24d 100644
--- a/libc/src/setjmp/riscv/CMakeLists.txt
+++ b/libc/src/setjmp/riscv/CMakeLists.txt
@@ -11,7 +11,7 @@ add_entrypoint_object(
-fomit-frame-pointer
)
-if (TARGET libc.src.setjmp.sigsetjmp_epilogue)
+if(TARGET libc.src.setjmp.sigsetjmp_epilogue)
add_entrypoint_object(
sigsetjmp
SRCS
diff --git a/libc/src/setjmp/x86_64/CMakeLists.txt b/libc/src/setjmp/x86_64/CMakeLists.txt
index 5f87bc6cbbbfb..a2653b714555c 100644
--- a/libc/src/setjmp/x86_64/CMakeLists.txt
+++ b/libc/src/setjmp/x86_64/CMakeLists.txt
@@ -8,7 +8,7 @@ add_entrypoint_object(
libc.hdr.offsetof_macros
libc.hdr.types.jmp_buf
)
-if (TARGET libc.src.setjmp.sigsetjmp_epilogue)
+if(TARGET libc.src.setjmp.sigsetjmp_epilogue)
add_entrypoint_object(
sigsetjmp
SRCS
diff --git a/libc/src/stdio/CMakeLists.txt b/libc/src/stdio/CMakeLists.txt
index 0e3fe55462e03..cfbe67e825aa3 100644
--- a/libc/src/stdio/CMakeLists.txt
+++ b/libc/src/stdio/CMakeLists.txt
@@ -16,7 +16,7 @@ function(add_stdio_entrypoint_object name)
.generic.${name}
)
endif()
-endfunction(add_stdio_entrypoint_object)
+endfunction()
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS})
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS})
diff --git a/libc/src/stdio/generic/CMakeLists.txt b/libc/src/stdio/generic/CMakeLists.txt
index 6b3b611ad731f..b6bb41b5053a3 100644
--- a/libc/src/stdio/generic/CMakeLists.txt
+++ b/libc/src/stdio/generic/CMakeLists.txt
@@ -8,7 +8,7 @@ function(add_generic_entrypoint_object name)
${ARGN}
)
endif()
-endfunction(add_generic_entrypoint_object)
+endfunction()
add_generic_entrypoint_object(
clearerr
@@ -408,19 +408,19 @@ add_generic_entrypoint_object(
)
list(APPEND fprintf_deps
- libc.hdr.types.FILE
- libc.src.__support.arg_list
- libc.src.__support.CPP.limits
- libc.src.__support.libc_errno
- libc.src.__support.printf_core.vfprintf_internal
- libc.src.__support.printf_core.core_structs
- libc.src.__support.printf_core.error_mapper
+ libc.hdr.types.FILE
+ libc.src.__support.arg_list
+ libc.src.__support.CPP.limits
+ libc.src.__support.libc_errno
+ libc.src.__support.printf_core.vfprintf_internal
+ libc.src.__support.printf_core.core_structs
+ libc.src.__support.printf_core.error_mapper
)
if(LLVM_LIBC_FULL_BUILD)
list(APPEND fprintf_deps
- libc.src.__support.File.file
- libc.src.__support.File.platform_file
+ libc.src.__support.File.file
+ libc.src.__support.File.platform_file
)
endif()
@@ -429,11 +429,11 @@ set(printf_deps ${fprintf_deps})
if(LLVM_LIBC_FULL_BUILD)
list(APPEND printf_deps
- libc.src.stdio.stdout
+ libc.src.stdio.stdout
)
endif()
-if (LIBC_CONF_PRINTF_MODULAR AND NOT LIBC_TARGET_OS_IS_BAREMETAL)
+if(LIBC_CONF_PRINTF_MODULAR AND NOT LIBC_TARGET_OS_IS_BAREMETAL)
message(FATAL_ERROR "modular printf is only supported in baremetal stdio")
endif()
@@ -478,16 +478,16 @@ add_generic_entrypoint_object(
)
list(APPEND scanf_deps
- libc.src.__support.arg_list
- libc.src.stdio.scanf_core.vfscanf_internal
- libc.hdr.types.FILE
+ libc.src.__support.arg_list
+ libc.src.stdio.scanf_core.vfscanf_internal
+ libc.hdr.types.FILE
)
if(LLVM_LIBC_FULL_BUILD AND NOT LIBC_TARGET_OS_IS_GPU)
list(APPEND scanf_deps
- libc.src.__support.File.file
- libc.src.__support.File.platform_file
- libc.src.stdio.stdin
+ libc.src.__support.File.file
+ libc.src.__support.File.platform_file
+ libc.src.stdio.stdin
)
endif()
diff --git a/libc/src/stdio/gpu/CMakeLists.txt b/libc/src/stdio/gpu/CMakeLists.txt
index 2aea66482997f..b55b6d3ee3cbe 100644
--- a/libc/src/stdio/gpu/CMakeLists.txt
+++ b/libc/src/stdio/gpu/CMakeLists.txt
@@ -1,4 +1,4 @@
-if (LIBC_CONF_PRINTF_MODULAR)
+if(LIBC_CONF_PRINTF_MODULAR)
message(FATAL_ERROR "modular printf is only supported in baremetal stdio")
endif()
diff --git a/libc/src/stdio/scanf_core/CMakeLists.txt b/libc/src/stdio/scanf_core/CMakeLists.txt
index 78d0354365102..fd68f5d21ae7f 100644
--- a/libc/src/stdio/scanf_core/CMakeLists.txt
+++ b/libc/src/stdio/scanf_core/CMakeLists.txt
@@ -25,7 +25,7 @@ add_header_library(
scanf_config
HDRS
scanf_config.h
- ${scanf_config_copts}
+ ${scanf_config_copts}
)
add_header_library(
@@ -64,7 +64,7 @@ add_header_library(
.converter
.core_structs
libc.src.__support.arg_list
- ${use_system_file}
+ ${use_system_file}
)
add_header_library(
@@ -105,18 +105,18 @@ add_header_library(
libc.src.__support.CPP.limits
libc.src.__support.char_vector
libc.src.__support.str_to_float
- ${use_system_file}
+ ${use_system_file}
)
-#TODO: condense the file-related code as possible.
+# TODO: condense the file-related code as possible.
add_header_library(
- vfscanf_internal
- HDRS
- vfscanf_internal.h
- DEPENDS
- .reader
- .scanf_main
- libc.src.__support.arg_list
- ${file_deps}
+ vfscanf_internal
+ HDRS
+ vfscanf_internal.h
+ DEPENDS
+ .reader
+ .scanf_main
+ libc.src.__support.arg_list
+ ${file_deps}
${use_system_file}
)
diff --git a/libc/src/stdlib/CMakeLists.txt b/libc/src/stdlib/CMakeLists.txt
index 64743cd5295aa..a0e8cd356a212 100644
--- a/libc/src/stdlib/CMakeLists.txt
+++ b/libc/src/stdlib/CMakeLists.txt
@@ -70,11 +70,11 @@ add_entrypoint_object(
# GCC-12 crashed when building environ_internal during GIMPLE pass: waccess.
set(environ_internal_gcc12_workaround "")
if((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") AND
- (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "12") AND
- (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "13"))
+ (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "12") AND
+ (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "13"))
set(environ_internal_gcc12_workaround "-Wno-stringop-overflow"
- "-fdisable-tree-waccess1" "-fdisable-tree-waccess2"
- "-fdisable-tree-waccess3")
+ "-fdisable-tree-waccess1" "-fdisable-tree-waccess2"
+ "-fdisable-tree-waccess3")
endif()
set(environ_internal_deps
@@ -340,7 +340,7 @@ add_header_library(
libc.hdr.stdint_proxy
libc.include.stdlib
libc.src.__support.CPP.cstddef
- libc.src.string.memory_utils.inline_memcpy
+ libc.src.string.memory_utils.inline_memcpy
)
add_entrypoint_object(
@@ -509,7 +509,7 @@ if(NOT LIBC_TARGET_OS_IS_BAREMETAL AND NOT LIBC_TARGET_OS_IS_GPU)
# scudo distinguishes riscv32 and riscv64, so we need to translate the architecture
# set(LIBC_TARGET_ARCHITECTURE_FOR_SCUDO ${LIBC_TARGET_ARCHITECTURE})
- if (LIBC_TARGET_OS_IS_DARWIN AND (LIBC_TARGET_ARCHITECTURE STREQUAL "arm"))
+ if(LIBC_TARGET_OS_IS_DARWIN AND (LIBC_TARGET_ARCHITECTURE STREQUAL "arm"))
set(LIBC_TARGET_ARCHITECTURE_FOR_SCUDO arm64)
else()
set(LIBC_TARGET_ARCHITECTURE_FOR_SCUDO ${LIBC_TARGET_ARCHITECTURE})
@@ -526,14 +526,14 @@ if(NOT LIBC_TARGET_OS_IS_BAREMETAL AND NOT LIBC_TARGET_OS_IS_GPU)
endif()
list(APPEND SCUDO_DEPS RTScudoStandalone.${LIBC_TARGET_ARCHITECTURE_FOR_SCUDO}
- RTScudoStandaloneCWrappers.${LIBC_TARGET_ARCHITECTURE_FOR_SCUDO})
+ RTScudoStandaloneCWrappers.${LIBC_TARGET_ARCHITECTURE_FOR_SCUDO})
- if (COMPILER_RT_BUILD_GWP_ASAN)
+ if(COMPILER_RT_BUILD_GWP_ASAN)
list(APPEND SCUDO_DEPS
RTGwpAsan.${LIBC_TARGET_ARCHITECTURE_FOR_SCUDO}
RTGwpAsanBacktraceLibc.${LIBC_TARGET_ARCHITECTURE_FOR_SCUDO}
RTGwpAsanSegvHandler.${LIBC_TARGET_ARCHITECTURE_FOR_SCUDO}
- )
+ )
endif()
add_entrypoint_external(
@@ -762,18 +762,18 @@ add_entrypoint_object(
# TODO: Move all exit functions to linux specific
if(TARGET libc.src.__support.threads.mutex)
-add_header_library(
- exit_handler
- HDRS
- exit_handler.h
- DEPENDS
- libc.src.__support.CPP.mutex
- libc.src.__support.CPP.new
- libc.src.__support.OSUtil.osutil
- libc.src.__support.blockstore
- libc.src.__support.fixedvector
- libc.src.__support.threads.mutex
-)
+ add_header_library(
+ exit_handler
+ HDRS
+ exit_handler.h
+ DEPENDS
+ libc.src.__support.CPP.mutex
+ libc.src.__support.CPP.new
+ libc.src.__support.OSUtil.osutil
+ libc.src.__support.blockstore
+ libc.src.__support.fixedvector
+ libc.src.__support.threads.mutex
+ )
endif()
add_entrypoint_object(
@@ -805,7 +805,7 @@ list(APPEND exit_deps
libc.src.__support.OSUtil.osutil
._Exit
)
-if (NOT LIBC_TARGET_OS_IS_BAREMETAL)
+if(NOT LIBC_TARGET_OS_IS_BAREMETAL)
list(APPEND exit_deps
.atexit
)
diff --git a/libc/src/string/CMakeLists.txt b/libc/src/string/CMakeLists.txt
index e28fe7af8cf25..7c132c9360d0b 100644
--- a/libc/src/string/CMakeLists.txt
+++ b/libc/src/string/CMakeLists.txt
@@ -158,7 +158,7 @@ add_entrypoint_object(
SRCS
strcoll_l.cpp
HDRS
- strcoll_l.h
+ strcoll_l.h
)
add_entrypoint_object(
@@ -444,19 +444,19 @@ function(add_memcmp memcmp_name)
endfunction()
if(${LIBC_TARGET_ARCHITECTURE_IS_X86_64})
- add_memcmp(memcmp_x86_64_opt_sse2 COMPILE_OPTIONS -march=k8 REQUIRE SSE2)
- add_memcmp(memcmp_x86_64_opt_sse4 COMPILE_OPTIONS -march=nehalem REQUIRE SSE4_2)
- add_memcmp(memcmp_x86_64_opt_avx2 COMPILE_OPTIONS -march=haswell REQUIRE AVX2)
+ add_memcmp(memcmp_x86_64_opt_sse2 COMPILE_OPTIONS -march=k8 REQUIRE SSE2)
+ add_memcmp(memcmp_x86_64_opt_sse4 COMPILE_OPTIONS -march=nehalem REQUIRE SSE4_2)
+ add_memcmp(memcmp_x86_64_opt_avx2 COMPILE_OPTIONS -march=haswell REQUIRE AVX2)
add_memcmp(memcmp_x86_64_opt_avx512 COMPILE_OPTIONS -march=skylake-avx512 REQUIRE AVX512BW)
- add_memcmp(memcmp_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE})
+ add_memcmp(memcmp_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE})
add_memcmp(memcmp)
elseif(${LIBC_TARGET_ARCHITECTURE_IS_AARCH64})
- add_memcmp(memcmp_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE})
+ add_memcmp(memcmp_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE})
add_memcmp(memcmp)
elseif(LIBC_TARGET_OS_IS_GPU)
add_memcmp(memcmp)
else()
- add_memcmp(memcmp_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE})
+ add_memcmp(memcmp_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE})
add_memcmp(memcmp)
endif()
@@ -476,23 +476,23 @@ function(add_memcpy memcpy_name)
endfunction()
if(${LIBC_TARGET_ARCHITECTURE_IS_X86_64})
- add_memcpy(memcpy_x86_64_opt_sse2 COMPILE_OPTIONS -march=k8 REQUIRE SSE2)
- add_memcpy(memcpy_x86_64_opt_sse4 COMPILE_OPTIONS -march=nehalem REQUIRE SSE4_2)
- add_memcpy(memcpy_x86_64_opt_avx COMPILE_OPTIONS -march=sandybridge REQUIRE AVX)
+ add_memcpy(memcpy_x86_64_opt_sse2 COMPILE_OPTIONS -march=k8 REQUIRE SSE2)
+ add_memcpy(memcpy_x86_64_opt_sse4 COMPILE_OPTIONS -march=nehalem REQUIRE SSE4_2)
+ add_memcpy(memcpy_x86_64_opt_avx COMPILE_OPTIONS -march=sandybridge REQUIRE AVX)
add_memcpy(memcpy_x86_64_opt_avx512 COMPILE_OPTIONS -march=skylake-avx512 REQUIRE AVX512F)
- add_memcpy(memcpy_x86_64_opt_sw_prefetch_sse4 COMPILE_OPTIONS -DLIBC_COPT_MEMCPY_X86_USE_SOFTWARE_PREFETCHING -march=nehalem REQUIRE SSE4_2)
- add_memcpy(memcpy_x86_64_opt_sw_prefetch_avx COMPILE_OPTIONS -DLIBC_COPT_MEMCPY_X86_USE_SOFTWARE_PREFETCHING -march=sandybridge REQUIRE AVX)
- add_memcpy(memcpy_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE})
+ add_memcpy(memcpy_x86_64_opt_sw_prefetch_sse4 COMPILE_OPTIONS -DLIBC_COPT_MEMCPY_X86_USE_SOFTWARE_PREFETCHING -march=nehalem REQUIRE SSE4_2)
+ add_memcpy(memcpy_x86_64_opt_sw_prefetch_avx COMPILE_OPTIONS -DLIBC_COPT_MEMCPY_X86_USE_SOFTWARE_PREFETCHING -march=sandybridge REQUIRE AVX)
+ add_memcpy(memcpy_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE})
add_memcpy(memcpy)
elseif(${LIBC_TARGET_ARCHITECTURE_IS_AARCH64})
# Disable tail merging as it leads to lower performance.
- add_memcpy(memcpy_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE}
- MLLVM_COMPILE_OPTIONS "-tail-merge-threshold=0")
- add_memcpy(memcpy MLLVM_COMPILE_OPTIONS "-tail-merge-threshold=0")
+ add_memcpy(memcpy_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE}
+ MLLVM_COMPILE_OPTIONS "-tail-merge-threshold=0")
+ add_memcpy(memcpy MLLVM_COMPILE_OPTIONS "-tail-merge-threshold=0")
elseif(LIBC_TARGET_OS_IS_GPU)
add_memcpy(memcpy)
else()
- add_memcpy(memcpy_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE})
+ add_memcpy(memcpy_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE})
add_memcpy(memcpy)
endif()
@@ -512,21 +512,21 @@ function(add_memmove memmove_name)
endfunction()
if(${LIBC_TARGET_ARCHITECTURE_IS_X86_64})
- add_memmove(memmove_x86_64_opt_sse2 COMPILE_OPTIONS -march=k8 REQUIRE SSE2)
- add_memmove(memmove_x86_64_opt_sse4 COMPILE_OPTIONS -march=nehalem REQUIRE SSE4_2)
- add_memmove(memmove_x86_64_opt_avx2 COMPILE_OPTIONS -march=haswell REQUIRE AVX2)
+ add_memmove(memmove_x86_64_opt_sse2 COMPILE_OPTIONS -march=k8 REQUIRE SSE2)
+ add_memmove(memmove_x86_64_opt_sse4 COMPILE_OPTIONS -march=nehalem REQUIRE SSE4_2)
+ add_memmove(memmove_x86_64_opt_avx2 COMPILE_OPTIONS -march=haswell REQUIRE AVX2)
add_memmove(memmove_x86_64_opt_avx512 COMPILE_OPTIONS -march=skylake-avx512 REQUIRE AVX512F)
- add_memmove(memmove_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE})
+ add_memmove(memmove_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE})
add_memmove(memmove)
elseif(${LIBC_TARGET_ARCHITECTURE_IS_AARCH64})
# Disable tail merging as it leads to lower performance.
- add_memmove(memmove_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE}
- MLLVM_COMPILE_OPTIONS "-tail-merge-threshold=0")
- add_memmove(memmove MLLVM_COMPILE_OPTIONS "-tail-merge-threshold=0")
+ add_memmove(memmove_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE}
+ MLLVM_COMPILE_OPTIONS "-tail-merge-threshold=0")
+ add_memmove(memmove MLLVM_COMPILE_OPTIONS "-tail-merge-threshold=0")
elseif(LIBC_TARGET_OS_IS_GPU)
add_memmove(memmove)
else()
- add_memmove(memmove_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE})
+ add_memmove(memmove_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE})
add_memmove(memmove)
endif()
@@ -546,21 +546,21 @@ function(add_memset memset_name)
endfunction()
if(${LIBC_TARGET_ARCHITECTURE_IS_X86_64})
- add_memset(memset_x86_64_opt_sse2 COMPILE_OPTIONS -march=k8 REQUIRE SSE2)
- add_memset(memset_x86_64_opt_sse4 COMPILE_OPTIONS -march=nehalem REQUIRE SSE4_2)
- add_memset(memset_x86_64_opt_avx2 COMPILE_OPTIONS -march=haswell REQUIRE AVX2)
+ add_memset(memset_x86_64_opt_sse2 COMPILE_OPTIONS -march=k8 REQUIRE SSE2)
+ add_memset(memset_x86_64_opt_sse4 COMPILE_OPTIONS -march=nehalem REQUIRE SSE4_2)
+ add_memset(memset_x86_64_opt_avx2 COMPILE_OPTIONS -march=haswell REQUIRE AVX2)
add_memset(memset_x86_64_opt_avx512 COMPILE_OPTIONS -march=skylake-avx512 REQUIRE AVX512F)
add_memset(memset_x86_64_opt_sw_prefetch COMPILE_OPTIONS -DLIBC_COPT_MEMSET_X86_USE_SOFTWARE_PREFETCHING)
- add_memset(memset_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE})
+ add_memset(memset_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE})
add_memset(memset)
elseif(${LIBC_TARGET_ARCHITECTURE_IS_AARCH64})
# Disable tail merging as it leads to lower performance.
- add_memset(memset_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE}
- MLLVM_COMPILE_OPTIONS "-tail-merge-threshold=0")
- add_memset(memset MLLVM_COMPILE_OPTIONS "-tail-merge-threshold=0")
+ add_memset(memset_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE}
+ MLLVM_COMPILE_OPTIONS "-tail-merge-threshold=0")
+ add_memset(memset MLLVM_COMPILE_OPTIONS "-tail-merge-threshold=0")
elseif(LIBC_TARGET_OS_IS_GPU)
add_memset(memset)
else()
- add_memset(memset_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE})
+ add_memset(memset_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE})
add_memset(memset)
endif()
diff --git a/libc/src/strings/CMakeLists.txt b/libc/src/strings/CMakeLists.txt
index ea1c932be0485..751a25fdd77d7 100644
--- a/libc/src/strings/CMakeLists.txt
+++ b/libc/src/strings/CMakeLists.txt
@@ -9,16 +9,16 @@ function(add_bcmp bcmp_name)
endfunction()
if(${LIBC_TARGET_ARCHITECTURE_IS_X86_64})
- add_bcmp(bcmp_x86_64_opt_sse2 COMPILE_OPTIONS -march=k8 REQUIRE SSE2)
- add_bcmp(bcmp_x86_64_opt_sse4 COMPILE_OPTIONS -march=nehalem REQUIRE SSE4_2)
- add_bcmp(bcmp_x86_64_opt_avx2 COMPILE_OPTIONS -march=haswell REQUIRE AVX2)
+ add_bcmp(bcmp_x86_64_opt_sse2 COMPILE_OPTIONS -march=k8 REQUIRE SSE2)
+ add_bcmp(bcmp_x86_64_opt_sse4 COMPILE_OPTIONS -march=nehalem REQUIRE SSE4_2)
+ add_bcmp(bcmp_x86_64_opt_avx2 COMPILE_OPTIONS -march=haswell REQUIRE AVX2)
add_bcmp(bcmp_x86_64_opt_avx512 COMPILE_OPTIONS -march=skylake-avx512 REQUIRE AVX512BW)
- add_bcmp(bcmp_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE})
+ add_bcmp(bcmp_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE})
add_bcmp(bcmp)
elseif(LIBC_TARGET_OS_IS_GPU)
add_bcmp(bcmp)
else()
- add_bcmp(bcmp_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE})
+ add_bcmp(bcmp_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE})
add_bcmp(bcmp)
endif()
@@ -33,16 +33,16 @@ function(add_bzero bzero_name)
endfunction()
if(${LIBC_TARGET_ARCHITECTURE_IS_X86_64})
- add_bzero(bzero_x86_64_opt_sse2 COMPILE_OPTIONS -march=k8 REQUIRE SSE2)
- add_bzero(bzero_x86_64_opt_sse4 COMPILE_OPTIONS -march=nehalem REQUIRE SSE4_2)
- add_bzero(bzero_x86_64_opt_avx2 COMPILE_OPTIONS -march=haswell REQUIRE AVX2)
+ add_bzero(bzero_x86_64_opt_sse2 COMPILE_OPTIONS -march=k8 REQUIRE SSE2)
+ add_bzero(bzero_x86_64_opt_sse4 COMPILE_OPTIONS -march=nehalem REQUIRE SSE4_2)
+ add_bzero(bzero_x86_64_opt_avx2 COMPILE_OPTIONS -march=haswell REQUIRE AVX2)
add_bzero(bzero_x86_64_opt_avx512 COMPILE_OPTIONS -march=skylake-avx512 REQUIRE AVX512F)
- add_bzero(bzero_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE})
+ add_bzero(bzero_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE})
add_bzero(bzero)
elseif(LIBC_TARGET_OS_IS_GPU)
add_bzero(bzero)
else()
- add_bzero(bzero_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE})
+ add_bzero(bzero_opt_host COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE})
add_bzero(bzero)
endif()
diff --git a/libc/src/sys/auxv/linux/CMakeLists.txt b/libc/src/sys/auxv/linux/CMakeLists.txt
index 39cfb7ba3f7ee..70b408ee368b7 100644
--- a/libc/src/sys/auxv/linux/CMakeLists.txt
+++ b/libc/src/sys/auxv/linux/CMakeLists.txt
@@ -1,7 +1,7 @@
add_entrypoint_object(
getauxval
SRCS
- getauxval.cpp
+ getauxval.cpp
HDRS
../getauxval.h
DEPENDS
diff --git a/libc/src/sys/mman/CMakeLists.txt b/libc/src/sys/mman/CMakeLists.txt
index ca18fe36449da..ab33af4568de0 100644
--- a/libc/src/sys/mman/CMakeLists.txt
+++ b/libc/src/sys/mman/CMakeLists.txt
@@ -132,7 +132,7 @@ add_entrypoint_object(
remap_file_pages
ALIAS
DEPENDS
- .${LIBC_TARGET_OS}.remap_file_pages
+ .${LIBC_TARGET_OS}.remap_file_pages
)
add_entrypoint_object(
diff --git a/libc/src/sys/sendfile/CMakeLists.txt b/libc/src/sys/sendfile/CMakeLists.txt
index c4d298851c725..2b9d36566c354 100644
--- a/libc/src/sys/sendfile/CMakeLists.txt
+++ b/libc/src/sys/sendfile/CMakeLists.txt
@@ -8,4 +8,3 @@ add_entrypoint_object(
DEPENDS
.${LIBC_TARGET_OS}.sendfile
)
-
diff --git a/libc/src/sys/statvfs/linux/CMakeLists.txt b/libc/src/sys/statvfs/linux/CMakeLists.txt
index a00d5a039406b..fef5c9d381c3c 100644
--- a/libc/src/sys/statvfs/linux/CMakeLists.txt
+++ b/libc/src/sys/statvfs/linux/CMakeLists.txt
@@ -38,4 +38,3 @@ add_entrypoint_object(
libc.include.sys_statvfs
.statfs_utils
)
-
diff --git a/libc/src/sys/time/CMakeLists.txt b/libc/src/sys/time/CMakeLists.txt
index da8b08cfe031e..c0b47a99adf7e 100644
--- a/libc/src/sys/time/CMakeLists.txt
+++ b/libc/src/sys/time/CMakeLists.txt
@@ -13,14 +13,14 @@ add_entrypoint_object(
setitimer
ALIAS
DEPENDS
- .${LIBC_TARGET_OS}.setitimer
+ .${LIBC_TARGET_OS}.setitimer
)
add_entrypoint_object(
getitimer
ALIAS
DEPENDS
- .${LIBC_TARGET_OS}.getitimer
+ .${LIBC_TARGET_OS}.getitimer
)
add_entrypoint_object(
diff --git a/libc/src/sys/time/linux/CMakeLists.txt b/libc/src/sys/time/linux/CMakeLists.txt
index 9e5b92cece041..e67a52e8a9c2c 100644
--- a/libc/src/sys/time/linux/CMakeLists.txt
+++ b/libc/src/sys/time/linux/CMakeLists.txt
@@ -24,7 +24,7 @@ add_entrypoint_object(
libc.hdr.types.struct_itimerval
libc.src.__support.OSUtil.linux.syscall_wrappers.setitimer
libc.src.__support.OSUtil.osutil
- libc.src.__support.common
+ libc.src.__support.common
libc.src.__support.macros.config
libc.src.errno.errno
)
@@ -39,7 +39,7 @@ add_entrypoint_object(
libc.hdr.types.struct_itimerval
libc.src.__support.OSUtil.linux.syscall_wrappers.getitimer
libc.src.__support.OSUtil.osutil
- libc.src.__support.common
+ libc.src.__support.common
libc.src.__support.macros.config
libc.src.errno.errno
)
diff --git a/libc/src/sys/utsname/linux/CMakeLists.txt b/libc/src/sys/utsname/linux/CMakeLists.txt
index 6a069cd674521..3b6e2223b54fa 100644
--- a/libc/src/sys/utsname/linux/CMakeLists.txt
+++ b/libc/src/sys/utsname/linux/CMakeLists.txt
@@ -10,4 +10,3 @@ add_entrypoint_object(
libc.src.__support.OSUtil.osutil
libc.src.errno.errno
)
-
diff --git a/libc/src/termios/CMakeLists.txt b/libc/src/termios/CMakeLists.txt
index b5d7b676ac0da..0fbd632b78fbd 100644
--- a/libc/src/termios/CMakeLists.txt
+++ b/libc/src/termios/CMakeLists.txt
@@ -5,76 +5,76 @@ endif()
add_entrypoint_object(
cfgetispeed
ALIAS
- DEPENDS
- .${LIBC_TARGET_OS}.cfgetispeed
+ DEPENDS
+ .${LIBC_TARGET_OS}.cfgetispeed
)
add_entrypoint_object(
cfsetispeed
ALIAS
- DEPENDS
- .${LIBC_TARGET_OS}.cfsetispeed
+ DEPENDS
+ .${LIBC_TARGET_OS}.cfsetispeed
)
add_entrypoint_object(
cfgetospeed
ALIAS
- DEPENDS
- .${LIBC_TARGET_OS}.cfgetospeed
+ DEPENDS
+ .${LIBC_TARGET_OS}.cfgetospeed
)
add_entrypoint_object(
cfsetospeed
ALIAS
- DEPENDS
- .${LIBC_TARGET_OS}.cfsetospeed
+ DEPENDS
+ .${LIBC_TARGET_OS}.cfsetospeed
)
add_entrypoint_object(
tcgetsid
ALIAS
- DEPENDS
- .${LIBC_TARGET_OS}.tcgetsid
+ DEPENDS
+ .${LIBC_TARGET_OS}.tcgetsid
)
add_entrypoint_object(
tcdrain
ALIAS
- DEPENDS
- .${LIBC_TARGET_OS}.tcdrain
+ DEPENDS
+ .${LIBC_TARGET_OS}.tcdrain
)
add_entrypoint_object(
tcflow
ALIAS
- DEPENDS
- .${LIBC_TARGET_OS}.tcflow
+ DEPENDS
+ .${LIBC_TARGET_OS}.tcflow
)
add_entrypoint_object(
tcflush
ALIAS
- DEPENDS
- .${LIBC_TARGET_OS}.tcflush
+ DEPENDS
+ .${LIBC_TARGET_OS}.tcflush
)
add_entrypoint_object(
tcsendbreak
ALIAS
- DEPENDS
- .${LIBC_TARGET_OS}.tcsendbreak
+ DEPENDS
+ .${LIBC_TARGET_OS}.tcsendbreak
)
add_entrypoint_object(
tcgetattr
ALIAS
- DEPENDS
- .${LIBC_TARGET_OS}.tcgetattr
+ DEPENDS
+ .${LIBC_TARGET_OS}.tcgetattr
)
add_entrypoint_object(
tcsetattr
ALIAS
- DEPENDS
- .${LIBC_TARGET_OS}.tcsetattr
+ DEPENDS
+ .${LIBC_TARGET_OS}.tcsetattr
)
diff --git a/libc/src/threads/CMakeLists.txt b/libc/src/threads/CMakeLists.txt
index db9ab33bbbf62..d881d8aa74d3f 100644
--- a/libc/src/threads/CMakeLists.txt
+++ b/libc/src/threads/CMakeLists.txt
@@ -26,7 +26,7 @@ add_entrypoint_object(
COMPILE_OPTIONS
${libc_opt_high_flag}
-fno-omit-frame-pointer # This allows us to sniff out the thread args from
- # the new thread's stack reliably.
+ # the new thread's stack reliably.
)
add_entrypoint_object(
diff --git a/libc/src/time/CMakeLists.txt b/libc/src/time/CMakeLists.txt
index b6e8a4ae84df8..4801e30395d1a 100644
--- a/libc/src/time/CMakeLists.txt
+++ b/libc/src/time/CMakeLists.txt
@@ -281,4 +281,3 @@ add_entrypoint_object(
DEPENDS
.${LIBC_TARGET_OS}.clock_settime
)
-
diff --git a/libc/src/time/darwin/CMakeLists.txt b/libc/src/time/darwin/CMakeLists.txt
index 6d68086c72584..e002184849524 100644
--- a/libc/src/time/darwin/CMakeLists.txt
+++ b/libc/src/time/darwin/CMakeLists.txt
@@ -3,7 +3,7 @@ add_entrypoint_object(
SRCS
clock_gettime.cpp
HDRS
- # The public header is part of the parent directory's library.
+ # The public header is part of the parent directory's library.
DEPENDS
libc.src.__support.time.clock_gettime
libc.src.errno.errno
diff --git a/libc/src/time/linux/CMakeLists.txt b/libc/src/time/linux/CMakeLists.txt
index e605b53b9eb29..f3cd822498a57 100644
--- a/libc/src/time/linux/CMakeLists.txt
+++ b/libc/src/time/linux/CMakeLists.txt
@@ -1,6 +1,6 @@
if(NOT TARGET libc.src.__support.OSUtil.osutil)
message(STATUS "libc.src.__support.OSUtil.osutil is not available. "
- "Skip libc.src.time.linux.* targets.")
+ "Skip libc.src.time.linux.* targets.")
return()
endif()
diff --git a/libc/src/time/windows/CMakeLists.txt b/libc/src/time/windows/CMakeLists.txt
index 6f242cd168f52..8b267b35ff52f 100644
--- a/libc/src/time/windows/CMakeLists.txt
+++ b/libc/src/time/windows/CMakeLists.txt
@@ -1,13 +1,13 @@
add_entrypoint_object(
- clock_getres
- SRCS
- clock_getres.cpp
- DEPENDS
- libc.src.__support.time.windows.performance_counter
- libc.src.__support.time.units
- libc.src.__support.common
- libc.src.__support.macros.optimization
- libc.hdr.time_macros
- libc.hdr.types.time_t
- libc.hdr.types.struct_timespec
+ clock_getres
+ SRCS
+ clock_getres.cpp
+ DEPENDS
+ libc.src.__support.time.windows.performance_counter
+ libc.src.__support.time.units
+ libc.src.__support.common
+ libc.src.__support.macros.optimization
+ libc.hdr.time_macros
+ libc.hdr.types.time_t
+ libc.hdr.types.struct_timespec
)
diff --git a/libc/src/ucontext/CMakeLists.txt b/libc/src/ucontext/CMakeLists.txt
index d8316abf508a3..f66d071829ecd 100644
--- a/libc/src/ucontext/CMakeLists.txt
+++ b/libc/src/ucontext/CMakeLists.txt
@@ -15,4 +15,3 @@ add_entrypoint_object(
DEPENDS
.${LIBC_TARGET_ARCHITECTURE}.setcontext
)
-
diff --git a/libc/src/ucontext/x86_64/CMakeLists.txt b/libc/src/ucontext/x86_64/CMakeLists.txt
index 64b35296f36d3..bdcef6ed20bfe 100644
--- a/libc/src/ucontext/x86_64/CMakeLists.txt
+++ b/libc/src/ucontext/x86_64/CMakeLists.txt
@@ -25,4 +25,3 @@ add_entrypoint_object(
libc.src.__support.macros.config
libc.hdr.types.size_t
)
-
diff --git a/libc/src/unistd/CMakeLists.txt b/libc/src/unistd/CMakeLists.txt
index 98444e7b31631..646c5881532de 100644
--- a/libc/src/unistd/CMakeLists.txt
+++ b/libc/src/unistd/CMakeLists.txt
@@ -1,6 +1,6 @@
if(NOT TARGET libc.src.__support.OSUtil.osutil)
message(STATUS "libc.src.__support.OSUtil.osutil is not avaiable. "
- "Skip unistd targets.")
+ "Skip unistd targets.")
return()
endif()
diff --git a/libc/startup/baremetal/CMakeLists.txt b/libc/startup/baremetal/CMakeLists.txt
index e361000f788ea..2b46b79054426 100644
--- a/libc/startup/baremetal/CMakeLists.txt
+++ b/libc/startup/baremetal/CMakeLists.txt
@@ -3,7 +3,7 @@ function(add_startup_object name)
cmake_parse_arguments(
"ADD_STARTUP_OBJECT"
"ALIAS" # Option argument
- "SRC" # Single value arguments
+ "SRC" # Single value arguments
"DEPENDS;COMPILE_OPTIONS" # Multi value arguments
${ARGN}
)
@@ -19,7 +19,7 @@ function(add_startup_object name)
${name}
SRCS ${ADD_STARTUP_OBJECT_SRC}
COMPILE_OPTIONS ${ADD_STARTUP_OBJECT_COMPILE_OPTIONS}
- ${ADD_STARTUP_OBJECT_UNPARSED_ARGUMENTS}
+ ${ADD_STARTUP_OBJECT_UNPARSED_ARGUMENTS}
DEPENDS ${ADD_STARTUP_OBJECT_DEPENDS}
)
set_target_properties(
@@ -62,7 +62,7 @@ add_startup_object(
crt1
ALIAS
DEPENDS
- .${LIBC_TARGET_ARCHITECTURE}.crt1
+ .${LIBC_TARGET_ARCHITECTURE}.crt1
)
add_custom_target(libc-startup)
@@ -70,6 +70,6 @@ add_custom_target(libc-startup)
set(fq_target_name libc.startup.baremetal.${LIBC_TARGET_ARCHITECTURE}.crt1)
add_dependencies(libc-startup ${fq_target_name})
install(FILES $<TARGET_OBJECTS:${fq_target_name}>
- DESTINATION ${LIBC_INSTALL_LIBRARY_DIR}
- RENAME $<TARGET_PROPERTY:${fq_target_name},OUTPUT_NAME>
- COMPONENT libc)
+ DESTINATION ${LIBC_INSTALL_LIBRARY_DIR}
+ RENAME $<TARGET_PROPERTY:${fq_target_name},OUTPUT_NAME>
+ COMPONENT libc)
diff --git a/libc/startup/baremetal/aarch64/CMakeLists.txt b/libc/startup/baremetal/aarch64/CMakeLists.txt
index f75bd893c68bc..09a34736de53a 100644
--- a/libc/startup/baremetal/aarch64/CMakeLists.txt
+++ b/libc/startup/baremetal/aarch64/CMakeLists.txt
@@ -1,7 +1,7 @@
add_startup_object(
crt1
SRC
- start.cpp
+ start.cpp
DEPENDS
libc.src.stdlib.atexit
libc.src.stdlib.exit
diff --git a/libc/startup/baremetal/arm/CMakeLists.txt b/libc/startup/baremetal/arm/CMakeLists.txt
index f75bd893c68bc..09a34736de53a 100644
--- a/libc/startup/baremetal/arm/CMakeLists.txt
+++ b/libc/startup/baremetal/arm/CMakeLists.txt
@@ -1,7 +1,7 @@
add_startup_object(
crt1
SRC
- start.cpp
+ start.cpp
DEPENDS
libc.src.stdlib.atexit
libc.src.stdlib.exit
diff --git a/libc/startup/gpu/CMakeLists.txt b/libc/startup/gpu/CMakeLists.txt
index 7744bbbb595c1..5f04b5b3a76ad 100644
--- a/libc/startup/gpu/CMakeLists.txt
+++ b/libc/startup/gpu/CMakeLists.txt
@@ -2,7 +2,7 @@ function(add_startup_object name)
cmake_parse_arguments(
"ADD_STARTUP_OBJECT"
"ALIAS" # Option argument
- "SRC" # Single value arguments
+ "SRC" # Single value arguments
"DEPENDS;COMPILE_OPTIONS" # Multi value arguments
${ARGN}
)
@@ -18,7 +18,7 @@ function(add_startup_object name)
${name}
SRCS ${ADD_STARTUP_OBJECT_SRC}
COMPILE_OPTIONS ${ADD_STARTUP_OBJECT_COMPILE_OPTIONS}
- ${ADD_STARTUP_OBJECT_UNPARSED_ARGUMENTS}
+ ${ADD_STARTUP_OBJECT_UNPARSED_ARGUMENTS}
DEPENDS ${ADD_STARTUP_OBJECT_DEPENDS}
)
set_target_properties(
@@ -58,7 +58,7 @@ foreach(target IN LISTS startup_components)
set(fq_target_name libc.startup.gpu.${target})
add_dependencies(libc-startup ${fq_target_name})
install(FILES $<TARGET_OBJECTS:${fq_target_name}>
- DESTINATION ${LIBC_INSTALL_LIBRARY_DIR}
- RENAME $<TARGET_PROPERTY:${fq_target_name},OUTPUT_NAME>
- COMPONENT libc)
+ DESTINATION ${LIBC_INSTALL_LIBRARY_DIR}
+ RENAME $<TARGET_PROPERTY:${fq_target_name},OUTPUT_NAME>
+ COMPONENT libc)
endforeach()
diff --git a/libc/startup/linux/CMakeLists.txt b/libc/startup/linux/CMakeLists.txt
index e08f30a16749e..1d64fa17390a8 100644
--- a/libc/startup/linux/CMakeLists.txt
+++ b/libc/startup/linux/CMakeLists.txt
@@ -27,7 +27,7 @@ function(merge_relocatable_object name)
# Pass -r to the driver is much cleaner than passing -Wl,-r: the compiler knows it is
# a relocatable linking and will not pass other irrelevant flags to the linker.
set(link_opts -r -nostdlib)
- if (explicit_target_triple AND LLVM_ENABLE_LLD)
+ if(explicit_target_triple AND LLVM_ENABLE_LLD)
list(APPEND link_opts --target=${explicit_target_triple})
endif()
target_link_options(${relocatable_target} PRIVATE ${link_opts})
@@ -54,7 +54,7 @@ function(add_startup_object name)
cmake_parse_arguments(
"ADD_STARTUP_OBJECT"
"" # Option argument
- "SRC" # Single value arguments
+ "SRC" # Single value arguments
"DEPENDS;COMPILE_OPTIONS" # Multi value arguments
${ARGN}
)
@@ -126,8 +126,8 @@ add_object_library(
libc.src.errno.program_invocation_name
libc.src.errno.program_invocation_short_name
COMPILE_OPTIONS
- -ffreestanding # To avoid compiler warnings about calling the main function.
- -fno-builtin # avoid emit unexpected calls
+ -ffreestanding # To avoid compiler warnings about calling the main function.
+ -fno-builtin # avoid emit unexpected calls
-fno-stack-protector # stack protect canary is not available yet.
)
@@ -159,7 +159,7 @@ foreach(target IN LISTS startup_components)
set(fq_target_name libc.startup.linux.${target})
add_dependencies(libc-startup ${fq_target_name})
install(FILES $<TARGET_OBJECTS:${fq_target_name}>
- DESTINATION ${LIBC_INSTALL_LIBRARY_DIR}
- RENAME $<TARGET_PROPERTY:${fq_target_name},OUTPUT_NAME>
- COMPONENT libc)
+ DESTINATION ${LIBC_INSTALL_LIBRARY_DIR}
+ RENAME $<TARGET_PROPERTY:${fq_target_name},OUTPUT_NAME>
+ COMPONENT libc)
endforeach()
diff --git a/libc/startup/linux/aarch64/CMakeLists.txt b/libc/startup/linux/aarch64/CMakeLists.txt
index a776bce714139..e733010a0a509 100644
--- a/libc/startup/linux/aarch64/CMakeLists.txt
+++ b/libc/startup/linux/aarch64/CMakeLists.txt
@@ -1,7 +1,7 @@
add_startup_object(
tls
SRC
- tls.cpp
+ tls.cpp
DEPENDS
libc.config.app_h
libc.hdr.sys_mman_macros
@@ -18,7 +18,7 @@ add_startup_object(
add_startup_object(
start
SRC
- start.cpp
+ start.cpp
DEPENDS
libc.config.app_h
COMPILE_OPTIONS
@@ -29,7 +29,7 @@ add_startup_object(
add_startup_object(
irelative
SRC
- irelative.cpp
+ irelative.cpp
DEPENDS
libc.hdr.link_macros
libc.hdr.elf_macros
diff --git a/libc/startup/linux/riscv/CMakeLists.txt b/libc/startup/linux/riscv/CMakeLists.txt
index 4a2e0ab80342e..28654aef44c7c 100644
--- a/libc/startup/linux/riscv/CMakeLists.txt
+++ b/libc/startup/linux/riscv/CMakeLists.txt
@@ -1,7 +1,7 @@
add_startup_object(
tls
SRC
- tls.cpp
+ tls.cpp
DEPENDS
libc.config.app_h
libc.hdr.sys_mman_macros
@@ -18,7 +18,7 @@ add_startup_object(
add_startup_object(
start
SRC
- start.cpp
+ start.cpp
DEPENDS
libc.config.app_h
libc.src.__support.macros.attributes
@@ -30,7 +30,7 @@ add_startup_object(
add_startup_object(
irelative
SRC
- irelative.cpp
+ irelative.cpp
DEPENDS
libc.hdr.link_macros
libc.hdr.elf_macros
diff --git a/libc/startup/linux/x86_64/CMakeLists.txt b/libc/startup/linux/x86_64/CMakeLists.txt
index 19417b345d7cf..d458d9ac89316 100644
--- a/libc/startup/linux/x86_64/CMakeLists.txt
+++ b/libc/startup/linux/x86_64/CMakeLists.txt
@@ -1,7 +1,7 @@
add_startup_object(
tls
SRC
- tls.cpp
+ tls.cpp
DEPENDS
libc.config.app_h
libc.hdr.sys_mman_macros
@@ -21,7 +21,7 @@ add_startup_object(
add_startup_object(
start
SRC
- start.cpp
+ start.cpp
DEPENDS
libc.config.app_h
libc.src.__support.macros.attributes
@@ -35,7 +35,7 @@ add_startup_object(
add_startup_object(
irelative
SRC
- irelative.cpp
+ irelative.cpp
DEPENDS
libc.hdr.link_macros
libc.hdr.elf_macros
diff --git a/libc/startup/uefi/CMakeLists.txt b/libc/startup/uefi/CMakeLists.txt
index 2e6a993e77e30..645d35a44029f 100644
--- a/libc/startup/uefi/CMakeLists.txt
+++ b/libc/startup/uefi/CMakeLists.txt
@@ -3,7 +3,7 @@ function(add_startup_object name)
cmake_parse_arguments(
"ADD_STARTUP_OBJECT"
"ALIAS" # Option argument
- "SRC" # Single value arguments
+ "SRC" # Single value arguments
"DEPENDS;COMPILE_OPTIONS" # Multi value arguments
${ARGN}
)
@@ -19,7 +19,7 @@ function(add_startup_object name)
${name}
SRCS ${ADD_STARTUP_OBJECT_SRC}
COMPILE_OPTIONS ${ADD_STARTUP_OBJECT_COMPILE_OPTIONS}
- ${ADD_STARTUP_OBJECT_UNPARSED_ARGUMENTS}
+ ${ADD_STARTUP_OBJECT_UNPARSED_ARGUMENTS}
DEPENDS ${ADD_STARTUP_OBJECT_DEPENDS}
)
set_target_properties(
@@ -44,7 +44,7 @@ foreach(target IN LISTS startup_components)
set(fq_target_name libc.startup.uefi.${target})
add_dependencies(libc-startup ${fq_target_name})
install(FILES $<TARGET_OBJECTS:${fq_target_name}>
- DESTINATION ${LIBC_INSTALL_LIBRARY_DIR}
- RENAME $<TARGET_PROPERTY:${fq_target_name},OUTPUT_NAME>
- COMPONENT libc)
+ DESTINATION ${LIBC_INSTALL_LIBRARY_DIR}
+ RENAME $<TARGET_PROPERTY:${fq_target_name},OUTPUT_NAME>
+ COMPONENT libc)
endforeach()
diff --git a/libc/test/CMakeLists.txt b/libc/test/CMakeLists.txt
index 09a60427b157f..0c20df43bce0c 100644
--- a/libc/test/CMakeLists.txt
+++ b/libc/test/CMakeLists.txt
@@ -33,7 +33,7 @@ add_lit_testsuite(check-libc
)
add_dependencies(check-libc check-libc-build)
-if (TARGET check-hdrgen)
+if(TARGET check-hdrgen)
add_dependencies(check-libc check-hdrgen)
endif()
@@ -67,7 +67,7 @@ endif()
add_subdirectory(include)
if(NOT ${LIBC_TARGET_OS} STREQUAL "linux" AND
- NOT ${LIBC_TARGET_OS} STREQUAL "gpu")
+ NOT ${LIBC_TARGET_OS} STREQUAL "gpu")
# Integration tests are currently only available for linux and the GPU.
return()
endif()
diff --git a/libc/test/UnitTest/CMakeLists.txt b/libc/test/UnitTest/CMakeLists.txt
index b3e6266b00171..afb943acc5c62 100644
--- a/libc/test/UnitTest/CMakeLists.txt
+++ b/libc/test/UnitTest/CMakeLists.txt
@@ -8,7 +8,7 @@ function(add_unittest_framework_library name)
)
if(NOT TEST_LIB_SRCS)
message(FATAL_ERROR "'add_unittest_framework_library' requires SRCS; for "
- "header only libraries, use 'add_header_library'")
+ "header only libraries, use 'add_header_library'")
endif()
foreach(lib IN ITEMS ${name}.unit ${name}.hermetic)
@@ -16,8 +16,8 @@ function(add_unittest_framework_library name)
${lib}
STATIC
EXCLUDE_FROM_ALL
- ${TEST_LIB_SRCS}
- ${TEST_LIB_HDRS}
+ ${TEST_LIB_SRCS}
+ ${TEST_LIB_HDRS}
)
target_include_directories(${lib} PRIVATE ${LIBC_SOURCE_DIR})
if(TARGET libc.src.time.clock)
@@ -35,7 +35,7 @@ function(add_unittest_framework_library name)
_get_common_test_compile_options(compile_options "" "")
endif()
- if (TEST_LIB_COMPILE_OPTIONS)
+ if(TEST_LIB_COMPILE_OPTIONS)
list(APPEND compile_options ${TEST_LIB_COMPILE_OPTIONS})
endif()
target_compile_options(${name}.unit PRIVATE ${compile_options})
@@ -60,7 +60,7 @@ function(add_unittest_framework_library name)
endif()
endfunction()
-if (NOT TARGET libc.src.__support.OSUtil.osutil OR NOT LLVM_LIBC_FULL_BUILD)
+if(NOT TARGET libc.src.__support.OSUtil.osutil OR NOT LLVM_LIBC_FULL_BUILD)
message(STATUS "TestLogger will use system libc's stdio to print.")
set(test_logger_compile_options "-DLIBC_TEST_USE_SYSTEM_PRINTF")
set(test_logger_osutil "")
@@ -103,9 +103,9 @@ set(libc_death_test_deps
libc.hdr.stdint_proxy
libc.src.__support.libc_assert
)
-if (LIBC_TEST_SUBPROCESS_TESTS)
+if(LIBC_TEST_SUBPROCESS_TESTS)
list(APPEND libc_death_test_srcs ExecuteFunctionUnix.cpp)
- if (LLVM_LIBC_FULL_BUILD)
+ if(LLVM_LIBC_FULL_BUILD)
list(APPEND libc_death_test_deps
libc.include.llvm-libc-macros.poll-macros
libc.include.llvm-libc-macros.signal_macros
diff --git a/libc/test/include/CMakeLists.txt b/libc/test/include/CMakeLists.txt
index f920da570816d..98b43960e7b66 100644
--- a/libc/test/include/CMakeLists.txt
+++ b/libc/test/include/CMakeLists.txt
@@ -67,10 +67,10 @@ add_libc_test(
libc.include.llvm-libc-macros.stdbit_macros
libc.include.llvm_libc_common_h
libc.include.stdbit
- # Intentionally do not depend on libc.src.stdbit.*. The include test is
- # simply testing the macros provided by stdbit.h, not the implementation
- # of the underlying functions which the type generic macros may dispatch
- # to.
+ # Intentionally do not depend on libc.src.stdbit.*. The include test is
+ # simply testing the macros provided by stdbit.h, not the implementation
+ # of the underlying functions which the type generic macros may dispatch
+ # to.
)
add_libc_test(
stdbit_c_test
@@ -89,10 +89,10 @@ add_libc_test(
libc.include.llvm_libc_common_h
libc.include.stdbit
libc.src.assert.__assert_fail
- # Intentionally do not depend on libc.src.stdbit.*. The include test is
- # simply testing the macros provided by stdbit.h, not the implementation
- # of the underlying functions which the type generic macros may dispatch
- # to.
+ # Intentionally do not depend on libc.src.stdbit.*. The include test is
+ # simply testing the macros provided by stdbit.h, not the implementation
+ # of the underlying functions which the type generic macros may dispatch
+ # to.
)
add_libc_test(
@@ -540,17 +540,17 @@ function(add_header_test target_name source_file deps std_mode)
C_TEST
HERMETIC_TEST_ONLY
SUITE
- libc_include_tests
+ libc_include_tests
SRCS
- ${source_file}
+ ${source_file}
COMPILE_OPTIONS
- -Werror
- -Wsystem-headers
- -Wall
- -Wextra
- -std=${std_mode}
+ -Werror
+ -Wsystem-headers
+ -Wall
+ -Wextra
+ -std=${std_mode}
DEPENDS
- ${deps}
+ ${deps}
)
endif()
endfunction()
diff --git a/libc/test/integration/scudo/CMakeLists.txt b/libc/test/integration/scudo/CMakeLists.txt
index b4011e501b96b..74709803972cd 100644
--- a/libc/test/integration/scudo/CMakeLists.txt
+++ b/libc/test/integration/scudo/CMakeLists.txt
@@ -45,7 +45,7 @@ target_link_options(
target_link_libraries(libc-scudo-integration-test
PRIVATE
- libc_for_scudo_integration_test
+ libc_for_scudo_integration_test
)
add_executable(
@@ -61,11 +61,11 @@ target_link_options(
target_link_libraries(libc-gwp-asan-uaf-should-crash
PRIVATE
- libc_for_scudo_integration_test
+ libc_for_scudo_integration_test
)
add_custom_command(TARGET libc-scudo-integration-test
- POST_BUILD
- COMMAND $<TARGET_FILE:libc-scudo-integration-test>
- COMMENT "Run the test after it is built."
- VERBATIM)
+ POST_BUILD
+ COMMAND $<TARGET_FILE:libc-scudo-integration-test>
+ COMMENT "Run the test after it is built."
+ VERBATIM)
diff --git a/libc/test/integration/src/__support/threads/CMakeLists.txt b/libc/test/integration/src/__support/threads/CMakeLists.txt
index 2ab77287f85c5..2f64fd367689c 100644
--- a/libc/test/integration/src/__support/threads/CMakeLists.txt
+++ b/libc/test/integration/src/__support/threads/CMakeLists.txt
@@ -1,5 +1,5 @@
if(NOT (TARGET libc.src.__support.threads.thread AND
- TARGET libc.src.__support.threads.mutex))
+ TARGET libc.src.__support.threads.mutex))
return()
endif()
diff --git a/libc/test/integration/startup/CMakeLists.txt b/libc/test/integration/startup/CMakeLists.txt
index 3a01d49b5e6c4..3eae028aea73d 100644
--- a/libc/test/integration/startup/CMakeLists.txt
+++ b/libc/test/integration/startup/CMakeLists.txt
@@ -5,14 +5,14 @@
function(add_startup_test target_name)
if(NOT CMAKE_HOST_UNIX)
message(
- WARNING
- "Test for the startup system currently assume a POSIX/Unix like "
- "environment and may not work on your platform.")
+ WARNING
+ "Test for the startup system currently assume a POSIX/Unix like "
+ "environment and may not work on your platform.")
endif()
cmake_parse_arguments(
"ADD_STARTUP_TEST"
- "" # No option arguments
+ "" # No option arguments
"SRC" # Single value arguments
"DEPENDS;ARGS;ENV" # Multivalue arguments.
${ARGN}
@@ -55,7 +55,7 @@ function(add_startup_test target_name)
)
add_dependencies(libc_startup_tests ${fq_target_name})
-endfunction(add_startup_test)
+endfunction()
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS})
add_subdirectory(${LIBC_TARGET_OS})
diff --git a/libc/test/integration/startup/gpu/CMakeLists.txt b/libc/test/integration/startup/gpu/CMakeLists.txt
index 06a8692801d37..c0e6ddfe712fd 100644
--- a/libc/test/integration/startup/gpu/CMakeLists.txt
+++ b/libc/test/integration/startup/gpu/CMakeLists.txt
@@ -41,27 +41,27 @@ add_integration_test(
startup_rpc_interface_test
SUITE libc-startup-tests
SRCS
- rpc_interface_test.cpp
+ rpc_interface_test.cpp
)
add_integration_test(
startup_rpc_stream_test
SUITE libc-startup-tests
SRCS
- rpc_stream_test.cpp
+ rpc_stream_test.cpp
LOADER_ARGS
- --threads 32
- --blocks 8
+ --threads 32
+ --blocks 8
)
add_integration_test(
startup_rpc_divergence_test
SUITE libc-startup-tests
SRCS
- rpc_divergence_test.cpp
+ rpc_divergence_test.cpp
LOADER_ARGS
- --threads 256
- --blocks 16
+ --threads 256
+ --blocks 16
)
if(LIBC_TARGET_ARCHITECTURE_IS_AMDGPU)
diff --git a/libc/test/shared/CMakeLists.txt b/libc/test/shared/CMakeLists.txt
index 2c79c5432f59f..7e67e71862763 100644
--- a/libc/test/shared/CMakeLists.txt
+++ b/libc/test/shared/CMakeLists.txt
@@ -10,815 +10,815 @@ if(LIBC_TEST_SKIP_SHARED_TESTS)
message(STATUS "LIBC_TEST_SKIP_SHARED_MATH_TESTS is set. Skipping libc-shared-tests.")
endif()
else()
-add_fp_unittest(
- shared_math_test
- SUITE
- libc-shared-tests
- SRCS
- shared_math_test.cpp
- DEPENDS
- libc.src.__support.FPUtil.fp_bits
- libc.src.__support.math.acos
- libc.src.__support.math.acosbf16
- libc.src.__support.math.acosf
- libc.src.__support.math.acosf16
- libc.src.__support.math.acoshf
- libc.src.__support.math.acoshf16
- libc.src.__support.math.acospif
- libc.src.__support.math.acospif16
- libc.src.__support.math.asin
- libc.src.__support.math.asinbf16
- libc.src.__support.math.asinf
- libc.src.__support.math.asinf16
- libc.src.__support.math.asinhf
- libc.src.__support.math.asinhf16
- libc.src.__support.math.asinpi
- libc.src.__support.math.asinpif
- libc.src.__support.math.asinpif16
- libc.src.__support.math.atan
- libc.src.__support.math.atan2
- libc.src.__support.math.atan2f
- libc.src.__support.math.atan2f128
- libc.src.__support.math.atan2f16
- libc.src.__support.math.atanbf16
- libc.src.__support.math.atanf
- libc.src.__support.math.atanf16
- libc.src.__support.math.atanhf
- libc.src.__support.math.atanhf16
- libc.src.__support.math.atanpif16
- libc.src.__support.math.bf16add
- libc.src.__support.math.bf16addf
- libc.src.__support.math.bf16addl
- libc.src.__support.math.bf16addf128
- libc.src.__support.math.bf16div
- libc.src.__support.math.bf16divf
- libc.src.__support.math.bf16divf128
- libc.src.__support.math.bf16divl
- libc.src.__support.math.bf16fma
- libc.src.__support.math.bf16fmaf
- libc.src.__support.math.bf16fmaf128
- libc.src.__support.math.bf16fmal
- libc.src.__support.math.bf16mul
- libc.src.__support.math.bf16mulf
- libc.src.__support.math.bf16mulf128
- libc.src.__support.math.bf16mull
- libc.src.__support.math.bf16sub
- libc.src.__support.math.bf16subf
- libc.src.__support.math.bf16subf128
- libc.src.__support.math.bf16subl
- libc.src.__support.math.canonicalize
- libc.src.__support.math.canonicalizebf16
- libc.src.__support.math.canonicalizef
- libc.src.__support.math.canonicalizef128
- libc.src.__support.math.canonicalizef16
- libc.src.__support.math.canonicalizel
- libc.src.__support.math.cbrt
- libc.src.__support.math.cbrtbf16
- libc.src.__support.math.cbrtf
- libc.src.__support.math.cbrtf16
- libc.src.__support.math.ceil
- libc.src.__support.math.ceilbf16
- libc.src.__support.math.ceilf
- libc.src.__support.math.ceilf128
- libc.src.__support.math.ceilf16
- libc.src.__support.math.ceill
- libc.src.__support.math.copysign
- libc.src.__support.math.copysignbf16
- libc.src.__support.math.copysignf
- libc.src.__support.math.copysignf128
- libc.src.__support.math.copysignf16
- libc.src.__support.math.copysignl
- libc.src.__support.math.cos
- libc.src.__support.math.cosf
- libc.src.__support.math.cosf16
- libc.src.__support.math.coshf
- libc.src.__support.math.coshf16
- libc.src.__support.math.cospif
- libc.src.__support.math.cospif16
- libc.src.__support.math.daddf128
- libc.src.__support.math.daddl
- libc.src.__support.math.ddivf128
- libc.src.__support.math.ddivl
- libc.src.__support.math.dfmaf128
- libc.src.__support.math.dfmal
- libc.src.__support.math.dmulf128
- libc.src.__support.math.dmull
- libc.src.__support.math.dsqrtf128
- libc.src.__support.math.dsqrtl
- libc.src.__support.math.dsubf128
- libc.src.__support.math.dsubl
- libc.src.__support.math.exp10m1f
- libc.src.__support.math.exp10m1f16
- libc.src.__support.math.erfcf16
- libc.src.__support.math.erff
- libc.src.__support.math.erff16
- libc.src.__support.math.exp
- libc.src.__support.math.exp2
- libc.src.__support.math.exp2f
- libc.src.__support.math.exp2f16
- libc.src.__support.math.exp2m1f
- libc.src.__support.math.exp2m1f16
- libc.src.__support.math.expm1
- libc.src.__support.math.expm1f
- libc.src.__support.math.expm1f16
- libc.src.__support.math.exp10
- libc.src.__support.math.exp10f
- libc.src.__support.math.exp10f16
- libc.src.__support.math.expf
- libc.src.__support.math.expbf16
- libc.src.__support.math.expf16
- libc.src.__support.math.f16add
- libc.src.__support.math.f16addf
- libc.src.__support.math.f16addf128
- libc.src.__support.math.f16addl
- libc.src.__support.math.f16div
- libc.src.__support.math.f16divf
- libc.src.__support.math.f16divf128
- libc.src.__support.math.f16divl
- libc.src.__support.math.f16fma
- libc.src.__support.math.f16fmaf
- libc.src.__support.math.f16fmaf128
- libc.src.__support.math.f16fmal
- libc.src.__support.math.f16mul
- libc.src.__support.math.f16mulf
- libc.src.__support.math.f16mulf128
- libc.src.__support.math.f16mull
- libc.src.__support.math.f16sqrt
- libc.src.__support.math.f16sqrtf
- libc.src.__support.math.f16sqrtf128
- libc.src.__support.math.f16sqrtl
- libc.src.__support.math.f16sub
- libc.src.__support.math.f16subf
- libc.src.__support.math.f16subf128
- libc.src.__support.math.f16subl
- libc.src.__support.math.fabs
- libc.src.__support.math.fabsbf16
- libc.src.__support.math.fabsf
- libc.src.__support.math.fabsf128
- libc.src.__support.math.fabsf16
- libc.src.__support.math.fabsl
- libc.src.__support.math.fadd
- libc.src.__support.math.faddf128
- libc.src.__support.math.faddl
- libc.src.__support.math.fdim
- libc.src.__support.math.fdimbf16
- libc.src.__support.math.fdimf
- libc.src.__support.math.fdimf128
- libc.src.__support.math.fdimf16
- libc.src.__support.math.fdiml
- libc.src.__support.math.fdiv
- libc.src.__support.math.fdivf128
- libc.src.__support.math.fdivl
- libc.src.__support.math.ffma
- libc.src.__support.math.ffmaf128
- libc.src.__support.math.ffmal
- libc.src.__support.math.floor
- libc.src.__support.math.floorbf16
- libc.src.__support.math.floorf
- libc.src.__support.math.floorf128
- libc.src.__support.math.floorf16
- libc.src.__support.math.floorl
- libc.src.__support.math.fma
- libc.src.__support.math.fmaf
- libc.src.__support.math.fmaf16
- libc.src.__support.math.fmabf16
- libc.src.__support.math.fmax
- libc.src.__support.math.fmaxbf16
- libc.src.__support.math.fmaxf
- libc.src.__support.math.fmaxf128
- libc.src.__support.math.fmaxf16
- libc.src.__support.math.fmaximum
- libc.src.__support.math.fmaximum_mag
- libc.src.__support.math.fmaximum_mag_num
- libc.src.__support.math.fmaximum_mag_numbf16
- libc.src.__support.math.fmaximum_mag_numf
- libc.src.__support.math.fmaximum_mag_numf128
- libc.src.__support.math.fmaximum_mag_numf16
- libc.src.__support.math.fmaximum_mag_numl
- libc.src.__support.math.fmaximum_magbf16
- libc.src.__support.math.fmaximum_magf
- libc.src.__support.math.fmaximum_magf128
- libc.src.__support.math.fmaximum_magf16
- libc.src.__support.math.fmaximum_magl
- libc.src.__support.math.fmaximum_num
- libc.src.__support.math.fmaximum_numbf16
- libc.src.__support.math.fmaximum_numf
- libc.src.__support.math.fmaximum_numf128
- libc.src.__support.math.fmaximum_numf16
- libc.src.__support.math.fmaximum_numl
- libc.src.__support.math.fmaximumbf16
- libc.src.__support.math.fmaximumf
- libc.src.__support.math.fmaximumf128
- libc.src.__support.math.fmaximumf16
- libc.src.__support.math.fmaximuml
- libc.src.__support.math.fmaxl
- libc.src.__support.math.fmin
- libc.src.__support.math.fminbf16
- libc.src.__support.math.fminf
- libc.src.__support.math.fminf128
- libc.src.__support.math.fminf16
- libc.src.__support.math.fminimum
- libc.src.__support.math.fminimum_mag
- libc.src.__support.math.fminimum_mag_num
- libc.src.__support.math.fminimum_mag_numbf16
- libc.src.__support.math.fminimum_mag_numf
- libc.src.__support.math.fminimum_mag_numf128
- libc.src.__support.math.fminimum_mag_numf16
- libc.src.__support.math.fminimum_mag_numl
- libc.src.__support.math.fminimum_magbf16
- libc.src.__support.math.fminimum_magf
- libc.src.__support.math.fminimum_magf128
- libc.src.__support.math.fminimum_magf16
- libc.src.__support.math.fminimum_magl
- libc.src.__support.math.fminimum_num
- libc.src.__support.math.fminimum_numbf16
- libc.src.__support.math.fminimum_numf
- libc.src.__support.math.fminimum_numf128
- libc.src.__support.math.fminimum_numf16
- libc.src.__support.math.fminimum_numl
- libc.src.__support.math.fminimumbf16
- libc.src.__support.math.fminimumf
- libc.src.__support.math.fminimumf128
- libc.src.__support.math.fminimumf16
- libc.src.__support.math.fminimuml
- libc.src.__support.math.fminl
- libc.src.__support.math.fmod
- libc.src.__support.math.fmodbf16
- libc.src.__support.math.fmodf
- libc.src.__support.math.fmodf128
- libc.src.__support.math.fmodf16
- libc.src.__support.math.fmodl
- libc.src.__support.math.fmul
- libc.src.__support.math.fmulf128
- libc.src.__support.math.fmull
- libc.src.__support.math.frexp
- libc.src.__support.math.frexpbf16
- libc.src.__support.math.frexpf
- libc.src.__support.math.frexpf128
- libc.src.__support.math.frexpf16
- libc.src.__support.math.frexpl
- libc.src.__support.math.fromfp
- libc.src.__support.math.fromfpbf16
- libc.src.__support.math.fromfpf
- libc.src.__support.math.fromfpf128
- libc.src.__support.math.fromfpf16
- libc.src.__support.math.fromfpl
- libc.src.__support.math.fromfpx
- libc.src.__support.math.fromfpxbf16
- libc.src.__support.math.fromfpxf
- libc.src.__support.math.fromfpxf128
- libc.src.__support.math.fromfpxf16
- libc.src.__support.math.fromfpxl
- libc.src.__support.math.fsqrt
- libc.src.__support.math.fsqrtf128
- libc.src.__support.math.fsqrtl
- libc.src.__support.math.fsub
- libc.src.__support.math.fsubf128
- libc.src.__support.math.fsubl
- libc.src.__support.math.getpayload
- libc.src.__support.math.getpayloadbf16
- libc.src.__support.math.getpayloadf
- libc.src.__support.math.getpayloadf128
- libc.src.__support.math.getpayloadf16
- libc.src.__support.math.getpayloadl
- libc.src.__support.math.hypot
- libc.src.__support.math.hypotf
- libc.src.__support.math.hypotbf16
- libc.src.__support.math.hypotf16
- libc.src.__support.math.ilogb
- libc.src.__support.math.ilogbbf16
- libc.src.__support.math.ilogbf
- libc.src.__support.math.ilogbf16
- libc.src.__support.math.ilogbf128
- libc.src.__support.math.ilogbl
- libc.src.__support.math.iscanonical
- libc.src.__support.math.iscanonicalbf16
- libc.src.__support.math.iscanonicalf
- libc.src.__support.math.iscanonicalf128
- libc.src.__support.math.iscanonicalf16
- libc.src.__support.math.iscanonicall
- libc.src.__support.math.isnan
- libc.src.__support.math.isnanf
- libc.src.__support.math.isnanf128
- libc.src.__support.math.isnanf16
- libc.src.__support.math.isnanl
- libc.src.__support.math.issignaling
- libc.src.__support.math.issignalingbf16
- libc.src.__support.math.issignalingf
- libc.src.__support.math.issignalingf128
- libc.src.__support.math.issignalingf16
- libc.src.__support.math.issignalingl
- libc.src.__support.math.ldexp
- libc.src.__support.math.ldexpbf16
- libc.src.__support.math.ldexpf
- libc.src.__support.math.ldexpl
- libc.src.__support.math.llogb
- libc.src.__support.math.llogbbf16
- libc.src.__support.math.llrint
- libc.src.__support.math.llrintbf16
- libc.src.__support.math.llrintf
- libc.src.__support.math.llrintf128
- libc.src.__support.math.llrintf16
- libc.src.__support.math.llrintl
- libc.src.__support.math.llround
- libc.src.__support.math.llroundbf16
- libc.src.__support.math.llroundf
- libc.src.__support.math.llroundf128
- libc.src.__support.math.llroundf16
- libc.src.__support.math.llroundl
- libc.src.__support.math.log
- libc.src.__support.math.log10
- libc.src.__support.math.log10f16
- libc.src.__support.math.log10p1f16
- libc.src.__support.math.log10f
- libc.src.__support.math.log1p
- libc.src.__support.math.log1pf
- libc.src.__support.math.log2
- libc.src.__support.math.logb
- libc.src.__support.math.log2f
- libc.src.__support.math.log2f16
- libc.src.__support.math.log2p1f16
- libc.src.__support.math.logbf
- libc.src.__support.math.logbbf16
- libc.src.__support.math.logbf128
- libc.src.__support.math.logbf16
- libc.src.__support.math.logf
- libc.src.__support.math.log_bf16
- libc.src.__support.math.ldexpf
- libc.src.__support.math.ldexpf128
- libc.src.__support.math.ldexpf16
- libc.src.__support.math.lgammaf16
- libc.src.__support.math.llogbf
- libc.src.__support.math.llogbf128
- libc.src.__support.math.llogbf16
- libc.src.__support.math.logbl
- libc.src.__support.math.logf16
- libc.src.__support.math.llogbl
- libc.src.__support.math.lrint
- libc.src.__support.math.lrintbf16
- libc.src.__support.math.lrintf
- libc.src.__support.math.lrintf128
- libc.src.__support.math.lrintf16
- libc.src.__support.math.lrintl
- libc.src.__support.math.lround
- libc.src.__support.math.lroundbf16
- libc.src.__support.math.lroundf
- libc.src.__support.math.lroundf128
- libc.src.__support.math.lroundf16
- libc.src.__support.math.lroundl
- libc.src.__support.math.modf
- libc.src.__support.math.modfbf16
- libc.src.__support.math.modff
- libc.src.__support.math.modff128
- libc.src.__support.math.modff16
- libc.src.__support.math.modfl
- libc.src.__support.math.nan
- libc.src.__support.math.nanbf16
- libc.src.__support.math.nanf
- libc.src.__support.math.nanf128
- libc.src.__support.math.nanf16
- libc.src.__support.math.nanl
- libc.src.__support.math.nearbyint
- libc.src.__support.math.nearbyintbf16
- libc.src.__support.math.nearbyintf
- libc.src.__support.math.nearbyintf128
- libc.src.__support.math.nearbyintf16
- libc.src.__support.math.nearbyintl
- libc.src.__support.math.nextdown
- libc.src.__support.math.nextdownbf16
- libc.src.__support.math.nextdownf
- libc.src.__support.math.nextdownf128
- libc.src.__support.math.nextdownf16
- libc.src.__support.math.nextdownl
- libc.src.__support.math.nextup
- libc.src.__support.math.nextupbf16
- libc.src.__support.math.nextupf
- libc.src.__support.math.nextupf128
- libc.src.__support.math.nextupf16
- libc.src.__support.math.nextupl
- libc.src.__support.math.nexttoward
- libc.src.__support.math.nexttowardbf16
- libc.src.__support.math.nexttowardf
- libc.src.__support.math.nexttowardf16
- libc.src.__support.math.nexttowardl
- libc.src.__support.math.nextafter
- libc.src.__support.math.nextafterbf16
- libc.src.__support.math.nextafterf
- libc.src.__support.math.nextafterf16
- libc.src.__support.math.nextafterl
- libc.src.__support.math.nextafterf128
- libc.src.__support.math.pow
- libc.src.__support.math.powf
- libc.src.__support.math.remainder
- libc.src.__support.math.remainderbf16
- libc.src.__support.math.remainderf
- libc.src.__support.math.remainderf128
- libc.src.__support.math.remainderf16
- libc.src.__support.math.remainderl
- libc.src.__support.math.remquo
- libc.src.__support.math.remquobf16
- libc.src.__support.math.remquof
- libc.src.__support.math.remquof128
- libc.src.__support.math.remquof16
- libc.src.__support.math.remquol
- libc.src.__support.math.rint
- libc.src.__support.math.rintbf16
- libc.src.__support.math.rintf
- libc.src.__support.math.rintf128
- libc.src.__support.math.rintf16
- libc.src.__support.math.rintl
- libc.src.__support.math.round
- libc.src.__support.math.roundbf16
- libc.src.__support.math.roundeven
- libc.src.__support.math.roundevenbf16
- libc.src.__support.math.roundevenf
- libc.src.__support.math.roundevenf128
- libc.src.__support.math.roundevenf16
- libc.src.__support.math.roundevenl
- libc.src.__support.math.roundf
- libc.src.__support.math.roundf128
- libc.src.__support.math.roundf16
- libc.src.__support.math.roundl
- libc.src.__support.math.rsqrtf
- libc.src.__support.math.rsqrtf16
- libc.src.__support.math.scalbln
- libc.src.__support.math.scalblnbf16
- libc.src.__support.math.scalblnf
- libc.src.__support.math.scalblnf128
- libc.src.__support.math.scalblnf16
- libc.src.__support.math.scalblnl
- libc.src.__support.math.scalbn
- libc.src.__support.math.scalbnbf16
- libc.src.__support.math.scalbnf
- libc.src.__support.math.scalbnf128
- libc.src.__support.math.scalbnf16
- libc.src.__support.math.scalbnl
- libc.src.__support.math.setpayload
- libc.src.__support.math.setpayloadbf16
- libc.src.__support.math.setpayloadf
- libc.src.__support.math.setpayloadf128
- libc.src.__support.math.setpayloadf16
- libc.src.__support.math.setpayloadl
- libc.src.__support.math.setpayloadsig
- libc.src.__support.math.setpayloadsigbf16
- libc.src.__support.math.setpayloadsigf
- libc.src.__support.math.setpayloadsigf128
- libc.src.__support.math.setpayloadsigf16
- libc.src.__support.math.setpayloadsigl
- libc.src.__support.math.sqrtf16
- libc.src.__support.math.sin
- libc.src.__support.math.sincos
- libc.src.__support.math.sincosf
- libc.src.__support.math.sinf
- libc.src.__support.math.sinf16
- libc.src.__support.math.sinhf
- libc.src.__support.math.sinhf16
- libc.src.__support.math.sqrtf128
- libc.src.__support.math.sinpif
- libc.src.__support.math.sinpif16
- libc.src.__support.math.sqrt
- libc.src.__support.math.sqrtbf16
- libc.src.__support.math.sqrtf
- libc.src.__support.math.sqrtl
- libc.src.__support.math.tan
- libc.src.__support.math.tanbf16
- libc.src.__support.math.tanf
- libc.src.__support.math.tanf16
- libc.src.__support.math.tanhf
- libc.src.__support.math.tanhf16
- libc.src.__support.math.tanpif
- libc.src.__support.math.tanpif16
- libc.src.__support.math.trunc
- libc.src.__support.math.truncbf16
- libc.src.__support.math.truncf
- libc.src.__support.math.truncf128
- libc.src.__support.math.truncf16
- libc.src.__support.math.truncl
- libc.src.__support.math.ufromfp
- libc.src.__support.math.ufromfpbf16
- libc.src.__support.math.ufromfpf
- libc.src.__support.math.ufromfpf128
- libc.src.__support.math.ufromfpf16
- libc.src.__support.math.ufromfpl
- libc.src.__support.math.ufromfpx
- libc.src.__support.math.ufromfpxbf16
- libc.src.__support.math.ufromfpxf
- libc.src.__support.math.ufromfpxf128
- libc.src.__support.math.ufromfpxf16
- libc.src.__support.math.ufromfpxl
- libc.src.__support.math.totalorder
- libc.src.__support.math.totalorderbf16
- libc.src.__support.math.totalorderf
- libc.src.__support.math.totalorderf128
- libc.src.__support.math.totalorderf16
- libc.src.__support.math.totalorderl
- libc.src.__support.math.totalordermag
- libc.src.__support.math.totalordermagbf16
- libc.src.__support.math.totalordermagf
- libc.src.__support.math.totalordermagf128
- libc.src.__support.math.totalordermagf16
- libc.src.__support.math.totalordermagl
-)
+ add_fp_unittest(
+ shared_math_test
+ SUITE
+ libc-shared-tests
+ SRCS
+ shared_math_test.cpp
+ DEPENDS
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.math.acos
+ libc.src.__support.math.acosbf16
+ libc.src.__support.math.acosf
+ libc.src.__support.math.acosf16
+ libc.src.__support.math.acoshf
+ libc.src.__support.math.acoshf16
+ libc.src.__support.math.acospif
+ libc.src.__support.math.acospif16
+ libc.src.__support.math.asin
+ libc.src.__support.math.asinbf16
+ libc.src.__support.math.asinf
+ libc.src.__support.math.asinf16
+ libc.src.__support.math.asinhf
+ libc.src.__support.math.asinhf16
+ libc.src.__support.math.asinpi
+ libc.src.__support.math.asinpif
+ libc.src.__support.math.asinpif16
+ libc.src.__support.math.atan
+ libc.src.__support.math.atan2
+ libc.src.__support.math.atan2f
+ libc.src.__support.math.atan2f128
+ libc.src.__support.math.atan2f16
+ libc.src.__support.math.atanbf16
+ libc.src.__support.math.atanf
+ libc.src.__support.math.atanf16
+ libc.src.__support.math.atanhf
+ libc.src.__support.math.atanhf16
+ libc.src.__support.math.atanpif16
+ libc.src.__support.math.bf16add
+ libc.src.__support.math.bf16addf
+ libc.src.__support.math.bf16addl
+ libc.src.__support.math.bf16addf128
+ libc.src.__support.math.bf16div
+ libc.src.__support.math.bf16divf
+ libc.src.__support.math.bf16divf128
+ libc.src.__support.math.bf16divl
+ libc.src.__support.math.bf16fma
+ libc.src.__support.math.bf16fmaf
+ libc.src.__support.math.bf16fmaf128
+ libc.src.__support.math.bf16fmal
+ libc.src.__support.math.bf16mul
+ libc.src.__support.math.bf16mulf
+ libc.src.__support.math.bf16mulf128
+ libc.src.__support.math.bf16mull
+ libc.src.__support.math.bf16sub
+ libc.src.__support.math.bf16subf
+ libc.src.__support.math.bf16subf128
+ libc.src.__support.math.bf16subl
+ libc.src.__support.math.canonicalize
+ libc.src.__support.math.canonicalizebf16
+ libc.src.__support.math.canonicalizef
+ libc.src.__support.math.canonicalizef128
+ libc.src.__support.math.canonicalizef16
+ libc.src.__support.math.canonicalizel
+ libc.src.__support.math.cbrt
+ libc.src.__support.math.cbrtbf16
+ libc.src.__support.math.cbrtf
+ libc.src.__support.math.cbrtf16
+ libc.src.__support.math.ceil
+ libc.src.__support.math.ceilbf16
+ libc.src.__support.math.ceilf
+ libc.src.__support.math.ceilf128
+ libc.src.__support.math.ceilf16
+ libc.src.__support.math.ceill
+ libc.src.__support.math.copysign
+ libc.src.__support.math.copysignbf16
+ libc.src.__support.math.copysignf
+ libc.src.__support.math.copysignf128
+ libc.src.__support.math.copysignf16
+ libc.src.__support.math.copysignl
+ libc.src.__support.math.cos
+ libc.src.__support.math.cosf
+ libc.src.__support.math.cosf16
+ libc.src.__support.math.coshf
+ libc.src.__support.math.coshf16
+ libc.src.__support.math.cospif
+ libc.src.__support.math.cospif16
+ libc.src.__support.math.daddf128
+ libc.src.__support.math.daddl
+ libc.src.__support.math.ddivf128
+ libc.src.__support.math.ddivl
+ libc.src.__support.math.dfmaf128
+ libc.src.__support.math.dfmal
+ libc.src.__support.math.dmulf128
+ libc.src.__support.math.dmull
+ libc.src.__support.math.dsqrtf128
+ libc.src.__support.math.dsqrtl
+ libc.src.__support.math.dsubf128
+ libc.src.__support.math.dsubl
+ libc.src.__support.math.exp10m1f
+ libc.src.__support.math.exp10m1f16
+ libc.src.__support.math.erfcf16
+ libc.src.__support.math.erff
+ libc.src.__support.math.erff16
+ libc.src.__support.math.exp
+ libc.src.__support.math.exp2
+ libc.src.__support.math.exp2f
+ libc.src.__support.math.exp2f16
+ libc.src.__support.math.exp2m1f
+ libc.src.__support.math.exp2m1f16
+ libc.src.__support.math.expm1
+ libc.src.__support.math.expm1f
+ libc.src.__support.math.expm1f16
+ libc.src.__support.math.exp10
+ libc.src.__support.math.exp10f
+ libc.src.__support.math.exp10f16
+ libc.src.__support.math.expf
+ libc.src.__support.math.expbf16
+ libc.src.__support.math.expf16
+ libc.src.__support.math.f16add
+ libc.src.__support.math.f16addf
+ libc.src.__support.math.f16addf128
+ libc.src.__support.math.f16addl
+ libc.src.__support.math.f16div
+ libc.src.__support.math.f16divf
+ libc.src.__support.math.f16divf128
+ libc.src.__support.math.f16divl
+ libc.src.__support.math.f16fma
+ libc.src.__support.math.f16fmaf
+ libc.src.__support.math.f16fmaf128
+ libc.src.__support.math.f16fmal
+ libc.src.__support.math.f16mul
+ libc.src.__support.math.f16mulf
+ libc.src.__support.math.f16mulf128
+ libc.src.__support.math.f16mull
+ libc.src.__support.math.f16sqrt
+ libc.src.__support.math.f16sqrtf
+ libc.src.__support.math.f16sqrtf128
+ libc.src.__support.math.f16sqrtl
+ libc.src.__support.math.f16sub
+ libc.src.__support.math.f16subf
+ libc.src.__support.math.f16subf128
+ libc.src.__support.math.f16subl
+ libc.src.__support.math.fabs
+ libc.src.__support.math.fabsbf16
+ libc.src.__support.math.fabsf
+ libc.src.__support.math.fabsf128
+ libc.src.__support.math.fabsf16
+ libc.src.__support.math.fabsl
+ libc.src.__support.math.fadd
+ libc.src.__support.math.faddf128
+ libc.src.__support.math.faddl
+ libc.src.__support.math.fdim
+ libc.src.__support.math.fdimbf16
+ libc.src.__support.math.fdimf
+ libc.src.__support.math.fdimf128
+ libc.src.__support.math.fdimf16
+ libc.src.__support.math.fdiml
+ libc.src.__support.math.fdiv
+ libc.src.__support.math.fdivf128
+ libc.src.__support.math.fdivl
+ libc.src.__support.math.ffma
+ libc.src.__support.math.ffmaf128
+ libc.src.__support.math.ffmal
+ libc.src.__support.math.floor
+ libc.src.__support.math.floorbf16
+ libc.src.__support.math.floorf
+ libc.src.__support.math.floorf128
+ libc.src.__support.math.floorf16
+ libc.src.__support.math.floorl
+ libc.src.__support.math.fma
+ libc.src.__support.math.fmaf
+ libc.src.__support.math.fmaf16
+ libc.src.__support.math.fmabf16
+ libc.src.__support.math.fmax
+ libc.src.__support.math.fmaxbf16
+ libc.src.__support.math.fmaxf
+ libc.src.__support.math.fmaxf128
+ libc.src.__support.math.fmaxf16
+ libc.src.__support.math.fmaximum
+ libc.src.__support.math.fmaximum_mag
+ libc.src.__support.math.fmaximum_mag_num
+ libc.src.__support.math.fmaximum_mag_numbf16
+ libc.src.__support.math.fmaximum_mag_numf
+ libc.src.__support.math.fmaximum_mag_numf128
+ libc.src.__support.math.fmaximum_mag_numf16
+ libc.src.__support.math.fmaximum_mag_numl
+ libc.src.__support.math.fmaximum_magbf16
+ libc.src.__support.math.fmaximum_magf
+ libc.src.__support.math.fmaximum_magf128
+ libc.src.__support.math.fmaximum_magf16
+ libc.src.__support.math.fmaximum_magl
+ libc.src.__support.math.fmaximum_num
+ libc.src.__support.math.fmaximum_numbf16
+ libc.src.__support.math.fmaximum_numf
+ libc.src.__support.math.fmaximum_numf128
+ libc.src.__support.math.fmaximum_numf16
+ libc.src.__support.math.fmaximum_numl
+ libc.src.__support.math.fmaximumbf16
+ libc.src.__support.math.fmaximumf
+ libc.src.__support.math.fmaximumf128
+ libc.src.__support.math.fmaximumf16
+ libc.src.__support.math.fmaximuml
+ libc.src.__support.math.fmaxl
+ libc.src.__support.math.fmin
+ libc.src.__support.math.fminbf16
+ libc.src.__support.math.fminf
+ libc.src.__support.math.fminf128
+ libc.src.__support.math.fminf16
+ libc.src.__support.math.fminimum
+ libc.src.__support.math.fminimum_mag
+ libc.src.__support.math.fminimum_mag_num
+ libc.src.__support.math.fminimum_mag_numbf16
+ libc.src.__support.math.fminimum_mag_numf
+ libc.src.__support.math.fminimum_mag_numf128
+ libc.src.__support.math.fminimum_mag_numf16
+ libc.src.__support.math.fminimum_mag_numl
+ libc.src.__support.math.fminimum_magbf16
+ libc.src.__support.math.fminimum_magf
+ libc.src.__support.math.fminimum_magf128
+ libc.src.__support.math.fminimum_magf16
+ libc.src.__support.math.fminimum_magl
+ libc.src.__support.math.fminimum_num
+ libc.src.__support.math.fminimum_numbf16
+ libc.src.__support.math.fminimum_numf
+ libc.src.__support.math.fminimum_numf128
+ libc.src.__support.math.fminimum_numf16
+ libc.src.__support.math.fminimum_numl
+ libc.src.__support.math.fminimumbf16
+ libc.src.__support.math.fminimumf
+ libc.src.__support.math.fminimumf128
+ libc.src.__support.math.fminimumf16
+ libc.src.__support.math.fminimuml
+ libc.src.__support.math.fminl
+ libc.src.__support.math.fmod
+ libc.src.__support.math.fmodbf16
+ libc.src.__support.math.fmodf
+ libc.src.__support.math.fmodf128
+ libc.src.__support.math.fmodf16
+ libc.src.__support.math.fmodl
+ libc.src.__support.math.fmul
+ libc.src.__support.math.fmulf128
+ libc.src.__support.math.fmull
+ libc.src.__support.math.frexp
+ libc.src.__support.math.frexpbf16
+ libc.src.__support.math.frexpf
+ libc.src.__support.math.frexpf128
+ libc.src.__support.math.frexpf16
+ libc.src.__support.math.frexpl
+ libc.src.__support.math.fromfp
+ libc.src.__support.math.fromfpbf16
+ libc.src.__support.math.fromfpf
+ libc.src.__support.math.fromfpf128
+ libc.src.__support.math.fromfpf16
+ libc.src.__support.math.fromfpl
+ libc.src.__support.math.fromfpx
+ libc.src.__support.math.fromfpxbf16
+ libc.src.__support.math.fromfpxf
+ libc.src.__support.math.fromfpxf128
+ libc.src.__support.math.fromfpxf16
+ libc.src.__support.math.fromfpxl
+ libc.src.__support.math.fsqrt
+ libc.src.__support.math.fsqrtf128
+ libc.src.__support.math.fsqrtl
+ libc.src.__support.math.fsub
+ libc.src.__support.math.fsubf128
+ libc.src.__support.math.fsubl
+ libc.src.__support.math.getpayload
+ libc.src.__support.math.getpayloadbf16
+ libc.src.__support.math.getpayloadf
+ libc.src.__support.math.getpayloadf128
+ libc.src.__support.math.getpayloadf16
+ libc.src.__support.math.getpayloadl
+ libc.src.__support.math.hypot
+ libc.src.__support.math.hypotf
+ libc.src.__support.math.hypotbf16
+ libc.src.__support.math.hypotf16
+ libc.src.__support.math.ilogb
+ libc.src.__support.math.ilogbbf16
+ libc.src.__support.math.ilogbf
+ libc.src.__support.math.ilogbf16
+ libc.src.__support.math.ilogbf128
+ libc.src.__support.math.ilogbl
+ libc.src.__support.math.iscanonical
+ libc.src.__support.math.iscanonicalbf16
+ libc.src.__support.math.iscanonicalf
+ libc.src.__support.math.iscanonicalf128
+ libc.src.__support.math.iscanonicalf16
+ libc.src.__support.math.iscanonicall
+ libc.src.__support.math.isnan
+ libc.src.__support.math.isnanf
+ libc.src.__support.math.isnanf128
+ libc.src.__support.math.isnanf16
+ libc.src.__support.math.isnanl
+ libc.src.__support.math.issignaling
+ libc.src.__support.math.issignalingbf16
+ libc.src.__support.math.issignalingf
+ libc.src.__support.math.issignalingf128
+ libc.src.__support.math.issignalingf16
+ libc.src.__support.math.issignalingl
+ libc.src.__support.math.ldexp
+ libc.src.__support.math.ldexpbf16
+ libc.src.__support.math.ldexpf
+ libc.src.__support.math.ldexpl
+ libc.src.__support.math.llogb
+ libc.src.__support.math.llogbbf16
+ libc.src.__support.math.llrint
+ libc.src.__support.math.llrintbf16
+ libc.src.__support.math.llrintf
+ libc.src.__support.math.llrintf128
+ libc.src.__support.math.llrintf16
+ libc.src.__support.math.llrintl
+ libc.src.__support.math.llround
+ libc.src.__support.math.llroundbf16
+ libc.src.__support.math.llroundf
+ libc.src.__support.math.llroundf128
+ libc.src.__support.math.llroundf16
+ libc.src.__support.math.llroundl
+ libc.src.__support.math.log
+ libc.src.__support.math.log10
+ libc.src.__support.math.log10f16
+ libc.src.__support.math.log10p1f16
+ libc.src.__support.math.log10f
+ libc.src.__support.math.log1p
+ libc.src.__support.math.log1pf
+ libc.src.__support.math.log2
+ libc.src.__support.math.logb
+ libc.src.__support.math.log2f
+ libc.src.__support.math.log2f16
+ libc.src.__support.math.log2p1f16
+ libc.src.__support.math.logbf
+ libc.src.__support.math.logbbf16
+ libc.src.__support.math.logbf128
+ libc.src.__support.math.logbf16
+ libc.src.__support.math.logf
+ libc.src.__support.math.log_bf16
+ libc.src.__support.math.ldexpf
+ libc.src.__support.math.ldexpf128
+ libc.src.__support.math.ldexpf16
+ libc.src.__support.math.lgammaf16
+ libc.src.__support.math.llogbf
+ libc.src.__support.math.llogbf128
+ libc.src.__support.math.llogbf16
+ libc.src.__support.math.logbl
+ libc.src.__support.math.logf16
+ libc.src.__support.math.llogbl
+ libc.src.__support.math.lrint
+ libc.src.__support.math.lrintbf16
+ libc.src.__support.math.lrintf
+ libc.src.__support.math.lrintf128
+ libc.src.__support.math.lrintf16
+ libc.src.__support.math.lrintl
+ libc.src.__support.math.lround
+ libc.src.__support.math.lroundbf16
+ libc.src.__support.math.lroundf
+ libc.src.__support.math.lroundf128
+ libc.src.__support.math.lroundf16
+ libc.src.__support.math.lroundl
+ libc.src.__support.math.modf
+ libc.src.__support.math.modfbf16
+ libc.src.__support.math.modff
+ libc.src.__support.math.modff128
+ libc.src.__support.math.modff16
+ libc.src.__support.math.modfl
+ libc.src.__support.math.nan
+ libc.src.__support.math.nanbf16
+ libc.src.__support.math.nanf
+ libc.src.__support.math.nanf128
+ libc.src.__support.math.nanf16
+ libc.src.__support.math.nanl
+ libc.src.__support.math.nearbyint
+ libc.src.__support.math.nearbyintbf16
+ libc.src.__support.math.nearbyintf
+ libc.src.__support.math.nearbyintf128
+ libc.src.__support.math.nearbyintf16
+ libc.src.__support.math.nearbyintl
+ libc.src.__support.math.nextdown
+ libc.src.__support.math.nextdownbf16
+ libc.src.__support.math.nextdownf
+ libc.src.__support.math.nextdownf128
+ libc.src.__support.math.nextdownf16
+ libc.src.__support.math.nextdownl
+ libc.src.__support.math.nextup
+ libc.src.__support.math.nextupbf16
+ libc.src.__support.math.nextupf
+ libc.src.__support.math.nextupf128
+ libc.src.__support.math.nextupf16
+ libc.src.__support.math.nextupl
+ libc.src.__support.math.nexttoward
+ libc.src.__support.math.nexttowardbf16
+ libc.src.__support.math.nexttowardf
+ libc.src.__support.math.nexttowardf16
+ libc.src.__support.math.nexttowardl
+ libc.src.__support.math.nextafter
+ libc.src.__support.math.nextafterbf16
+ libc.src.__support.math.nextafterf
+ libc.src.__support.math.nextafterf16
+ libc.src.__support.math.nextafterl
+ libc.src.__support.math.nextafterf128
+ libc.src.__support.math.pow
+ libc.src.__support.math.powf
+ libc.src.__support.math.remainder
+ libc.src.__support.math.remainderbf16
+ libc.src.__support.math.remainderf
+ libc.src.__support.math.remainderf128
+ libc.src.__support.math.remainderf16
+ libc.src.__support.math.remainderl
+ libc.src.__support.math.remquo
+ libc.src.__support.math.remquobf16
+ libc.src.__support.math.remquof
+ libc.src.__support.math.remquof128
+ libc.src.__support.math.remquof16
+ libc.src.__support.math.remquol
+ libc.src.__support.math.rint
+ libc.src.__support.math.rintbf16
+ libc.src.__support.math.rintf
+ libc.src.__support.math.rintf128
+ libc.src.__support.math.rintf16
+ libc.src.__support.math.rintl
+ libc.src.__support.math.round
+ libc.src.__support.math.roundbf16
+ libc.src.__support.math.roundeven
+ libc.src.__support.math.roundevenbf16
+ libc.src.__support.math.roundevenf
+ libc.src.__support.math.roundevenf128
+ libc.src.__support.math.roundevenf16
+ libc.src.__support.math.roundevenl
+ libc.src.__support.math.roundf
+ libc.src.__support.math.roundf128
+ libc.src.__support.math.roundf16
+ libc.src.__support.math.roundl
+ libc.src.__support.math.rsqrtf
+ libc.src.__support.math.rsqrtf16
+ libc.src.__support.math.scalbln
+ libc.src.__support.math.scalblnbf16
+ libc.src.__support.math.scalblnf
+ libc.src.__support.math.scalblnf128
+ libc.src.__support.math.scalblnf16
+ libc.src.__support.math.scalblnl
+ libc.src.__support.math.scalbn
+ libc.src.__support.math.scalbnbf16
+ libc.src.__support.math.scalbnf
+ libc.src.__support.math.scalbnf128
+ libc.src.__support.math.scalbnf16
+ libc.src.__support.math.scalbnl
+ libc.src.__support.math.setpayload
+ libc.src.__support.math.setpayloadbf16
+ libc.src.__support.math.setpayloadf
+ libc.src.__support.math.setpayloadf128
+ libc.src.__support.math.setpayloadf16
+ libc.src.__support.math.setpayloadl
+ libc.src.__support.math.setpayloadsig
+ libc.src.__support.math.setpayloadsigbf16
+ libc.src.__support.math.setpayloadsigf
+ libc.src.__support.math.setpayloadsigf128
+ libc.src.__support.math.setpayloadsigf16
+ libc.src.__support.math.setpayloadsigl
+ libc.src.__support.math.sqrtf16
+ libc.src.__support.math.sin
+ libc.src.__support.math.sincos
+ libc.src.__support.math.sincosf
+ libc.src.__support.math.sinf
+ libc.src.__support.math.sinf16
+ libc.src.__support.math.sinhf
+ libc.src.__support.math.sinhf16
+ libc.src.__support.math.sqrtf128
+ libc.src.__support.math.sinpif
+ libc.src.__support.math.sinpif16
+ libc.src.__support.math.sqrt
+ libc.src.__support.math.sqrtbf16
+ libc.src.__support.math.sqrtf
+ libc.src.__support.math.sqrtl
+ libc.src.__support.math.tan
+ libc.src.__support.math.tanbf16
+ libc.src.__support.math.tanf
+ libc.src.__support.math.tanf16
+ libc.src.__support.math.tanhf
+ libc.src.__support.math.tanhf16
+ libc.src.__support.math.tanpif
+ libc.src.__support.math.tanpif16
+ libc.src.__support.math.trunc
+ libc.src.__support.math.truncbf16
+ libc.src.__support.math.truncf
+ libc.src.__support.math.truncf128
+ libc.src.__support.math.truncf16
+ libc.src.__support.math.truncl
+ libc.src.__support.math.ufromfp
+ libc.src.__support.math.ufromfpbf16
+ libc.src.__support.math.ufromfpf
+ libc.src.__support.math.ufromfpf128
+ libc.src.__support.math.ufromfpf16
+ libc.src.__support.math.ufromfpl
+ libc.src.__support.math.ufromfpx
+ libc.src.__support.math.ufromfpxbf16
+ libc.src.__support.math.ufromfpxf
+ libc.src.__support.math.ufromfpxf128
+ libc.src.__support.math.ufromfpxf16
+ libc.src.__support.math.ufromfpxl
+ libc.src.__support.math.totalorder
+ libc.src.__support.math.totalorderbf16
+ libc.src.__support.math.totalorderf
+ libc.src.__support.math.totalorderf128
+ libc.src.__support.math.totalorderf16
+ libc.src.__support.math.totalorderl
+ libc.src.__support.math.totalordermag
+ libc.src.__support.math.totalordermagbf16
+ libc.src.__support.math.totalordermagf
+ libc.src.__support.math.totalordermagf128
+ libc.src.__support.math.totalordermagf16
+ libc.src.__support.math.totalordermagl
+ )
-add_fp_unittest(
- shared_math_constexpr_test
- SUITE
- libc-shared-tests
- SRCS
- shared_math_constexpr_test.cpp
- DEPENDS
- libc.src.__support.math.asinbf16
- libc.src.__support.math.bf16subl
- libc.src.__support.math.canonicalize
- libc.src.__support.math.canonicalizebf16
- libc.src.__support.math.canonicalizef
- libc.src.__support.math.canonicalizef128
- libc.src.__support.math.canonicalizef16
- libc.src.__support.math.canonicalizel
- libc.src.__support.math.ceil
- libc.src.__support.math.ceilbf16
- libc.src.__support.math.ceilf
- libc.src.__support.math.ceilf128
- libc.src.__support.math.ceilf16
- libc.src.__support.math.ceill
- libc.src.__support.math.copysign
- libc.src.__support.math.copysignbf16
- libc.src.__support.math.copysignf
- libc.src.__support.math.copysignf128
- libc.src.__support.math.copysignf16
- libc.src.__support.math.copysignl
- libc.src.__support.math.ddivf128
- libc.src.__support.math.ddivl
- libc.src.__support.math.dmulf128
- libc.src.__support.math.dmull
- libc.src.__support.math.dsqrtf128
- libc.src.__support.math.f16add
- libc.src.__support.math.f16addf
- libc.src.__support.math.f16addf128
- libc.src.__support.math.f16addl
- libc.src.__support.math.fadd
- libc.src.__support.math.faddf128
- libc.src.__support.math.faddl
- libc.src.__support.math.fdim
- libc.src.__support.math.fdimbf16
- libc.src.__support.math.fdimf
- libc.src.__support.math.fdimf128
- libc.src.__support.math.fdimf16
- libc.src.__support.math.fdiml
- libc.src.__support.math.fdiv
- libc.src.__support.math.fdivf128
- libc.src.__support.math.fdivl
- libc.src.__support.math.floor
- libc.src.__support.math.floorbf16
- libc.src.__support.math.floorf
- libc.src.__support.math.floorf128
- libc.src.__support.math.floorf16
- libc.src.__support.math.floorl
- libc.src.__support.math.fabs
- libc.src.__support.math.fabsbf16
- libc.src.__support.math.fabsf
- libc.src.__support.math.fabsf128
- libc.src.__support.math.fabsf16
- libc.src.__support.math.fabsl
- libc.src.__support.math.fmaximum
- libc.src.__support.math.fmaximum_mag
- libc.src.__support.math.fmaximum_mag_num
- libc.src.__support.math.fmaximum_mag_numbf16
- libc.src.__support.math.fmaximum_mag_numf
- libc.src.__support.math.fmaximum_mag_numf128
- libc.src.__support.math.fmaximum_mag_numf16
- libc.src.__support.math.fmaximum_mag_numl
- libc.src.__support.math.fmaximum_magbf16
- libc.src.__support.math.fmaximum_magf
- libc.src.__support.math.fmaximum_magf128
- libc.src.__support.math.fmaximum_magf16
- libc.src.__support.math.fmaximum_magl
- libc.src.__support.math.fmaximum_num
- libc.src.__support.math.fmaximum_numbf16
- libc.src.__support.math.fmaximum_numf
- libc.src.__support.math.fmaximum_numf128
- libc.src.__support.math.fmaximum_numf16
- libc.src.__support.math.fmaximum_numl
- libc.src.__support.math.fmaximumbf16
- libc.src.__support.math.fmaximumf
- libc.src.__support.math.fmaximumf128
- libc.src.__support.math.fmaximumf16
- libc.src.__support.math.fmaximuml
- libc.src.__support.math.fmin
- libc.src.__support.math.fminbf16
- libc.src.__support.math.fminf
- libc.src.__support.math.fminf128
- libc.src.__support.math.fminf16
- libc.src.__support.math.fminimum
- libc.src.__support.math.fminimum_mag
- libc.src.__support.math.fminimum_mag_num
- libc.src.__support.math.fminimum_mag_numbf16
- libc.src.__support.math.fminimum_mag_numf
- libc.src.__support.math.fminimum_mag_numf128
- libc.src.__support.math.fminimum_mag_numf16
- libc.src.__support.math.fminimum_mag_numl
- libc.src.__support.math.fminimum_magbf16
- libc.src.__support.math.fminimum_magf
- libc.src.__support.math.fminimum_magf128
- libc.src.__support.math.fminimum_magf16
- libc.src.__support.math.fminimum_magl
- libc.src.__support.math.fminimum_num
- libc.src.__support.math.fminimum_numbf16
- libc.src.__support.math.fminimum_numf
- libc.src.__support.math.fminimum_numf128
- libc.src.__support.math.fminimum_numf16
- libc.src.__support.math.fminimum_numl
- libc.src.__support.math.fminimumbf16
- libc.src.__support.math.fminimumf
- libc.src.__support.math.fminimumf128
- libc.src.__support.math.fminimumf16
- libc.src.__support.math.fminimuml
- libc.src.__support.math.fminl
- libc.src.__support.math.fmod
- libc.src.__support.math.fmodbf16
- libc.src.__support.math.fmodf
- libc.src.__support.math.fmodf128
- libc.src.__support.math.fmodf16
- libc.src.__support.math.fmodl
- libc.src.__support.math.fmul
- libc.src.__support.math.fmulf128
- libc.src.__support.math.fmull
- libc.src.__support.math.frexp
- libc.src.__support.math.frexpbf16
- libc.src.__support.math.frexpl
- libc.src.__support.math.fromfp
- libc.src.__support.math.fromfpbf16
- libc.src.__support.math.fromfpf
- libc.src.__support.math.fromfpf128
- libc.src.__support.math.fromfpf16
- libc.src.__support.math.fromfpl
- libc.src.__support.math.fromfpx
- libc.src.__support.math.fromfpxbf16
- libc.src.__support.math.fromfpxf
- libc.src.__support.math.fromfpxf128
- libc.src.__support.math.fromfpxf16
- libc.src.__support.math.fromfpxl
- libc.src.__support.math.fsub
- libc.src.__support.math.fsubf128
- libc.src.__support.math.fsubl
- libc.src.__support.math.getpayload
- libc.src.__support.math.getpayloadbf16
- libc.src.__support.math.getpayloadf
- libc.src.__support.math.getpayloadf128
- libc.src.__support.math.getpayloadf16
- libc.src.__support.math.getpayloadl
- libc.src.__support.math.iscanonical
- libc.src.__support.math.iscanonicalbf16
- libc.src.__support.math.iscanonicalf
- libc.src.__support.math.iscanonicalf128
- libc.src.__support.math.iscanonicalf16
- libc.src.__support.math.iscanonicall
- libc.src.__support.math.isnan
- libc.src.__support.math.isnanf
- libc.src.__support.math.isnanf128
- libc.src.__support.math.isnanf16
- libc.src.__support.math.isnanl
- libc.src.__support.math.issignaling
- libc.src.__support.math.issignalingbf16
- libc.src.__support.math.issignalingf
- libc.src.__support.math.issignalingf128
- libc.src.__support.math.issignalingf16
- libc.src.__support.math.issignalingl
- libc.src.__support.math.ldexp
- libc.src.__support.math.ldexpbf16
- libc.src.__support.math.ldexpl
- libc.src.__support.math.llogbbf16
- libc.src.__support.math.llrint
- libc.src.__support.math.llrintbf16
- libc.src.__support.math.llrintf
- libc.src.__support.math.llrintf128
- libc.src.__support.math.llrintf16
- libc.src.__support.math.llrintl
- libc.src.__support.math.llround
- libc.src.__support.math.llroundbf16
- libc.src.__support.math.llroundf
- libc.src.__support.math.llroundf128
- libc.src.__support.math.llroundf16
- libc.src.__support.math.llroundl
- libc.src.__support.math.log
- libc.src.__support.math.logbbf16
- libc.src.__support.math.ilogbbf16
- libc.src.__support.math.lrint
- libc.src.__support.math.lrintbf16
- libc.src.__support.math.lrintf
- libc.src.__support.math.lrintf128
- libc.src.__support.math.lrintf16
- libc.src.__support.math.lrintl
- libc.src.__support.math.lround
- libc.src.__support.math.lroundbf16
- libc.src.__support.math.lroundf
- libc.src.__support.math.lroundf128
- libc.src.__support.math.lroundf16
- libc.src.__support.math.lroundl
- libc.src.__support.math.modf
- libc.src.__support.math.modfbf16
- libc.src.__support.math.modff
- libc.src.__support.math.modff128
- libc.src.__support.math.modff16
- libc.src.__support.math.modfl
- libc.src.__support.math.nan
- libc.src.__support.math.nanbf16
- libc.src.__support.math.nanf
- libc.src.__support.math.nanf128
- libc.src.__support.math.nanf16
- libc.src.__support.math.nanl
- libc.src.__support.math.nearbyint
- libc.src.__support.math.nearbyintbf16
- libc.src.__support.math.nearbyintf
- libc.src.__support.math.nearbyintf128
- libc.src.__support.math.nearbyintf16
- libc.src.__support.math.nearbyintl
- libc.src.__support.math.nextafter
- libc.src.__support.math.nextafterbf16
- libc.src.__support.math.nextafterf
- libc.src.__support.math.nextafterf16
- libc.src.__support.math.nextafterl
- libc.src.__support.math.nextafterf128
- libc.src.__support.math.remainder
- libc.src.__support.math.remainderbf16
- libc.src.__support.math.remainderf
- libc.src.__support.math.remainderf128
- libc.src.__support.math.remainderf16
- libc.src.__support.math.remainderl
- libc.src.__support.math.remquo
- libc.src.__support.math.remquobf16
- libc.src.__support.math.remquof
- libc.src.__support.math.remquof128
- libc.src.__support.math.remquof16
- libc.src.__support.math.remquol
- libc.src.__support.math.rint
- libc.src.__support.math.rintbf16
- libc.src.__support.math.rintf
- libc.src.__support.math.rintf128
- libc.src.__support.math.rintf16
- libc.src.__support.math.rintl
- libc.src.__support.math.round
- libc.src.__support.math.roundbf16
- libc.src.__support.math.roundeven
- libc.src.__support.math.roundevenbf16
- libc.src.__support.math.roundevenf
- libc.src.__support.math.roundevenf128
- libc.src.__support.math.roundevenf16
- libc.src.__support.math.roundevenl
- libc.src.__support.math.roundf
- libc.src.__support.math.roundf128
- libc.src.__support.math.roundf16
- libc.src.__support.math.roundl
- libc.src.__support.math.scalbln
- libc.src.__support.math.scalblnbf16
- libc.src.__support.math.scalblnf
- libc.src.__support.math.scalblnf128
- libc.src.__support.math.scalblnf16
- libc.src.__support.math.scalblnl
- libc.src.__support.math.scalbn
- libc.src.__support.math.scalbnbf16
- libc.src.__support.math.scalbnf
- libc.src.__support.math.scalbnf128
- libc.src.__support.math.scalbnf16
- libc.src.__support.math.scalbnl
- libc.src.__support.math.setpayload
- libc.src.__support.math.setpayloadbf16
- libc.src.__support.math.setpayloadf
- libc.src.__support.math.setpayloadf128
- libc.src.__support.math.setpayloadf16
- libc.src.__support.math.setpayloadl
- libc.src.__support.math.sqrtl
- libc.src.__support.math.trunc
- libc.src.__support.math.truncbf16
- libc.src.__support.math.truncf
- libc.src.__support.math.truncf128
- libc.src.__support.math.truncf16
- libc.src.__support.math.truncl
- libc.src.__support.math.ufromfp
- libc.src.__support.math.ufromfpbf16
- libc.src.__support.math.ufromfpf
- libc.src.__support.math.ufromfpf128
- libc.src.__support.math.ufromfpf16
- libc.src.__support.math.ufromfpl
- libc.src.__support.math.ufromfpx
- libc.src.__support.math.ufromfpxbf16
- libc.src.__support.math.ufromfpxf
- libc.src.__support.math.ufromfpxf128
- libc.src.__support.math.ufromfpxf16
- libc.src.__support.math.ufromfpxl
- libc.src.__support.math.totalorder
- libc.src.__support.math.totalorderbf16
- libc.src.__support.math.totalorderf
- libc.src.__support.math.totalorderf128
- libc.src.__support.math.totalorderf16
- libc.src.__support.math.totalorderl
- libc.src.__support.math.totalordermag
- libc.src.__support.math.totalordermagbf16
- libc.src.__support.math.totalordermagf
- libc.src.__support.math.totalordermagf128
- libc.src.__support.math.totalordermagf16
- libc.src.__support.math.totalordermagl
-)
+ add_fp_unittest(
+ shared_math_constexpr_test
+ SUITE
+ libc-shared-tests
+ SRCS
+ shared_math_constexpr_test.cpp
+ DEPENDS
+ libc.src.__support.math.asinbf16
+ libc.src.__support.math.bf16subl
+ libc.src.__support.math.canonicalize
+ libc.src.__support.math.canonicalizebf16
+ libc.src.__support.math.canonicalizef
+ libc.src.__support.math.canonicalizef128
+ libc.src.__support.math.canonicalizef16
+ libc.src.__support.math.canonicalizel
+ libc.src.__support.math.ceil
+ libc.src.__support.math.ceilbf16
+ libc.src.__support.math.ceilf
+ libc.src.__support.math.ceilf128
+ libc.src.__support.math.ceilf16
+ libc.src.__support.math.ceill
+ libc.src.__support.math.copysign
+ libc.src.__support.math.copysignbf16
+ libc.src.__support.math.copysignf
+ libc.src.__support.math.copysignf128
+ libc.src.__support.math.copysignf16
+ libc.src.__support.math.copysignl
+ libc.src.__support.math.ddivf128
+ libc.src.__support.math.ddivl
+ libc.src.__support.math.dmulf128
+ libc.src.__support.math.dmull
+ libc.src.__support.math.dsqrtf128
+ libc.src.__support.math.f16add
+ libc.src.__support.math.f16addf
+ libc.src.__support.math.f16addf128
+ libc.src.__support.math.f16addl
+ libc.src.__support.math.fadd
+ libc.src.__support.math.faddf128
+ libc.src.__support.math.faddl
+ libc.src.__support.math.fdim
+ libc.src.__support.math.fdimbf16
+ libc.src.__support.math.fdimf
+ libc.src.__support.math.fdimf128
+ libc.src.__support.math.fdimf16
+ libc.src.__support.math.fdiml
+ libc.src.__support.math.fdiv
+ libc.src.__support.math.fdivf128
+ libc.src.__support.math.fdivl
+ libc.src.__support.math.floor
+ libc.src.__support.math.floorbf16
+ libc.src.__support.math.floorf
+ libc.src.__support.math.floorf128
+ libc.src.__support.math.floorf16
+ libc.src.__support.math.floorl
+ libc.src.__support.math.fabs
+ libc.src.__support.math.fabsbf16
+ libc.src.__support.math.fabsf
+ libc.src.__support.math.fabsf128
+ libc.src.__support.math.fabsf16
+ libc.src.__support.math.fabsl
+ libc.src.__support.math.fmaximum
+ libc.src.__support.math.fmaximum_mag
+ libc.src.__support.math.fmaximum_mag_num
+ libc.src.__support.math.fmaximum_mag_numbf16
+ libc.src.__support.math.fmaximum_mag_numf
+ libc.src.__support.math.fmaximum_mag_numf128
+ libc.src.__support.math.fmaximum_mag_numf16
+ libc.src.__support.math.fmaximum_mag_numl
+ libc.src.__support.math.fmaximum_magbf16
+ libc.src.__support.math.fmaximum_magf
+ libc.src.__support.math.fmaximum_magf128
+ libc.src.__support.math.fmaximum_magf16
+ libc.src.__support.math.fmaximum_magl
+ libc.src.__support.math.fmaximum_num
+ libc.src.__support.math.fmaximum_numbf16
+ libc.src.__support.math.fmaximum_numf
+ libc.src.__support.math.fmaximum_numf128
+ libc.src.__support.math.fmaximum_numf16
+ libc.src.__support.math.fmaximum_numl
+ libc.src.__support.math.fmaximumbf16
+ libc.src.__support.math.fmaximumf
+ libc.src.__support.math.fmaximumf128
+ libc.src.__support.math.fmaximumf16
+ libc.src.__support.math.fmaximuml
+ libc.src.__support.math.fmin
+ libc.src.__support.math.fminbf16
+ libc.src.__support.math.fminf
+ libc.src.__support.math.fminf128
+ libc.src.__support.math.fminf16
+ libc.src.__support.math.fminimum
+ libc.src.__support.math.fminimum_mag
+ libc.src.__support.math.fminimum_mag_num
+ libc.src.__support.math.fminimum_mag_numbf16
+ libc.src.__support.math.fminimum_mag_numf
+ libc.src.__support.math.fminimum_mag_numf128
+ libc.src.__support.math.fminimum_mag_numf16
+ libc.src.__support.math.fminimum_mag_numl
+ libc.src.__support.math.fminimum_magbf16
+ libc.src.__support.math.fminimum_magf
+ libc.src.__support.math.fminimum_magf128
+ libc.src.__support.math.fminimum_magf16
+ libc.src.__support.math.fminimum_magl
+ libc.src.__support.math.fminimum_num
+ libc.src.__support.math.fminimum_numbf16
+ libc.src.__support.math.fminimum_numf
+ libc.src.__support.math.fminimum_numf128
+ libc.src.__support.math.fminimum_numf16
+ libc.src.__support.math.fminimum_numl
+ libc.src.__support.math.fminimumbf16
+ libc.src.__support.math.fminimumf
+ libc.src.__support.math.fminimumf128
+ libc.src.__support.math.fminimumf16
+ libc.src.__support.math.fminimuml
+ libc.src.__support.math.fminl
+ libc.src.__support.math.fmod
+ libc.src.__support.math.fmodbf16
+ libc.src.__support.math.fmodf
+ libc.src.__support.math.fmodf128
+ libc.src.__support.math.fmodf16
+ libc.src.__support.math.fmodl
+ libc.src.__support.math.fmul
+ libc.src.__support.math.fmulf128
+ libc.src.__support.math.fmull
+ libc.src.__support.math.frexp
+ libc.src.__support.math.frexpbf16
+ libc.src.__support.math.frexpl
+ libc.src.__support.math.fromfp
+ libc.src.__support.math.fromfpbf16
+ libc.src.__support.math.fromfpf
+ libc.src.__support.math.fromfpf128
+ libc.src.__support.math.fromfpf16
+ libc.src.__support.math.fromfpl
+ libc.src.__support.math.fromfpx
+ libc.src.__support.math.fromfpxbf16
+ libc.src.__support.math.fromfpxf
+ libc.src.__support.math.fromfpxf128
+ libc.src.__support.math.fromfpxf16
+ libc.src.__support.math.fromfpxl
+ libc.src.__support.math.fsub
+ libc.src.__support.math.fsubf128
+ libc.src.__support.math.fsubl
+ libc.src.__support.math.getpayload
+ libc.src.__support.math.getpayloadbf16
+ libc.src.__support.math.getpayloadf
+ libc.src.__support.math.getpayloadf128
+ libc.src.__support.math.getpayloadf16
+ libc.src.__support.math.getpayloadl
+ libc.src.__support.math.iscanonical
+ libc.src.__support.math.iscanonicalbf16
+ libc.src.__support.math.iscanonicalf
+ libc.src.__support.math.iscanonicalf128
+ libc.src.__support.math.iscanonicalf16
+ libc.src.__support.math.iscanonicall
+ libc.src.__support.math.isnan
+ libc.src.__support.math.isnanf
+ libc.src.__support.math.isnanf128
+ libc.src.__support.math.isnanf16
+ libc.src.__support.math.isnanl
+ libc.src.__support.math.issignaling
+ libc.src.__support.math.issignalingbf16
+ libc.src.__support.math.issignalingf
+ libc.src.__support.math.issignalingf128
+ libc.src.__support.math.issignalingf16
+ libc.src.__support.math.issignalingl
+ libc.src.__support.math.ldexp
+ libc.src.__support.math.ldexpbf16
+ libc.src.__support.math.ldexpl
+ libc.src.__support.math.llogbbf16
+ libc.src.__support.math.llrint
+ libc.src.__support.math.llrintbf16
+ libc.src.__support.math.llrintf
+ libc.src.__support.math.llrintf128
+ libc.src.__support.math.llrintf16
+ libc.src.__support.math.llrintl
+ libc.src.__support.math.llround
+ libc.src.__support.math.llroundbf16
+ libc.src.__support.math.llroundf
+ libc.src.__support.math.llroundf128
+ libc.src.__support.math.llroundf16
+ libc.src.__support.math.llroundl
+ libc.src.__support.math.log
+ libc.src.__support.math.logbbf16
+ libc.src.__support.math.ilogbbf16
+ libc.src.__support.math.lrint
+ libc.src.__support.math.lrintbf16
+ libc.src.__support.math.lrintf
+ libc.src.__support.math.lrintf128
+ libc.src.__support.math.lrintf16
+ libc.src.__support.math.lrintl
+ libc.src.__support.math.lround
+ libc.src.__support.math.lroundbf16
+ libc.src.__support.math.lroundf
+ libc.src.__support.math.lroundf128
+ libc.src.__support.math.lroundf16
+ libc.src.__support.math.lroundl
+ libc.src.__support.math.modf
+ libc.src.__support.math.modfbf16
+ libc.src.__support.math.modff
+ libc.src.__support.math.modff128
+ libc.src.__support.math.modff16
+ libc.src.__support.math.modfl
+ libc.src.__support.math.nan
+ libc.src.__support.math.nanbf16
+ libc.src.__support.math.nanf
+ libc.src.__support.math.nanf128
+ libc.src.__support.math.nanf16
+ libc.src.__support.math.nanl
+ libc.src.__support.math.nearbyint
+ libc.src.__support.math.nearbyintbf16
+ libc.src.__support.math.nearbyintf
+ libc.src.__support.math.nearbyintf128
+ libc.src.__support.math.nearbyintf16
+ libc.src.__support.math.nearbyintl
+ libc.src.__support.math.nextafter
+ libc.src.__support.math.nextafterbf16
+ libc.src.__support.math.nextafterf
+ libc.src.__support.math.nextafterf16
+ libc.src.__support.math.nextafterl
+ libc.src.__support.math.nextafterf128
+ libc.src.__support.math.remainder
+ libc.src.__support.math.remainderbf16
+ libc.src.__support.math.remainderf
+ libc.src.__support.math.remainderf128
+ libc.src.__support.math.remainderf16
+ libc.src.__support.math.remainderl
+ libc.src.__support.math.remquo
+ libc.src.__support.math.remquobf16
+ libc.src.__support.math.remquof
+ libc.src.__support.math.remquof128
+ libc.src.__support.math.remquof16
+ libc.src.__support.math.remquol
+ libc.src.__support.math.rint
+ libc.src.__support.math.rintbf16
+ libc.src.__support.math.rintf
+ libc.src.__support.math.rintf128
+ libc.src.__support.math.rintf16
+ libc.src.__support.math.rintl
+ libc.src.__support.math.round
+ libc.src.__support.math.roundbf16
+ libc.src.__support.math.roundeven
+ libc.src.__support.math.roundevenbf16
+ libc.src.__support.math.roundevenf
+ libc.src.__support.math.roundevenf128
+ libc.src.__support.math.roundevenf16
+ libc.src.__support.math.roundevenl
+ libc.src.__support.math.roundf
+ libc.src.__support.math.roundf128
+ libc.src.__support.math.roundf16
+ libc.src.__support.math.roundl
+ libc.src.__support.math.scalbln
+ libc.src.__support.math.scalblnbf16
+ libc.src.__support.math.scalblnf
+ libc.src.__support.math.scalblnf128
+ libc.src.__support.math.scalblnf16
+ libc.src.__support.math.scalblnl
+ libc.src.__support.math.scalbn
+ libc.src.__support.math.scalbnbf16
+ libc.src.__support.math.scalbnf
+ libc.src.__support.math.scalbnf128
+ libc.src.__support.math.scalbnf16
+ libc.src.__support.math.scalbnl
+ libc.src.__support.math.setpayload
+ libc.src.__support.math.setpayloadbf16
+ libc.src.__support.math.setpayloadf
+ libc.src.__support.math.setpayloadf128
+ libc.src.__support.math.setpayloadf16
+ libc.src.__support.math.setpayloadl
+ libc.src.__support.math.sqrtl
+ libc.src.__support.math.trunc
+ libc.src.__support.math.truncbf16
+ libc.src.__support.math.truncf
+ libc.src.__support.math.truncf128
+ libc.src.__support.math.truncf16
+ libc.src.__support.math.truncl
+ libc.src.__support.math.ufromfp
+ libc.src.__support.math.ufromfpbf16
+ libc.src.__support.math.ufromfpf
+ libc.src.__support.math.ufromfpf128
+ libc.src.__support.math.ufromfpf16
+ libc.src.__support.math.ufromfpl
+ libc.src.__support.math.ufromfpx
+ libc.src.__support.math.ufromfpxbf16
+ libc.src.__support.math.ufromfpxf
+ libc.src.__support.math.ufromfpxf128
+ libc.src.__support.math.ufromfpxf16
+ libc.src.__support.math.ufromfpxl
+ libc.src.__support.math.totalorder
+ libc.src.__support.math.totalorderbf16
+ libc.src.__support.math.totalorderf
+ libc.src.__support.math.totalorderf128
+ libc.src.__support.math.totalorderf16
+ libc.src.__support.math.totalorderl
+ libc.src.__support.math.totalordermag
+ libc.src.__support.math.totalordermagbf16
+ libc.src.__support.math.totalordermagf
+ libc.src.__support.math.totalordermagf128
+ libc.src.__support.math.totalordermagf16
+ libc.src.__support.math.totalordermagl
+ )
endif() # LIBC_TEST_SKIP_SHARED_MATH_TESTS
add_fp_unittest(
@@ -865,18 +865,18 @@ add_fp_unittest(
# FIXME: The LLVM libc full build does not support 'system' yet.
if(NOT LLVM_LIBC_FULL_BUILD)
-add_libc_test(
- shared_rpc_test
- SUITE
- libc-shared-tests
- SRCS
- shared_rpc_test.cpp
- DEPENDS
- libc.src.__support.printf_core.converter
- libc.src.__support.printf_core.parser
- libc.src.__support.printf_core.writer
- libc.src.__support.arg_list
-)
+ add_libc_test(
+ shared_rpc_test
+ SUITE
+ libc-shared-tests
+ SRCS
+ shared_rpc_test.cpp
+ DEPENDS
+ libc.src.__support.printf_core.converter
+ libc.src.__support.printf_core.parser
+ libc.src.__support.printf_core.writer
+ libc.src.__support.arg_list
+ )
endif()
add_fp_unittest(
diff --git a/libc/test/src/CMakeLists.txt b/libc/test/src/CMakeLists.txt
index 01d6ee738135c..4d894a5e14a85 100644
--- a/libc/test/src/CMakeLists.txt
+++ b/libc/test/src/CMakeLists.txt
@@ -50,12 +50,12 @@ function(add_fp_unittest name)
${name}
${test_type}
LINK_LIBRARIES "${MATH_UNITTEST_LINK_LIBRARIES}"
- "${MATH_UNITTEST_UNPARSED_ARGUMENTS}"
+ "${MATH_UNITTEST_UNPARSED_ARGUMENTS}"
DEPENDS
libc.hdr.stdint_proxy
"${deps}"
)
-endfunction(add_fp_unittest)
+endfunction()
add_subdirectory(__support)
add_subdirectory(arpa)
diff --git a/libc/test/src/__support/CMakeLists.txt b/libc/test/src/__support/CMakeLists.txt
index 8e173d78ae6a1..d46f01bcf1aca 100644
--- a/libc/test/src/__support/CMakeLists.txt
+++ b/libc/test/src/__support/CMakeLists.txt
@@ -110,7 +110,7 @@ add_libc_test(
SUITE
libc-support-tests
SRCS
- high_precision_decimal_test.cpp
+ high_precision_decimal_test.cpp
DEPENDS
libc.src.__support.high_precision_decimal
libc.src.__support.uint128
diff --git a/libc/test/src/__support/CPP/CMakeLists.txt b/libc/test/src/__support/CPP/CMakeLists.txt
index ac0e8289e64bd..179e4ee12c734 100644
--- a/libc/test/src/__support/CPP/CMakeLists.txt
+++ b/libc/test/src/__support/CPP/CMakeLists.txt
@@ -8,7 +8,7 @@ add_libc_test(
algorithm_test.cpp
DEPENDS
libc.src.__support.CPP.algorithm
- )
+)
add_libc_test(
array_test
@@ -18,7 +18,7 @@ add_libc_test(
array_test.cpp
DEPENDS
libc.src.__support.CPP.array
- )
+)
add_libc_test(
bit_test
@@ -180,9 +180,9 @@ add_libc_test(
SRCS
string_test.cpp
DEPENDS
- libc.hdr.func.free
- libc.src.__support.CPP.string
- libc.src.__support.CPP.string_view
+ libc.hdr.func.free
+ libc.src.__support.CPP.string
+ libc.src.__support.CPP.string_view
)
add_libc_test(
@@ -190,9 +190,9 @@ add_libc_test(
SUITE
libc-cpp-utils-tests
SRCS
- type_traits_test.cpp
+ type_traits_test.cpp
DEPENDS
- libc.src.__support.CPP.type_traits
+ libc.src.__support.CPP.type_traits
)
if(LIBC_COMPILER_HAS_EXT_VECTOR_TYPE)
diff --git a/libc/test/src/__support/RPC/CMakeLists.txt b/libc/test/src/__support/RPC/CMakeLists.txt
index 11d09226077c8..ba80619307e6c 100644
--- a/libc/test/src/__support/RPC/CMakeLists.txt
+++ b/libc/test/src/__support/RPC/CMakeLists.txt
@@ -7,7 +7,7 @@ add_libc_test(
SRCS
rpc_smoke_test.cpp
DEPENDS
- libc.src.__support.RPC.rpc
+ libc.src.__support.RPC.rpc
)
add_libc_test(
@@ -17,5 +17,5 @@ add_libc_test(
SRCS
rpc_doorbell_test.cpp
DEPENDS
- libc.src.__support.RPC.rpc
+ libc.src.__support.RPC.rpc
)
diff --git a/libc/test/src/__support/wchar/CMakeLists.txt b/libc/test/src/__support/wchar/CMakeLists.txt
index c112c83dbe9af..76c573dcff645 100644
--- a/libc/test/src/__support/wchar/CMakeLists.txt
+++ b/libc/test/src/__support/wchar/CMakeLists.txt
@@ -1,11 +1,11 @@
add_custom_target(libc-support-wchar-tests)
add_libc_test(
- utf8_to_32_test
+ utf8_to_32_test
SUITE
libc-support-tests
SRCS
- utf8_to_32_test.cpp
+ utf8_to_32_test.cpp
DEPENDS
libc.src.__support.wchar.character_converter
)
diff --git a/libc/test/src/compiler/CMakeLists.txt b/libc/test/src/compiler/CMakeLists.txt
index a45fa8c55e512..05aea80c6f801 100644
--- a/libc/test/src/compiler/CMakeLists.txt
+++ b/libc/test/src/compiler/CMakeLists.txt
@@ -13,4 +13,4 @@ add_libc_unittest(
libc.src.string.memset
COMPILE_OPTIONS
-fstack-protector-all
- )
+)
diff --git a/libc/test/src/dirent/CMakeLists.txt b/libc/test/src/dirent/CMakeLists.txt
index af18006c5d122..aaef181d0752c 100644
--- a/libc/test/src/dirent/CMakeLists.txt
+++ b/libc/test/src/dirent/CMakeLists.txt
@@ -37,5 +37,3 @@ add_libc_unittest(
libc.hdr.types.DIR
libc.hdr.types.struct_dirent
)
-
-
diff --git a/libc/test/src/fenv/CMakeLists.txt b/libc/test/src/fenv/CMakeLists.txt
index 58e335b99f674..cdf4b694cec43 100644
--- a/libc/test/src/fenv/CMakeLists.txt
+++ b/libc/test/src/fenv/CMakeLists.txt
@@ -102,8 +102,8 @@ add_libc_unittest(
LibcFPTestHelpers
)
-if (NOT (LLVM_USE_SANITIZER OR (${LIBC_TARGET_OS} STREQUAL "windows")
- OR (${LIBC_TARGET_OS} STREQUAL "darwin")))
+if(NOT (LLVM_USE_SANITIZER OR (${LIBC_TARGET_OS} STREQUAL "windows")
+ OR (${LIBC_TARGET_OS} STREQUAL "darwin")))
# Sanitizers don't like SIGFPE. So, we will run the
# tests which raise SIGFPE only in non-sanitizer builds.
# The tests are also disabled for Windows and MacOS as they fail currently.
diff --git a/libc/test/src/libgen/CMakeLists.txt b/libc/test/src/libgen/CMakeLists.txt
index 6a7b6901b241b..5237f5224a772 100644
--- a/libc/test/src/libgen/CMakeLists.txt
+++ b/libc/test/src/libgen/CMakeLists.txt
@@ -20,7 +20,7 @@ add_libc_test(
libc.src.libgen.dirname
)
-if (NOT LLVM_USE_SANITIZER AND LIBC_TEST_SUBPROCESS_TESTS)
+if(NOT LLVM_USE_SANITIZER AND LIBC_TEST_SUBPROCESS_TESTS)
add_libc_test(
basename_death_test
SUITE
diff --git a/libc/test/src/math/CMakeLists.txt b/libc/test/src/math/CMakeLists.txt
index 6fbe43501e017..04a17664a425b 100644
--- a/libc/test/src/math/CMakeLists.txt
+++ b/libc/test/src/math/CMakeLists.txt
@@ -2555,7 +2555,7 @@ add_fp_unittest(
SRCS
asinf16_test.cpp
DEPENDS
- libc.src.math.asinf16
+ libc.src.math.asinf16
)
add_fp_unittest(
@@ -2636,7 +2636,7 @@ add_fp_unittest(
SRCS
acosf16_test.cpp
DEPENDS
- libc.src.math.acosf16
+ libc.src.math.acosf16
)
add_fp_unittest(
@@ -2658,7 +2658,7 @@ add_fp_unittest(
SRCS
acospif16_test.cpp
DEPENDS
- libc.src.math.acospif16
+ libc.src.math.acospif16
)
add_fp_unittest(
diff --git a/libc/test/src/math/performance_testing/CMakeLists.txt b/libc/test/src/math/performance_testing/CMakeLists.txt
index 618a6d037a63f..d876cbd560070 100644
--- a/libc/test/src/math/performance_testing/CMakeLists.txt
+++ b/libc/test/src/math/performance_testing/CMakeLists.txt
@@ -1,7 +1,7 @@
add_library(
libc_
diff _test_utils STATIC
- Timer.cpp
- Timer.h
+ Timer.cpp
+ Timer.h
)
target_include_directories(
libc_
diff _test_utils
@@ -26,21 +26,21 @@ function(add_perf_binary target_name)
)
if(NOT PERF_SRCS)
message(FATAL_ERROR "'add_perf_binary' target requires a SRCS list of .cpp "
- "files.")
+ "files.")
endif()
if(NOT PERF_DEPENDS)
message(FATAL_ERROR "'add_perf_binary' target requires a DEPENDS list of "
- "'add_entrypoint_object' targets.")
+ "'add_entrypoint_object' targets.")
endif()
get_fq_target_name(${target_name} fq_target_name)
get_fq_deps_list(fq_deps_list ${PERF_DEPENDS})
get_object_files_for_test(
- link_object_files skipped_entrypoints_list ${fq_deps_list})
+ link_object_files skipped_entrypoints_list ${fq_deps_list})
if(skipped_entrypoints_list)
if(LIBC_CMAKE_VERBOSE_LOGGING)
set(msg "Will not build ${fq_target_name} as it has missing deps: "
- "${skipped_entrypoints_list}.")
+ "${skipped_entrypoints_list}.")
message(STATUS ${msg})
endif()
return()
@@ -69,8 +69,8 @@ function(add_perf_binary target_name)
list(APPEND link_libraries ${lib}.unit)
endforeach()
target_link_libraries(
- ${fq_target_name}
- PRIVATE ${link_libraries} libc_
diff _test_utils)
+ ${fq_target_name}
+ PRIVATE ${link_libraries} libc_
diff _test_utils)
set_target_properties(${fq_target_name}
PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
diff --git a/libc/test/src/math/smoke/CMakeLists.txt b/libc/test/src/math/smoke/CMakeLists.txt
index d3f93d31a39b0..dfc1e411cdfed 100644
--- a/libc/test/src/math/smoke/CMakeLists.txt
+++ b/libc/test/src/math/smoke/CMakeLists.txt
@@ -247,7 +247,7 @@ add_fp_unittest(
add_fp_unittest(
fabsbf16_test
SUITE
- libc-math-smoke-tests
+ libc-math-smoke-tests
SRCS
fabsbf16_test.cpp
HDRS
@@ -851,7 +851,7 @@ add_fp_unittest(
SRCS
roundeven_test.cpp
HDRS
- RoundEvenTest.h
+ RoundEvenTest.h
DEPENDS
libc.src.math.roundeven
libc.src.__support.FPUtil.fp_bits
@@ -864,7 +864,7 @@ add_fp_unittest(
SRCS
roundevenf_test.cpp
HDRS
- RoundEvenTest.h
+ RoundEvenTest.h
DEPENDS
libc.src.math.roundevenf
libc.src.__support.FPUtil.fp_bits
@@ -877,7 +877,7 @@ add_fp_unittest(
SRCS
roundevenl_test.cpp
HDRS
- RoundEvenTest.h
+ RoundEvenTest.h
DEPENDS
libc.src.math.roundevenl
libc.src.__support.FPUtil.fp_bits
@@ -902,7 +902,7 @@ add_fp_unittest(
SRCS
roundevenf128_test.cpp
HDRS
- RoundEvenTest.h
+ RoundEvenTest.h
DEPENDS
libc.src.math.roundevenf128
libc.src.__support.FPUtil.fp_bits
@@ -3571,9 +3571,9 @@ add_fp_unittest(
SRCS
rsqrtf_test.cpp
DEPENDS
- libc.hdr.errno_macros
- libc.hdr.fenv_macros
- libc.src.math.rsqrtf
+ libc.hdr.errno_macros
+ libc.hdr.fenv_macros
+ libc.src.math.rsqrtf
)
add_fp_unittest(
@@ -3583,8 +3583,8 @@ add_fp_unittest(
SRCS
rsqrtf16_test.cpp
DEPENDS
- libc.hdr.errno_macros
- libc.hdr.fenv_macros
+ libc.hdr.errno_macros
+ libc.hdr.fenv_macros
libc.src.math.rsqrtf16
)
diff --git a/libc/test/src/net/CMakeLists.txt b/libc/test/src/net/CMakeLists.txt
index 8e285dd5b94c5..b4bbe81c92ff2 100644
--- a/libc/test/src/net/CMakeLists.txt
+++ b/libc/test/src/net/CMakeLists.txt
@@ -1,4 +1,3 @@
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS})
add_subdirectory(${LIBC_TARGET_OS})
endif()
-
diff --git a/libc/test/src/stdfix/CMakeLists.txt b/libc/test/src/stdfix/CMakeLists.txt
index 8ebf69c66d66c..39a8482b8ffe9 100644
--- a/libc/test/src/stdfix/CMakeLists.txt
+++ b/libc/test/src/stdfix/CMakeLists.txt
@@ -258,4 +258,3 @@ add_libc_test(
libc.include.stdfix
${macros_depends}
)
-
diff --git a/libc/test/src/stdio/CMakeLists.txt b/libc/test/src/stdio/CMakeLists.txt
index f3289f4d55dff..361614928d435 100644
--- a/libc/test/src/stdio/CMakeLists.txt
+++ b/libc/test/src/stdio/CMakeLists.txt
@@ -140,7 +140,7 @@ if(LIBC_CONF_PRINTF_DISABLE_FLOAT)
libc_add_definition(sprintf_test_copts "LIBC_COPT_PRINTF_DISABLE_FLOAT")
endif()
if(LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_DYADIC_FLOAT OR
- LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_FLOAT320)
+ LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_FLOAT320)
libc_add_definition(sprintf_test_copts "LIBC_COPT_FLOAT_TO_STR_REDUCED_PRECISION")
endif()
if(LIBC_CONF_PRINTF_DISABLE_INDEX_MODE)
@@ -194,17 +194,17 @@ add_libc_test(
if(LLVM_LIBC_FULL_BUILD)
# In fullbuild mode, fprintf's tests use the internal FILE for other functions.
list(APPEND fprintf_test_deps
- libc.src.stdio.fclose
- libc.src.stdio.ferror
- libc.src.stdio.fopen
- libc.src.stdio.fread
+ libc.src.stdio.fclose
+ libc.src.stdio.ferror
+ libc.src.stdio.fopen
+ libc.src.stdio.fread
)
# This is to be used for tests which write to libc's platform streams
# under full build but write to system-lib's streams otherwise.
set(hermetic_test_only HERMETIC_TEST_ONLY)
else()
-# Else in overlay mode they use the system's FILE.
- libc_set_definition(use_system_file "LIBC_COPT_STDIO_USE_SYSTEM_FILE")
+ # Else in overlay mode they use the system's FILE.
+ libc_set_definition(use_system_file "LIBC_COPT_STDIO_USE_SYSTEM_FILE")
endif()
add_libc_test(
@@ -235,17 +235,17 @@ add_libc_test(
)
add_libc_test(
- asprintf_test
- SUITE
- libc_stdio_unittests
- SRCS
- asprintf_test.cpp
- DEPENDS
- libc.src.stdio.asprintf
- libc.src.string.memset
- libc.include.stdlib
- libc.src.stdio.sprintf
- )
+ asprintf_test
+ SUITE
+ libc_stdio_unittests
+ SRCS
+ asprintf_test.cpp
+ DEPENDS
+ libc.src.stdio.asprintf
+ libc.src.string.memset
+ libc.include.stdlib
+ libc.src.stdio.sprintf
+)
add_fp_unittest(
vsprintf_test
@@ -292,25 +292,25 @@ add_libc_test(
)
add_libc_test(
- vasprintf_test
- SUITE
- libc_stdio_unittests
- SRCS
- vasprintf_test.cpp
- DEPENDS
- libc.src.stdio.vasprintf
- libc.src.string.memset
- libc.include.stdlib
- )
+ vasprintf_test
+ SUITE
+ libc_stdio_unittests
+ SRCS
+ vasprintf_test.cpp
+ DEPENDS
+ libc.src.stdio.vasprintf
+ libc.src.string.memset
+ libc.include.stdlib
+)
if(LLVM_LIBC_FULL_BUILD)
# In fullbuild mode, fscanf's tests use the internal FILE for other functions.
list(APPEND fscanf_test_deps
- libc.src.stdio.fclose
- libc.src.stdio.feof
- libc.src.stdio.ferror
- libc.src.stdio.fopen
- libc.src.stdio.fwrite
+ libc.src.stdio.fclose
+ libc.src.stdio.feof
+ libc.src.stdio.ferror
+ libc.src.stdio.fopen
+ libc.src.stdio.fwrite
)
endif()
diff --git a/libc/test/src/stdlib/CMakeLists.txt b/libc/test/src/stdlib/CMakeLists.txt
index 8a1f44ba632bf..35facab31e337 100644
--- a/libc/test/src/stdlib/CMakeLists.txt
+++ b/libc/test/src/stdlib/CMakeLists.txt
@@ -176,7 +176,7 @@ add_libc_test(
)
if(LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_DYADIC_FLOAT OR
- LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_FLOAT320)
+ LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_FLOAT320)
libc_set_definition(strfrom_test_copts "LIBC_COPT_FLOAT_TO_STR_REDUCED_PRECISION")
endif()
@@ -582,7 +582,7 @@ endif()
# Only baremetal and GPU has an in-tree 'malloc' implementation.
if((LIBC_TARGET_OS_IS_BAREMETAL OR LIBC_TARGET_OS_IS_GPU) AND
- NOT LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
+ NOT LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
add_libc_test(
malloc_test
HERMETIC_TEST_ONLY
diff --git a/libc/test/src/string/memory_utils/CMakeLists.txt b/libc/test/src/string/memory_utils/CMakeLists.txt
index ad91fa62c59b9..0b94cd22df1ac 100644
--- a/libc/test/src/string/memory_utils/CMakeLists.txt
+++ b/libc/test/src/string/memory_utils/CMakeLists.txt
@@ -1,8 +1,8 @@
# Targets with implemented src/string/memory_utils/op_XXX.h specializations.
if(LIBC_TARGET_ARCHITECTURE_IS_AARCH64 OR
- LIBC_TARGET_ARCHITECTURE_IS_X86_64 OR
- LIBC_TARGET_ARCHITECTURE_IS_X86 OR
- LIBC_TARGET_ARCHITECTURE_IS_ANY_RISCV)
+ LIBC_TARGET_ARCHITECTURE_IS_X86_64 OR
+ LIBC_TARGET_ARCHITECTURE_IS_X86 OR
+ LIBC_TARGET_ARCHITECTURE_IS_ANY_RISCV)
add_libc_test(
utils_test
SUITE
diff --git a/libc/test/src/sys/ioctl/linux/CMakeLists.txt b/libc/test/src/sys/ioctl/linux/CMakeLists.txt
index 69a521249dd9c..a9058e41f0633 100644
--- a/libc/test/src/sys/ioctl/linux/CMakeLists.txt
+++ b/libc/test/src/sys/ioctl/linux/CMakeLists.txt
@@ -18,4 +18,3 @@ add_libc_unittest(
libc.test.UnitTest.ErrnoCheckingTest
libc.test.UnitTest.ErrnoSetterMatcher
)
-
diff --git a/libc/test/src/sys/mman/linux/CMakeLists.txt b/libc/test/src/sys/mman/linux/CMakeLists.txt
index e46bdb59a42f0..9ff38de9525d1 100644
--- a/libc/test/src/sys/mman/linux/CMakeLists.txt
+++ b/libc/test/src/sys/mman/linux/CMakeLists.txt
@@ -35,7 +35,7 @@ add_libc_test(
libc.test.UnitTest.ErrnoSetterMatcher
)
-if (NOT LLVM_USE_SANITIZER)
+if(NOT LLVM_USE_SANITIZER)
add_libc_test(
mprotect_test
SUITE
@@ -59,7 +59,7 @@ add_libc_test(
SUITE
libc_sys_mman_unittests
SRCS
- madvise_test.cpp
+ madvise_test.cpp
DEPENDS
libc.hdr.sys_mman_macros
libc.include.sys_mman
@@ -74,7 +74,7 @@ add_libc_test(
# Disable sanitizers for pkey_test.
# This test intentionally triggers segfaults to verify pkey_mprotect behavior,
# and sanitizers register signal handlers that interfere with death testing.
-if (NOT LLVM_USE_SANITIZER)
+if(NOT LLVM_USE_SANITIZER)
add_libc_test(
pkey_test
SUITE
@@ -103,7 +103,7 @@ add_libc_test(
SUITE
libc_sys_mman_unittests
SRCS
- posix_madvise_test.cpp
+ posix_madvise_test.cpp
DEPENDS
libc.hdr.sys_mman_macros
libc.include.sys_mman
@@ -192,25 +192,25 @@ if(CMAKE_CROSSCOMPILING_EMULATOR)
message(STATUS "Skipping remap_file_pages_test under emulator.")
endif()
else()
-add_libc_test(
- remap_file_pages_test
- SUITE
- libc_sys_mman_unittests
- SRCS
- remap_file_pages_test.cpp
- DEPENDS
- libc.hdr.sys_mman_macros
- libc.hdr.sys_stat_macros
- libc.test.UnitTest.ErrnoCheckingTest
- libc.test.UnitTest.ErrnoSetterMatcher
- libc.src.sys.mman.remap_file_pages
- libc.src.errno.errno
- libc.src.sys.mman.mmap
- libc.src.sys.mman.munmap
- libc.src.fcntl.open
- libc.src.unistd.close
- libc.src.unistd.sysconf
-)
+ add_libc_test(
+ remap_file_pages_test
+ SUITE
+ libc_sys_mman_unittests
+ SRCS
+ remap_file_pages_test.cpp
+ DEPENDS
+ libc.hdr.sys_mman_macros
+ libc.hdr.sys_stat_macros
+ libc.test.UnitTest.ErrnoCheckingTest
+ libc.test.UnitTest.ErrnoSetterMatcher
+ libc.src.sys.mman.remap_file_pages
+ libc.src.errno.errno
+ libc.src.sys.mman.mmap
+ libc.src.sys.mman.munmap
+ libc.src.fcntl.open
+ libc.src.unistd.close
+ libc.src.unistd.sysconf
+ )
endif()
add_libc_test(
diff --git a/libc/test/src/sys/prctl/linux/CMakeLists.txt b/libc/test/src/sys/prctl/linux/CMakeLists.txt
index d02900e1857a0..9bc5ae2f4b9ed 100644
--- a/libc/test/src/sys/prctl/linux/CMakeLists.txt
+++ b/libc/test/src/sys/prctl/linux/CMakeLists.txt
@@ -2,20 +2,20 @@ add_custom_target(libc_sys_prctl_unittests)
# Temporarily disable this test while setting up arm and riscv buildbots
# using qemu, since PR_GET_THP_DISABLE is not supported on qemu.
-if (NOT (LIBC_TARGET_ARCHITECTURE_IS_ARM OR
- LIBC_TARGET_ARCHITECTURE_IS_RISCV32 OR
- LIBC_TARGET_ARCHITECTURE_IS_RISCV64))
-add_libc_unittest(
- prctl_test
- SUITE
- libc_sys_prctl_unittests
- SRCS
- prctl_test.cpp
- DEPENDS
- libc.include.sys_prctl
- libc.src.sys.prctl.prctl
- libc.src.errno.errno
- libc.test.UnitTest.ErrnoCheckingTest
- libc.test.UnitTest.ErrnoSetterMatcher
-)
+if(NOT (LIBC_TARGET_ARCHITECTURE_IS_ARM OR
+ LIBC_TARGET_ARCHITECTURE_IS_RISCV32 OR
+ LIBC_TARGET_ARCHITECTURE_IS_RISCV64))
+ add_libc_unittest(
+ prctl_test
+ SUITE
+ libc_sys_prctl_unittests
+ SRCS
+ prctl_test.cpp
+ DEPENDS
+ libc.include.sys_prctl
+ libc.src.sys.prctl.prctl
+ libc.src.errno.errno
+ libc.test.UnitTest.ErrnoCheckingTest
+ libc.test.UnitTest.ErrnoSetterMatcher
+ )
endif()
diff --git a/libc/test/utils/FPUtil/CMakeLists.txt b/libc/test/utils/FPUtil/CMakeLists.txt
index c4ade937d09a4..84ff9d846854c 100644
--- a/libc/test/utils/FPUtil/CMakeLists.txt
+++ b/libc/test/utils/FPUtil/CMakeLists.txt
@@ -1,5 +1,5 @@
if((${LIBC_TARGET_OS} STREQUAL "linux") AND ((${LIBC_TARGET_ARCHITECTURE_IS_X86})
- OR (${LIBC_TARGET_ARCHITECTURE_IS_X86_64})))
+ OR (${LIBC_TARGET_ARCHITECTURE_IS_X86_64})))
add_libc_unittest(
x86_long_double_test
SRCS
More information about the libc-commits
mailing list