[all-commits] [llvm/llvm-project] 0911e5: [DeviceRTL] Fix incremental build

Ye Luo via All-commits all-commits at lists.llvm.org
Thu Oct 27 20:51:42 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0911e57f1db3e5a6053eeb9ca1ff2ea97c5db336
      https://github.com/llvm/llvm-project/commit/0911e57f1db3e5a6053eeb9ca1ff2ea97c5db336
  Author: Ye Luo <yeluo at anl.gov>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M openmp/libomptarget/DeviceRTL/CMakeLists.txt

  Log Message:
  -----------
  [DeviceRTL] Fix incremental build

Need both add_custom_command to resolve file-level dependency and add_custom_target to resolve target-level dependency.
>From CMake add_custom_command doc:
Do not list the output in more than one independent target that may build in parallel or the two instances of the rule may conflict (instead use the add_custom_target() command to drive the command and make the other targets depend on that one).

${CMAKE_CURRENT_BINARY_DIR}/${bclib_name} is used by multiple targets and thus requires a custom target to avoid racing.

Differential Revision: https://reviews.llvm.org/D136911




More information about the All-commits mailing list