Skip to content

Commit

Permalink
Fix bundling error on buildbots (#8392)
Browse files Browse the repository at this point in the history
LLVM as it is built on the buildbots depends on `-lrt`, which is not a
target. Filter out non-target dependencies from consideration.
  • Loading branch information
alexreinking authored Aug 16, 2024
1 parent 4f30d2b commit 9864bd4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmake/BundleStatic.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,14 @@ function(bundle_static TARGET)
# Repeatedly expand and flatten: T ~> T, T.INTERFACE_LINK_LIBRARIES
foreach (i RANGE 5)
_bundle_static_replace(
cmd "(.+)" "\\1;$<$<TARGET_EXISTS:\\1>:$<TARGET_PROPERTY:\\1,INTERFACE_LINK_LIBRARIES>>"
cmd "(.+)" "$<$<TARGET_EXISTS:\\1>:\\1;$<TARGET_PROPERTY:\\1,INTERFACE_LINK_LIBRARIES>>"
)
set(cmd "$<LIST:REMOVE_DUPLICATES,$<GENEX_EVAL:${cmd}>>")
endforeach ()

# Ensure we are only including targets
_bundle_static_replace(cmd "(.+)" "$<TARGET_NAME_IF_EXISTS:\\1>")

# Rewrite T ~> T^T.TYPE -- we use ^ as a delimiter
_bundle_static_replace(cmd "(.+)" "\\1^$<TARGET_PROPERTY:\\1,TYPE>")
set(cmd "$<GENEX_EVAL:${cmd}>")
Expand Down

0 comments on commit 9864bd4

Please sign in to comment.