Lines Matching +full:cache +full:- +full:dependency +full:- +full:path

30   # "Symbol version prefix for libLLVM.so and libclang-cpp.so"
36 "default, even for 64-bit targets. This can result in linker "
37 "instability and out of memory errors. To use the 64-bit "
38 "host compiler, pass -Thost=x64 on the CMake command line.")
57 set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" )
65 # If we find that the cache contains CMAKE_CXX_STANDARD it means that it's a old CMakeCache.txt
67 if($CACHE{CMAKE_CXX_STANDARD} AND $CACHE{CMAKE_CXX_STANDARD} LESS ${LLVM_REQUIRED_CXX_STANDARD})
68 message(WARNING "Resetting cache value for CMAKE_CXX_STANDARD to ${LLVM_REQUIRED_CXX_STANDARD}")
69 unset(CMAKE_CXX_STANDARD CACHE)
72 # if CMAKE_CXX_STANDARD is still set after the cache unset above it means that the user requested it
78 set(CMAKE_CXX_STANDARD ${LLVM_REQUIRED_CXX_STANDARD} CACHE STRING "C++ standard to conform to")
91 No build type selected. You need to pass -DCMAKE_BUILD_TYPE=<type> in order to configure LLVM.
93 * -DCMAKE_BUILD_TYPE=Release - For an optimized build with no assertions or debug info.
94 * -DCMAKE_BUILD_TYPE=Debug - For an unoptimized build with assertions and debug info.
95 * -DCMAKE_BUILD_TYPE=RelWithDebInfo - For an optimized build with no assertions but with debug info.
96 * -DCMAKE_BUILD_TYPE=MinSizeRel - For a build optimized for size instead of speed.
97 Learn more about these options in our documentation at https://llvm.org/docs/CMake.html#cmake-build-type
115 # Side-by-side subprojects layout: automatically set the
119 set(LLVM_ALL_PROJECTS "bolt;clang;clang-tools-extra;compiler-rt;cross-project-tests;libc;libclc;lld;lldb;mlir;openmp;polly;pstl")
130 set(LLVM_ENABLE_PROJECTS "" CACHE STRING
131 "Semicolon-separated list of projects to build (${LLVM_KNOWN_PROJECTS}), or \"all\".")
144 message(STATUS "Enabling MLIR as a dependency to flang")
156 "-DLLVM_ENABLE_RUNTIMES=libc or see the instructions at "
160 if ("compiler-rt" IN_LIST LLVM_ENABLE_PROJECTS)
161 message(WARNING "Using LLVM_ENABLE_PROJECTS=compiler-rt is deprecated now, and will "
163 "-DLLVM_ENABLE_RUNTIMES=compiler-rt or see the instructions at "
164 "https://compiler-rt.llvm.org/ for building the runtimes.")
172 set(LLVM_SUPPORTED_RUNTIMES "libc;libunwind;libcxxabi;pstl;libcxx;compiler-rt;openmp;llvm-libgcc;offload")
173 set(LLVM_ENABLE_RUNTIMES "" CACHE STRING
174 "Semicolon-separated list of runtimes to build, or \"all\" (${LLVM_DEFAULT_RUNTIMES}). Supported runtimes are ${LLVM_SUPPORTED_RUNTIMES}.")
188 list(APPEND LLVM_RUNTIME_TARGETS "nvptx64-nvidia-cuda" "amdgcn-amd-amdhsa")
190 set(LLVM_RUNTIME_TARGETS "default;nvptx64-nvidia-cuda;amdgcn-amd-amdhsa")
192 list(APPEND RUNTIMES_nvptx64-nvidia-cuda_LLVM_ENABLE_RUNTIMES "libc")
193 list(APPEND RUNTIMES_amdgcn-amd-amdhsa_LLVM_ENABLE_RUNTIMES "libc")
198 if("${_name}" STREQUAL "amdgcn-amd-amdhsa" OR "${_name}" STREQUAL "nvptx64-nvidia-cuda")
203 if("${LIBC_TARGET_TRIPLE}" STREQUAL "amdgcn-amd-amdhsa" OR
204 "${LIBC_TARGET_TRIPLE}" STREQUAL "nvptx64-nvidia-cuda")
213 # `LLVM_ENABLE_PROJECTS` CMake cache variable. This exists for
218 # supplied `LLVM_TOOL_<project>_BUILD` CMake cache variables and overwrite
222 # non-empty list but now the user wishes to disable building all other projects
226 set(LLVM_ENABLE_PROJECTS_USED OFF CACHE BOOL "")
230 set(LLVM_ENABLE_PROJECTS_USED ON CACHE BOOL "" FORCE)
233 string(REGEX REPLACE "-" "_" upper_proj ${upper_proj})
242 set(LLVM_EXTERNAL_${upper_proj}_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../${proj}" CACHE PATH "" FORCE)
244 set(LLVM_EXTERNAL_${upper_proj}_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../${proj}" CACHE PATH "")
257 # into normal CMake variables rather than cache variables.
260 CACHE
268 set(LLVM_CCACHE_BUILD OFF CACHE BOOL "Set to ON for a ccache enabled build")
272 set(LLVM_CCACHE_MAXSIZE "" CACHE STRING "Size of ccache")
273 set(LLVM_CCACHE_DIR "" CACHE STRING "Directory to keep ccached data")
275 CACHE STRING "Parameters to pass through to ccache")
301 set(LLVM_EXTERNAL_PROJECT_BUILD_TOOL_ARGS "" CACHE STRING
302 "Optional arguments for the native tool used in CMake --build invocations for external projects.")
305 option(LLVM_DEPENDENCY_DEBUGGING "Dependency debugging mode to verify correctly expressed library dependencies (Darwin only)" OFF)
307 # Some features of the LLVM build may be disallowed when dependency debugging is
312 message(FATAL_ERROR "Dependency debugging is only currently supported on Darwin hosts.")
315 message(FATAL_ERROR "Cannot enable dependency debugging while using ccache.")
322 set(LLVM_GISEL_COV_PREFIX "${CMAKE_BINARY_DIR}/gisel-coverage-" CACHE STRING "Provide a filename prefix to collect the GlobalISel rule coverage")
325 # Add path for custom modules
367 "" CACHE STRING "Force custom VC revision for LLVM_APPEND_VC_REV")
370 "" CACHE STRING "Force custom VC repository for LLVM_APPEND_VC_REV")
376 set(PACKAGE_BUGREPORT "https://github.com/llvm/llvm-project/issues/")
378 set(BUG_REPORT_URL "${PACKAGE_BUGREPORT}" CACHE STRING
380 set(LLDB_BUG_REPORT_URL "${BUG_REPORT_URL}" CACHE STRING
414 # generate an in-source build (unless on MSVC_IDE, where it is ok), and to make
419 message(FATAL_ERROR "In-source builds are not allowed.
420 Please create a directory and run cmake from there, passing the path
440 # subdirectory in order to have the value available for llvm-config.
442 set(LLVM_INSTALL_PACKAGE_DIR "${CMAKE_INSTALL_PACKAGEDIR}/llvm" CACHE STRING
443 "Path for CMake subdirectory for LLVM (defaults to '${CMAKE_INSTALL_PACKAGEDIR}/llvm')")
445 set(LLVM_TOOLS_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}" CACHE STRING
446 "Path for binary subdirectory (defaults to '${CMAKE_INSTALL_BINDIR}')")
449 set(LLVM_UTILS_INSTALL_DIR "${LLVM_TOOLS_INSTALL_DIR}" CACHE STRING
450 "Path to install LLVM utilities (enabled by LLVM_INSTALL_UTILS=ON) (defaults to LLVM_TOOLS_INSTALL_DIR)")
453 set(LLVM_EXAMPLES_INSTALL_DIR "examples" CACHE STRING
454 "Path for examples subdirectory (enabled by LLVM_BUILD_EXAMPLES=ON) (defaults to 'examples')")
461 # DLL platform -- put DLLs into bin.
467 # Each of them corresponds to llvm-config's.
468 set(LLVM_TOOLS_BINARY_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) # --bindir
469 set(LLVM_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}) # --libdir
470 set(LLVM_MAIN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR} ) # --src-root
471 set(LLVM_MAIN_INCLUDE_DIR ${LLVM_MAIN_SRC_DIR}/include ) # --includedir
472 set(LLVM_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} ) # --prefix
516 CACHE STRING "Semicolon-separated list of targets to build, or \"all\".")
519 CACHE STRING "Semicolon-separated list of experimental targets to build, or \"all\".")
538 set(LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING "DISABLED" CACHE STRING
539 "Enhance Debugify's line number coverage tracking; enabling this is ABI-breaking. Can be DISABLED, or COVERAGE.")
540 set_property(CACHE LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING PROPERTY STRINGS DISABLED COVERAGE)
544 # Cygwin doesn't identify itself as Windows, and thus gets path::Style::posix
545 # as native path style, regardless of what this is set to.
548 option(LLVM_WINDOWS_PREFER_FORWARD_SLASH "Prefer path names with forward slashes on Windows." ${WINDOWS_PREFER_FORWARD_SLASH_DEFAULT})
551 set(FFI_LIBRARY_DIR "" CACHE PATH "Additional directory, where CMake should search for libffi.so")
552 set(FFI_INCLUDE_DIR "" CACHE PATH "Additional directory, where CMake should search for ffi.h or ffi/ffi.h")
555 CACHE STRING "Set target to use for LLVM JIT or use \"host\" for automatic detection.")
557 set(LLVM_ENABLE_LIBXML2 "ON" CACHE STRING "Use libxml2 if available. Can be ON, OFF, or FORCE_ON")
570 set(LLVM_ENABLE_ZLIB "ON" CACHE STRING "Use zlib for compression/decompression if available. Can be ON, OFF, or FORCE_ON")
572 set(LLVM_ENABLE_ZSTD "ON" CACHE STRING "Use zstd for compression/decompression if available. Can be ON, OFF, or FORCE_ON")
574 set(LLVM_USE_STATIC_ZSTD FALSE CACHE BOOL "Use static version of zstd. Can be TRUE, FALSE")
576 set(LLVM_ENABLE_CURL "OFF" CACHE STRING "Use libcurl for the HTTP client if available. Can be ON, OFF, or FORCE_ON")
578 set(LLVM_HAS_LOGF128 "OFF" CACHE STRING "Use logf128 to constant fold fp128 logarithm calls. Can be ON, OFF, or FORCE_ON")
580 set(LLVM_ENABLE_HTTPLIB "OFF" CACHE STRING "Use cpp-httplib HTTP server library if available. Can be ON, OFF, or FORCE_ON")
582 set(LLVM_Z3_INSTALL_DIR "" CACHE STRING "Install directory of the Z3 solver.")
622 option(LLVM_ENABLE_PIC "Build Position-Independent Code" ON)
626 option(LLVM_ENABLE_MODULE_DEBUGGING "Compile with -gmodules." ON)
628 option(LLVM_ENABLE_MODULE_DEBUGGING "Compile with -gmodules." OFF)
630 option(LLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY "Compile with -fmodules-local-submodule-visibility." ON)
661 set(LLVM_ABI_BREAKING_CHECKS "WITH_ASSERTS" CACHE STRING
662 "Enable abi-breaking checks. Can be WITH_ASSERTS, FORCE_ON or FORCE_OFF.")
667 set(LLVM_LOCAL_RPATH "" CACHE FILEPATH
668 "If set, an absolute path added as rpath on binaries that do not already contain an executable-relative rpath.")
694 set(LLVM_CODESIGNING_IDENTITY "" CACHE STRING
714 set(LLVM_USE_SANITIZER "" CACHE STRING
716 option(LLVM_OPTIMIZE_SANITIZED_BUILDS "Pass -O1 on debug sanitizer builds" ON)
718 "-fsanitize=undefined -fno-sanitize=vptr,function -fno-sanitize-recover=all"
719 CACHE STRING
721 set(LLVM_LIB_FUZZING_ENGINE "" CACHE PATH
722 "Path to fuzzing library for linking with fuzz targets")
725 "Use -gsplit-dwarf when compiling llvm and --gdb-index when linking." OFF)
727 # Define an option controlling whether we should build for 32-bit on 64-bit
736 set(LIT_ARGS_DEFAULT "-sv")
738 set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT} --no-progress-bar")
741 set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT} --per-test-coverage")
743 set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}" CACHE STRING "Default options for lit")
745 # On Win32 hosts, provide an option to specify the path to the GnuWin32 tools.
747 set(LLVM_LIT_TOOLS_DIR "" CACHE PATH "Path to GnuWin32 tools")
749 set(LLVM_NATIVE_TOOL_DIR "" CACHE PATH "Path to a directory containing prebuilt matching native tools (such as llvm-tblgen)")
751 set(LLVM_ENABLE_RPMALLOC "" CACHE BOOL "Replace the CRT allocator with rpmalloc.")
774 # Override the C runtime allocator with the in-tree rpmalloc
779 set(LLVM_INTEGRATED_CRT_ALLOC "${LLVM_INTEGRATED_CRT_ALLOC}" CACHE PATH "Replace the Windows CRT allocator with any of {rpmalloc|mimalloc|snmalloc}. Only works with CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded.")
820 stand-alone builds of the other projects and run their unit tests." OFF)
833 set(LLVM_INSTALL_DOXYGEN_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/llvm/doxygen-html"
834 CACHE STRING "Doxygen-generated HTML documentation install directory")
835 set(LLVM_INSTALL_OCAMLDOC_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/llvm/ocaml-html"
836 CACHE STRING "OCamldoc-generated HTML documentation install directory")
839 "Build compiler-rt as an external project." OFF)
842 "Show target and host info when tools are invoked with --version." ON)
845 "Show the optional build config flags when tools are invoked with --version." ON)
848 # shared library by setting LLVM_DYLIB_COMPONENTS to a semi-colon delimited
849 # list of LLVM components. All component names handled by llvm-config are valid.
851 set(LLVM_DYLIB_COMPONENTS "all" CACHE STRING
852 "Semicolon-separated list of components to include in libLLVM, or \"all\".")
856 option(LLVM_BUILD_LLVM_C_DYLIB "Build LLVM-C.dll (Windows only)" ON)
861 option(LLVM_BUILD_LLVM_C_DYLIB "Build libllvm-c re-export library (Darwin only)" OFF)
866 set(LLVM_BUILD_LLVM_DYLIB_VIS FALSE CACHE BOOL "")
885 building with clang-cl so the libllvm DLL is compatible with MSVC"
914 # A pool size of 1-2 is probably sufficient on an SSD. 3-4 should be fine
934 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
938 if(NOT ${shared_lib_suffix_idx} EQUAL -1)
950 set(LLVM_TARGET_TRIPLE_ENV CACHE STRING "The name of environment variable to override default target. Disabled by blank.")
958 set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ${LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default} CACHE BOOL
959 "Enable per-target runtimes directory")
961 set(LLVM_PROFDATA_FILE "" CACHE FILEPATH
972 # Find python before including config-ix, since it needs to be able to search
980 include(config-ix)
983 # invocation time. Except on 64-bit AIX, where the system toolchain
984 # expect 32-bit objects by default.
985 if("${LLVM_HOST_TRIPLE}" MATCHES "^powerpc64-ibm-aix")
994 set(LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE_DEFAULT}" CACHE STRING
1011 set(LLVM_ENABLE_NEW_PASS_MANAGER TRUE CACHE BOOL
1071 if( EXISTS ${LLVM_MAIN_SRC_DIR}/tools/llvm-exegesis/lib/${t}/CMakeLists.txt )
1112 # For up-to-date instructions for installing the TFLite dependency, refer to
1113 # the bot setup script: https://github.com/google/ml-compiler-opt/blob/main/buildbot/buildbot_init.sh
1114 set(LLVM_HAVE_TFLITE "" CACHE BOOL "Use tflite")
1116 find_package(tensorflow-lite REQUIRED)
1119 # For up-to-date instructions for installing the Tensorflow dependency, refer to
1120 # the bot setup script: https://github.com/google/ml-compiler-opt/blob/main/buildbot/buildbot_init.sh
1122 # python3 -m pip install --upgrade pip && python3 -m pip install --user tf_nightly==2.3.0.dev20200528
1123 # Then set TENSORFLOW_AOT_PATH to the package install - usually it's ~/.local/lib/python3.7/site-packages/tensorflow
1125 set(TENSORFLOW_AOT_PATH "" CACHE PATH "Path to TensorFlow pip install dir")
1128 set(LLVM_HAVE_TF_AOT "ON" CACHE BOOL "Tensorflow AOT available")
1131 CACHE PATH "Path to the Tensorflow AOT compiler")
1165 ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/llvm-config.h.cmake
1166 ${LLVM_INCLUDE_DIR}/llvm/Config/llvm-config.h)
1168 ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/abi-breaking.h.cmake
1169 ${LLVM_INCLUDE_DIR}/llvm/Config/abi-breaking.h)
1173 "${CMAKE_EXE_LINKER_FLAGS} -Wl,-lto_library -Wl,${DARWIN_LTO_LIBRARY}")
1175 "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-lto_library -Wl,${DARWIN_LTO_LIBRARY}")
1177 "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-lto_library -Wl,${DARWIN_LTO_LIBRARY}")
1181 # break things. In this case we need to enable the large-file API as well.
1186 # Modules should be built with -shared -Wl,-G, so we can use runtime linking
1188 string(APPEND CMAKE_MODULE_LINKER_FLAGS " -shared -Wl,-G")
1191 string(APPEND CMAKE_SHARED_LINKER_FLAGS " -shared")
1204 append("-fzos-le-char-mode=ascii" CMAKE_CXX_FLAGS CMAKE_C_FLAGS)
1205 append("-m64" CMAKE_CXX_FLAGS CMAKE_C_FLAGS)
1223 # Dummy use to avoid CMake Warning: Manually-specified variables were not used
1232 # Make sure we don't get -rdynamic in every binary. For those that need it,
1242 # People report that -O3 is unreliable on MinGW. The traditional
1243 # build also uses -O2 for that reason:
1244 llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "-O2")
1248 umbrella_lit_testsuite_begin(check-all)
1268 add_subdirectory(utils/yaml-bench)
1269 add_subdirectory(utils/split-file)
1270 add_subdirectory(utils/mlgo-utils)
1272 set(LLVM_SUBPROJECT_TITLE "Third-Party/Google Test")
1273 add_subdirectory(${LLVM_THIRD_PARTY_DIR}/unittest ${CMAKE_CURRENT_BINARY_DIR}/third-party/unittest)
1310 "" CACHE STRING
1312 if(EXISTS ${LLVM_MAIN_SRC_DIR}/projects/test-suite AND TARGET clang)
1314 llvm_ExternalProject_Add(test-suite ${LLVM_MAIN_SRC_DIR}/projects/test-suite
1330 umbrella_lit_testsuite_end(check-all)
1334 add_custom_target(test-depends)
1336 add_dependencies(test-depends ${LLVM_ALL_LIT_DEPENDS} ${LLVM_ALL_ADDITIONAL_TEST_DEPENDS})
1338 set_target_properties(test-depends PROPERTIES FOLDER "LLVM/Tests")
1339 add_dependencies(check-all test-depends)
1350 add_subdirectory(utils/llvm-lit)
1354 install(DIRECTORY include/llvm include/llvm-c
1356 COMPONENT llvm-headers
1365 install(DIRECTORY ${LLVM_INCLUDE_DIR}/llvm ${LLVM_INCLUDE_DIR}/llvm-c
1367 COMPONENT llvm-headers
1381 COMPONENT llvm-headers
1387 COMPONENT llvm-headers
1394 add_custom_target(llvm-headers DEPENDS intrinsics_gen omp_gen)
1395 set_target_properties(llvm-headers PROPERTIES FOLDER "LLVM/Resources")
1398 add_llvm_install_targets(install-llvm-headers
1399 DEPENDS llvm-headers
1400 COMPONENT llvm-headers)
1404 add_custom_target(llvm-libraries)
1405 set_target_properties(llvm-libraries PROPERTIES FOLDER "LLVM/Resources")
1408 add_llvm_install_targets(install-llvm-libraries
1409 DEPENDS llvm-libraries
1410 COMPONENT llvm-libraries)
1417 add_dependencies(llvm-libraries ${lib})
1419 add_dependencies(install-llvm-libraries install-${lib})
1420 add_dependencies(install-llvm-libraries-stripped install-${lib}-stripped)
1432 # This allows us to deploy the Universal CRT DLLs by passing -DCMAKE_INSTALL_UCRT_LIBRARIES=ON to CMake
1440 set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "Disable benchmark testing" FORCE)
1441 set(BENCHMARK_ENABLE_EXCEPTIONS OFF CACHE BOOL "Disable benchmark exceptions" FORCE)
1442 set(BENCHMARK_ENABLE_INSTALL OFF CACHE BOOL "Don't install benchmark" FORCE)
1443 set(BENCHMARK_DOWNLOAD_DEPENDENCIES OFF CACHE BOOL "Don't download dependencies" FORCE)
1444 set(BENCHMARK_ENABLE_GTEST_TESTS OFF CACHE BOOL "Disable Google Test in benchmark" FORCE)
1445 set(BENCHMARK_ENABLE_WERROR ${LLVM_ENABLE_WERROR} CACHE BOOL
1446 "Handle -Werror for Google Benchmark based on LLVM_ENABLE_WERROR" FORCE)
1448 set(HAVE_STD_REGEX ON CACHE BOOL "OK" FORCE)
1450 ${CMAKE_CURRENT_BINARY_DIR}/third-party/benchmark)
1451 set_target_properties(benchmark PROPERTIES FOLDER "Third-Party/Google Benchmark")
1452 set_target_properties(benchmark_main PROPERTIES FOLDER "Third-Party/Google Benchmark")
1457 add_subdirectory(utils/llvm-locstats)
1463 # -DLLVM_XCODE_EXTRA_TARGET_SCHEMES="TargetParserTests;SupportTests"
1466 set(LLVM_XCODE_EXTRA_TARGET_SCHEMES "" CACHE STRING "Specifies an extra list of targets to turn into schemes")