[Openmp-commits] [openmp] a2f5bcc - OpenMP/cmake: Use DEPFILE instead of IMPLICIT_DEPENDS

Matt Arsenault via Openmp-commits openmp-commits at lists.llvm.org
Fri Jun 23 12:25:16 PDT 2023


Author: Matt Arsenault
Date: 2023-06-23T15:25:10-04:00
New Revision: a2f5bcc766fb77118630e13c91c3f3f2fd43420a

URL: https://github.com/llvm/llvm-project/commit/a2f5bcc766fb77118630e13c91c3f3f2fd43420a
DIFF: https://github.com/llvm/llvm-project/commit/a2f5bcc766fb77118630e13c91c3f3f2fd43420a.diff

LOG: OpenMP/cmake: Use DEPFILE instead of IMPLICIT_DEPENDS

IMPLICIT_DEPENDS doesn't actually work with ninja and this does.

Added: 
    

Modified: 
    openmp/libomptarget/DeviceRTL/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/DeviceRTL/CMakeLists.txt b/openmp/libomptarget/DeviceRTL/CMakeLists.txt
index 7540a8c4ca0a1..8068904bf951f 100644
--- a/openmp/libomptarget/DeviceRTL/CMakeLists.txt
+++ b/openmp/libomptarget/DeviceRTL/CMakeLists.txt
@@ -138,15 +138,17 @@ function(compileDeviceRTLLibrary target_cpu target_name target_triple)
     get_filename_component(infile ${src} ABSOLUTE)
     get_filename_component(outfile ${src} NAME)
     set(outfile "${outfile}-${target_cpu}.bc")
+    set(depfile "${outfile}.d")
 
     add_custom_command(OUTPUT ${outfile}
       COMMAND ${CLANG_TOOL}
       ${bc_flags}
       --offload-arch=${target_cpu}
       ${target_bc_flags}
+      -MD -MF ${depfile}
       ${infile} -o ${outfile}
-      DEPENDS ${infile} ${include_files}
-      IMPLICIT_DEPENDS CXX ${infile}
+      DEPENDS ${infile}
+      DEPFILE ${depfile}
       COMMENT "Building LLVM bitcode ${outfile}"
       VERBATIM
     )


        


More information about the Openmp-commits mailing list