Skip to content

Commit

Permalink
Ensure that running bazel build on a cargo_build_script target actu…
Browse files Browse the repository at this point in the history
…ally runs the build script (#2680)

Co-authored-by: Daniel Wagner-Hall <dwagnerhall@apple.com>
  • Loading branch information
matts1 and illicitonion committed Jun 6, 2024
1 parent 7f2b47c commit e3a77c4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cargo/private/cargo_build_script.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,10 @@ def _cargo_build_script_impl(ctx):
)

return [
# Although this isn't used anywhere, without this, `bazel build`'ing
# the cargo_build_script label won't actually run the build script
# since bazel is lazy.
DefaultInfo(files = depset([out_dir])),
BuildInfo(
out_dir = out_dir,
rustc_env = env_out,
Expand Down

0 comments on commit e3a77c4

Please sign in to comment.