Skip to content

Commit

Permalink
fix rustdoc compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-kashitsyn committed Aug 23, 2022
1 parent 6c10db4 commit dab2520
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion rust/private/rustc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,7 @@ def construct_arguments(
force_all_deps_direct = False,
force_link = False,
stamp = False,
remap_path_prefix = True,
use_json_output = False,
build_metadata = False,
force_depend_on_objects = False):
Expand Down Expand Up @@ -877,7 +878,7 @@ def construct_arguments(
rustc_flags.add("--codegen=debuginfo=" + compilation_mode.debug_info)

# For determinism to help with build distribution and such
if hasattr(ctx.attr, "_source_path_prefix"):
if remap_path_prefix and hasattr(ctx.attr, "_source_path_prefix"):
rustc_flags.add("--remap-path-prefix=${{pwd}}={}".format(ctx.attr._source_path_prefix[SourcePathPrefixInfo].source_path_prefix))

if emit:
Expand Down
2 changes: 1 addition & 1 deletion rust/private/rustdoc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def rustdoc_compile_action(
build_env_files = build_env_files,
build_flags_files = build_flags_files,
emit = [],
remap_path_prefix = None,
remap_path_prefix = False,
force_link = True,
force_depend_on_objects = is_test,
)
Expand Down

0 comments on commit dab2520

Please sign in to comment.