Skip to content

Commit e810a3f

Browse files
Meinersburmahesh-attarde
authored andcommitted
[Flang] Assign unittests to flang_compile pool (llvm#150041)
llvm#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 that use about the same amount of memory due to including the same headers.
1 parent 1910be5 commit e810a3f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

flang/unittests/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ set_target_properties(FlangUnitTests PROPERTIES FOLDER "Flang/Tests")
1212

1313
function(add_flang_unittest test_dirname)
1414
add_unittest(FlangUnitTests ${test_dirname} ${ARGN})
15+
if (FLANG_PARALLEL_COMPILE_JOBS)
16+
set_property(TARGET ${test_dirname} PROPERTY JOB_POOL_COMPILE flang_compile_job_pool)
17+
endif ()
1518
endfunction()
1619

1720
if (CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG)
@@ -35,6 +38,9 @@ function(add_flang_nongtest_unittest test_name)
3538

3639
add_executable(${test_name}${suffix} "${test_filepath}")
3740
set_target_properties(${test_name}${suffix} PROPERTIES FOLDER "Flang/Tests/Unit")
41+
if (FLANG_PARALLEL_COMPILE_JOBS)
42+
set_property(TARGET ${test_name}${suffix} PROPERTY JOB_POOL_COMPILE flang_compile_job_pool)
43+
endif ()
3844

3945
if (LLVM_LINK_LLVM_DYLIB AND NOT ARG_DISABLE_LLVM_LINK_LLVM_DYLIB)
4046
set(llvm_libs LLVM)

0 commit comments

Comments
 (0)