@@ -74,27 +74,29 @@ macro(add_libclc_builtin_set arch_suffix)
74
74
set ( obj_suffix ${arch_suffix} .bc )
75
75
76
76
# Add opt target
77
- add_custom_command ( OUTPUT "${LIBCLC_LIBRARY_OUTPUT_INTDIR} /builtins.opt.${obj_suffix} "
77
+ set ( builtins_opt_path "${LIBCLC_LIBRARY_OUTPUT_INTDIR} /builtins.opt.${obj_suffix} " )
78
+ add_custom_command ( OUTPUT "${builtins_opt_path} "
78
79
COMMAND ${LLVM_OPT} -O3 -o
79
- "${LIBCLC_LIBRARY_OUTPUT_INTDIR} /builtins.opt. ${obj_suffix } "
80
+ "${builtins_opt_path } "
80
81
"${LIBCLC_LIBRARY_OUTPUT_INTDIR} /builtins.link.${obj_suffix} "
81
82
DEPENDS opt "builtins.link.${arch_suffix} " )
82
83
add_custom_target ( "opt.${obj_suffix} " ALL
83
- DEPENDS "${LIBCLC_LIBRARY_OUTPUT_INTDIR} /builtins.opt. ${obj_suffix } " )
84
+ DEPENDS "${builtins_opt_path } " )
84
85
set_target_properties ("opt.${obj_suffix} "
85
- PROPERTIES TARGET_FILE "${LIBCLC_LIBRARY_OUTPUT_INTDIR} /builtins.opt. ${obj_suffix } " )
86
+ PROPERTIES TARGET_FILE "${builtins_opt_path } " )
86
87
87
88
# Add prepare target
88
- add_custom_command ( OUTPUT "${LIBCLC_LIBRARY_OUTPUT_INTDIR} /${obj_suffix} "
89
+ set ( builtins_obj_path "${LIBCLC_LIBRARY_OUTPUT_INTDIR} /${obj_suffix} " )
90
+ add_custom_command ( OUTPUT "${builtins_obj_path} "
89
91
COMMAND prepare_builtins -o
90
- "${LIBCLC_LIBRARY_OUTPUT_INTDIR} / ${obj_suffix } "
92
+ "${builtins_obj_path } "
91
93
"$<TARGET_PROPERTY:opt.${obj_suffix} ,TARGET_FILE>"
92
- DEPENDS "opt. ${obj_suffix} "
93
- prepare_builtins )
94
+ DEPENDS ${builtins_opt_path}
95
+ prepare_builtins )
94
96
add_custom_target ( "prepare-${obj_suffix} " ALL
95
- DEPENDS "${LIBCLC_LIBRARY_OUTPUT_INTDIR} / ${obj_suffix } " )
97
+ DEPENDS "${builtins_obj_path } " )
96
98
set_target_properties ("prepare-${obj_suffix} "
97
- PROPERTIES TARGET_FILE "${LIBCLC_LIBRARY_OUTPUT_INTDIR} / ${obj_suffix } " )
99
+ PROPERTIES TARGET_FILE "${builtins_obj_path } " )
98
100
99
101
# Add dependency to top-level pseudo target to ease making other
100
102
# targets dependent on libclc.
0 commit comments