Skip to content

Commit

Permalink
Resolve symlinks among output binaries (#781)
Browse files Browse the repository at this point in the history
Certain (C)Make projects (such as [AFL++](https://github.com/AFLplusplus/AFLplusplus)) emit binaries that are symlinks to other emitted binaries. When built with `rules_foreign_cc`, this can lead to non-deterministic dangling symlink errors since Bazel visits the outputs in an unspecified order. This is fixed by resolving symlinks among the emitted binaries, just like it is already done for libraries.
  • Loading branch information
fmeum authored Sep 6, 2021
1 parent 8f6fc67 commit fde2581
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions foreign_cc/private/framework.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ def cc_external_rule_impl(ctx, attrs):
] + [
"##replace_symlink## {}".format(file.path)
for file in (
outputs.out_binary_files +
outputs.libraries.static_libraries +
outputs.libraries.shared_libraries +
outputs.libraries.interface_libraries
Expand Down

0 comments on commit fde2581

Please sign in to comment.