[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 15:04:04 PDT 2023
================
@@ -47,6 +62,17 @@ endif()
set(LLVM_PARALLEL_LINK_JOBS "" CACHE STRING
"Define the maximum number of concurrent link jobs (Ninja only).")
+if(LLVM_RAM_PER_LINK_JOB)
+ math(EXPR memory_available_jobs "${available_physical_memory} / ${LLVM_RAM_PER_LINK_JOB}" OUTPUT_FORMAT DECIMAL)
+ if (memory_available_jobs LESS 1)
----------------
compnerd wrote:
Similar
https://github.com/llvm/llvm-project/pull/65274
More information about the llvm-commits
mailing list