Lines Matching +full:libc +full:- +full:build
2 set(LLVM_SUBPROJECT_TITLE "libc")
5 message(FATAL_ERROR "Builds rooted in the libc directory are not supported. "
7 "Please see the documentation at https://libc.llvm.org/usage_modes.html for more info.")
25 # `llvm-project/llvm/CMakeLists.txt` adds the following directive
34 add_definitions("-D_DEBUG")
42 # The top-level source directory.
44 # The top-level directory in which libc is being built.
47 set(LIBC_ENABLE_USE_BY_CLANG OFF CACHE BOOL "Whether or not to place libc in a build directory findable by a just built clang")
51 # Defining a global namespace to enclose all libc functions.
60 # We will build the GPU utilities if we are not doing a runtimes build.
61 option(LIBC_BUILD_GPU_LOADER "Always build the GPU loader utilities" OFF)
70 # Path libc/scripts directory.
80 # Flags to pass down to the compiler while building the libc functions.
81 set(LIBC_COMPILE_OPTIONS_DEFAULT "" CACHE STRING "Architecture to tell clang to optimize for (e.g. -march=... or -mcpu=...)")
86 # Check --print-resource-dir to find the compiler resource dir if this flag
90 COMMAND ${CMAKE_CXX_COMPILER} --print-resource-dir
100 "${COMPILER_RESOURCE_DIR} using --print-resource-dir")
102 # Try with GCC option: -print-search-dirs, which will output in the form:
109 COMMAND ${CMAKE_CXX_COMPILER} -print-search-dirs
118 "${COMPILER_RESOURCE_DIR} using --print-search-dirs")
125 --print-resource-dir not supported by host compiler")
130 option(LLVM_LIBC_FULL_BUILD "Build and test LLVM libc as if it is the full libc" OFF)
131 option(LLVM_LIBC_IMPLEMENTATION_DEFINED_TEST_BEHAVIOR "Build LLVM libc tests assuming our implementation-defined behavior" ON)
132 option(LLVM_LIBC_ENABLE_LINTING "Enables linting of libc source files" OFF)
134 set(LIBC_TARGET_TRIPLE "" CACHE STRING "The target triple for the libc build.")
136 option(LIBC_CONFIG_PATH "The path to user provided folder that configures the build for the target system." OFF)
169 #TODO: Add carve-out specific config files to the list here.
277 find_program(LLVM_LIBC_CLANG_TIDY NAMES clang-tidy)
281 # Check clang-tidy major version.
282 execute_process(COMMAND ${LLVM_LIBC_CLANG_TIDY} "--version"
288 message(FATAL_ERROR "Failed to execute '${LLVM_LIBC_CLANG_TIDY} --version'
294 string(REGEX MATCH "[0-9]+" CLANG_TIDY_VERSION "${CLANG_TIDY_OUTPUT}")
295 string(REGEX MATCH "[0-9]+" CLANG_MAJOR_VERSION
301 'clang-tidy' (version ${CLANG_TIDY_VERSION}) is not the same as
305 The path to the clang-tidy binary can be set manually by passing
306 -DLLVM_LIBC_CLANG_TIDY=<path/to/clang-tidy> to CMake.")
308 add_custom_target(libc-lint)
311 Linting is enabled but 'clang-tidy' is not found!
313 The path to the clang-tidy binary can be set manually by passing
314 -DLLVM_LIBC_CLANG_TIDY=<path/to/clang-tidy> to CMake.
317 (pass -DLLVM_LIBC_ENABLE_LINTING=OFF to cmake).")
322 option(LLVM_LIBC_INCLUDE_SCUDO "Include the SCUDO standalone as the allocator for LLVM libc" OFF)
324 if (NOT ("compiler-rt" IN_LIST LLVM_ENABLE_PROJECTS OR "compiler-rt" IN_LIST LLVM_ENABLE_RUNTIMES))
325 message(FATAL_ERROR "SCUDO cannot be included without adding compiler-rt to LLVM_ENABLE_PROJECTS or LLVM_ENABLE_RUNTIMES")
328 message(FATAL_ERROR "Disabling COMPILER_RT_BUILD_SANITIZERS will produce a libc without malloc/free")
332 option(LIBC_INCLUDE_DOCS "Build the libc documentation." ${LLVM_INCLUDE_DOCS})
376 if(${last_dot_loc} EQUAL -1)
381 string(SUBSTRING ${entrypoint} ${name_loc} -1 entrypoint_name)
388 set(libc_opt_high_flag "-O3")