================
@@ -342,21 +342,32 @@ function(add_libclc_builtin_set)
 
   set( builtins_opt_lib_tgt builtins.opt.${ARG_ARCH_SUFFIX} )
 
-  # Add opt target
-  add_custom_command( OUTPUT ${builtins_opt_lib_tgt}.bc
-    COMMAND ${opt_exe} ${ARG_OPT_FLAGS} -o ${builtins_opt_lib_tgt}.bc
-      ${builtins_link_lib}
-    DEPENDS ${opt_target} ${builtins_link_lib} ${builtins_link_lib_tgt}
-  )
-  add_custom_target( ${builtins_opt_lib_tgt}
-    ALL DEPENDS ${builtins_opt_lib_tgt}.bc
-  )
-  set_target_properties( ${builtins_opt_lib_tgt} PROPERTIES
-    TARGET_FILE ${CMAKE_CURRENT_BINARY_DIR}/${builtins_opt_lib_tgt}.bc
-    FOLDER "libclc/Device IR/Opt"
-  )
+  if( ${ARG_OPT_FLAGS} STREQUAL "" )
+    # Add empty opt target.
+    add_custom_target( ${builtins_opt_lib_tgt} ALL )
+    set_target_properties( ${builtins_opt_lib_tgt} PROPERTIES
----------------
wenju-he wrote:

thanks for the suggestion. Done.

https://github.com/llvm/llvm-project/pull/130882
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to