Skip to content

Commit db9dcd1

Browse files
author
Vinh Tran
committed
Fix tests
1 parent 7129a2f commit db9dcd1

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

cargo/private/cargo_build_script.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ def _cargo_dep_env_implementation(ctx):
445445
build_infos.append(BuildInfo(
446446
dep_env = empty_file,
447447
flags = empty_file,
448-
link_flags = empty_file,
448+
linker_flags = empty_file,
449449
link_search_paths = empty_file,
450450
out_dir = out_dir,
451451
rustc_env = empty_file,
@@ -464,7 +464,7 @@ def _cargo_dep_env_implementation(ctx):
464464
BuildInfo(
465465
dep_env = empty_file,
466466
flags = empty_file,
467-
link_flags = empty_file,
467+
linker_flags = empty_file,
468468
link_search_paths = empty_file,
469469
out_dir = None,
470470
rustc_env = empty_file,

rust/private/providers.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ BuildInfo = provider(
7575
"compile_data": "Depset[File]: Compile data provided by the build script that was not copied into `out_dir`.",
7676
"dep_env": "Optinal[File]: extra build script environment varibles to be set to direct dependencies.",
7777
"flags": "Optional[File]: file containing additional flags to pass to rustc",
78-
"linker_flags": "Optional[File]: file containing flags to pass to the linker",
78+
"linker_flags": "Optional[File]: file containing flags to pass to the linker invoked by rustc or cc_common.link",
7979
"link_search_paths": "Optional[File]: file containing search paths to pass to rustc and linker",
8080
"out_dir": "Optional[File]: directory containing the result of a build script",
8181
"rustc_env": "Optional[File]: file containing additional environment variables to set for rustc.",

rust/private/rustc.bzl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1668,6 +1668,9 @@ def _create_extra_input_args(build_info, dep_info):
16681668
build_env_file = build_info.rustc_env
16691669
if build_info.flags:
16701670
build_flags_files.append(build_info.flags)
1671+
if build_info.linker_flags:
1672+
build_flags_files.append(build_info.linker_flags)
1673+
input_files.append(build_info.linker_flags)
16711674

16721675
input_depsets.append(build_info.compile_data)
16731676

0 commit comments

Comments
 (0)