[llvm] [cmake] Option to create Ninja job pools depending on available resources (PR #65274)

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 4 11:21:15 PDT 2023


================
@@ -36,6 +36,20 @@ string(TOUPPER "${LLVM_ENABLE_LTO}" uppercase_LLVM_ENABLE_LTO)
 # The following only works with the Ninja generator in CMake >= 3.0.
 set(LLVM_PARALLEL_COMPILE_JOBS "" CACHE STRING
   "Define the maximum number of concurrent compilation jobs (Ninja only).")
+
+cmake_host_system_information(RESULT available_physical_memory QUERY AVAILABLE_PHYSICAL_MEMORY)
+cmake_host_system_information(RESULT number_of_logical_cores QUERY NUMBER_OF_LOGICAL_CORES)
----------------
compnerd wrote:

Are the queries needed if the two new parameters are unspecified?  Perhaps split them up to the condition where they are used?

https://github.com/llvm/llvm-project/pull/65274


More information about the llvm-commits mailing list