Skip to content

Commit c5e4215

Browse files
authored
[libclc] Let builtins_remangle_path generating command depend on prepare-${obj_suffix} target (#19619)
The add_custom_command depends on builtins_lib, but not on prepare-${obj_suffix} target that generates builtins_lib. cmake documentation doesn't mention that the add_custom_command will automatically depends on prepare-${obj_suffix} target. The dependency was removed in f07c1fa. However, our downstream repo reintroduced it to fix build error in CMPLRLLVM-57824, where builtins_lib is used while still being generated. This PR adds the dependency back. Then, cmake will create a target-level dependency to make sure prepare-${obj_suffix} target is built before target "remangled-${long_width}-${signedness}_char.${obj_suffix_mangled}".
1 parent d639a6b commit c5e4215

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libclc/cmake/modules/AddLibclc.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ function(add_libclc_builtin_set)
510510
--char-signedness=${signedness}
511511
--input-ir=${builtins_lib}
512512
${dummy_in}
513-
DEPENDS ${builtins_lib} ${libclc-remangler_target} ${dummy_in})
513+
DEPENDS prepare-${obj_suffix} ${builtins_lib} ${libclc-remangler_target} ${dummy_in})
514514
add_custom_target( "remangled-${long_width}-${signedness}_char.${obj_suffix_mangled}" ALL
515515
DEPENDS "${builtins_remangle_path}" "${dummy_in}")
516516
set_target_properties("remangled-${long_width}-${signedness}_char.${obj_suffix_mangled}"

0 commit comments

Comments
 (0)