[flang-commits] [flang] [Flang] Assign unittests to flang_compile pool (PR #150041)
Michael Kruse via flang-commits
flang-commits at lists.llvm.org
Tue Jul 22 08:26:49 PDT 2025
https://github.com/Meinersbur created https://github.com/llvm/llvm-project/pull/150041
#127364 added the FLANG_PARALLEL_COMPILE_JOBS option to limit the number of parallel compilations of Flang sources which require an unusal amount of memory. This patch also adds Flang's unittests to this pool which use about the same amount of memory.
>From ed4290ec8fe7df65c5f215a2474514a12eb01d7e Mon Sep 17 00:00:00 2001
From: Michael Kruse <llvm-project at meinersbur.de>
Date: Tue, 22 Jul 2025 17:21:16 +0200
Subject: [PATCH] Assign unittests to flang_compile pool
---
flang/unittests/CMakeLists.txt | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/flang/unittests/CMakeLists.txt b/flang/unittests/CMakeLists.txt
index b4e969c9426ee..db04923e2943a 100644
--- a/flang/unittests/CMakeLists.txt
+++ b/flang/unittests/CMakeLists.txt
@@ -12,6 +12,9 @@ set_target_properties(FlangUnitTests PROPERTIES FOLDER "Flang/Tests")
function(add_flang_unittest test_dirname)
add_unittest(FlangUnitTests ${test_dirname} ${ARGN})
+ if (FLANG_PARALLEL_COMPILE_JOBS)
+ set_property(TARGET ${test_dirname} PROPERTY JOB_POOL_COMPILE flang_compile_job_pool)
+ endif ()
endfunction()
if (CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG)
@@ -35,6 +38,9 @@ function(add_flang_nongtest_unittest test_name)
add_executable(${test_name}${suffix} "${test_filepath}")
set_target_properties(${test_name}${suffix} PROPERTIES FOLDER "Flang/Tests/Unit")
+ if (FLANG_PARALLEL_COMPILE_JOBS)
+ set_property(TARGET ${test_name}${suffix} PROPERTY JOB_POOL_COMPILE flang_compile_job_pool)
+ endif ()
if (LLVM_LINK_LLVM_DYLIB AND NOT ARG_DISABLE_LLVM_LINK_LLVM_DYLIB)
set(llvm_libs LLVM)
More information about the flang-commits
mailing list