Author: Shoaib Meenai Date: 2021-03-25T11:36:00-07:00 New Revision: 0135bc996d82ff68677820c421b4d666590e4f31
URL: https://github.com/llvm/llvm-project/commit/0135bc996d82ff68677820c421b4d666590e4f31 DIFF: https://github.com/llvm/llvm-project/commit/0135bc996d82ff68677820c421b4d666590e4f31.diff LOG: [clang] Always execute multi-stage install steps We want installs to be executed even if binaries haven't changed, e.g. so that we can install to multiple places. This is consistent with how non-multi-stage install targets (e.g. the regular install-distribution target) behave. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D99321 Added: Modified: clang/CMakeLists.txt Removed: ################################################################################ diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt index aa38110b6d22..6535f84edbb7 100644 --- a/clang/CMakeLists.txt +++ b/clang/CMakeLists.txt @@ -867,10 +867,23 @@ if (CLANG_ENABLE_BOOTSTRAP) # exclude from main target set_target_properties(${NEXT_CLANG_STAGE} PROPERTIES _EP_${target}_EXCLUDE_FROM_MAIN On) + # Install targets have side effects, so we always want to execute them. + # "install" is reserved by CMake and can't be used as a step name for + # ExternalProject_Add_Step, so we can match against "^install-" instead of + # "^install" to get a tighter match. CMake's installation scripts already + # skip up-to-date files, so there's no behavior change if you install to the + # same destination multiple times. + if(target MATCHES "^install-") + set(step_always ON) + else() + set(step_always OFF) + endif() + ExternalProject_Add_Step(${NEXT_CLANG_STAGE} ${target} COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --target ${target} COMMENT "Performing ${target} for '${NEXT_CLANG_STAGE}'" DEPENDEES configure + ALWAYS ${step_always} USES_TERMINAL 1 ) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits