Skip to content

Commit 99e42cf

Browse files
committed
[CMake] Simplify building of bolt-optimized clang for distribution builds
Currently if you want to do a distribution build (i.e. using LLVM_DISTIRIBUTION_COMPONENTS) with a bolt-optimized clang, then you need to pass two separate targets to ninja like this: ninja -C build clang-bolt distribiution This patch simplifies this workflow so that you can do a distribution build with a bolt-optimized build with just a single target: ninja -C build distribution
1 parent 4ab298b commit 99e42cf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/cmake/modules/LLVMDistributionSupport.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,11 @@ function(llvm_distribution_add_targets)
276276
# This happens for example if a target is an INTERFACE target.
277277
if(TARGET ${target})
278278
add_dependencies(${distribution_target} ${target})
279+
# Add a special case for bolt-optimized clang. This will ensure that the
280+
# bolt optimized clang is built with the rest of the distribution.
281+
if (target STREQUAL "clang" AND TARGET clang-bolt)
282+
add_dependencies(${distribution_target} clang-bolt)
283+
endif()
279284
endif()
280285

281286
if(TARGET install-${target})

0 commit comments

Comments
 (0)