Skip to content

Commit

Permalink
Place build_outputs next to their corresponding rlib/rmeta
Browse files Browse the repository at this point in the history
Hopefully this fixes compilation issues on windows
  • Loading branch information
googleson78 committed Nov 16, 2022
1 parent 67ae841 commit 2848333
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions rust/private/rust.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,10 @@ def _rust_library_common(ctx, crate_type):
rust_lib_build_output = None
output_diagnostics = ctx.attr._output_diagnostics
if ctx.attr._process_wrapper and output_diagnostics:
rust_lib_build_output = ctx.actions.declare_file(_rustc_output_name(rust_lib_name))
rust_lib_build_output = ctx.actions.declare_file(
_rustc_output_name(rust_lib_name)
sibling = rust_lib,
)

rust_metadata = None
rust_metadata_build_output = None
Expand All @@ -295,7 +298,10 @@ def _rust_library_common(ctx, crate_type):
sibling = rust_lib,
)
if output_diagnostics:
rust_metadata_build_output = ctx.actions.declare_file(_rustc_output_name(rust_metadata_name))
rust_metadata_build_output = ctx.actions.declare_file(
_rustc_output_name(rust_metadata_name),
sibling = rust_metadata,
)

deps = transform_deps(ctx.attr.deps)
proc_macro_deps = transform_deps(ctx.attr.proc_macro_deps + get_import_macro_deps(ctx))
Expand Down

0 comments on commit 2848333

Please sign in to comment.