@@ -334,7 +334,6 @@ def construct_arguments(
334
334
tool_path ,
335
335
cc_toolchain ,
336
336
feature_configuration ,
337
- crate_type ,
338
337
crate_info ,
339
338
dep_info ,
340
339
output_hash ,
@@ -353,7 +352,6 @@ def construct_arguments(
353
352
tool_path (str): Path to rustc
354
353
cc_toolchain (CcToolchain): The CcToolchain for the current target.
355
354
feature_configuration (FeatureConfiguration): Class used to construct command lines from CROSSTOOL features.
356
- crate_type (str): Crate type of the current target.
357
355
crate_info (CrateInfo): The CrateInfo provider of the target crate
358
356
dep_info (DepInfo): The DepInfo provider of the target crate
359
357
output_hash (str): The hashed path of the crate root
@@ -489,7 +487,7 @@ def construct_arguments(
489
487
rustc_flags .add ("--codegen=linker=" + ld )
490
488
rustc_flags .add_joined ("--codegen" , link_args , join_with = " " , format_joined = "link-args=%s" )
491
489
492
- _add_native_link_flags (rustc_flags , dep_info , crate_type , toolchain , cc_toolchain , feature_configuration )
490
+ _add_native_link_flags (rustc_flags , dep_info , crate_info . type , toolchain , cc_toolchain , feature_configuration )
493
491
494
492
# These always need to be added, even if not linking this crate.
495
493
add_crate_link_flags (rustc_flags , dep_info )
@@ -531,7 +529,6 @@ def construct_arguments(
531
529
def rustc_compile_action (
532
530
ctx ,
533
531
toolchain ,
534
- crate_type ,
535
532
crate_info ,
536
533
output_hash = None ,
537
534
rust_flags = [],
@@ -541,7 +538,6 @@ def rustc_compile_action(
541
538
Args:
542
539
ctx (ctx): The rule's context object
543
540
toolchain (rust_toolchain): The current `rust_toolchain`
544
- crate_type (str): Crate type of the current target
545
541
crate_info (CrateInfo): The CrateInfo provider for the current target.
546
542
output_hash (str, optional): The hashed path of the crate root. Defaults to None.
547
543
rust_flags (list, optional): Additional flags to pass to rustc. Defaults to [].
@@ -581,7 +577,6 @@ def rustc_compile_action(
581
577
toolchain .rustc .path ,
582
578
cc_toolchain ,
583
579
feature_configuration ,
584
- crate_type ,
585
580
crate_info ,
586
581
dep_info ,
587
582
output_hash ,
0 commit comments