@@ -571,7 +571,7 @@ impl Step for Sanitizers {
571571 }
572572
573573 let out_dir = builder. native_dir ( self . target ) . join ( "sanitizers" ) ;
574- let runtimes = supported_sanitizers ( & out_dir, self . target ) ;
574+ let runtimes = supported_sanitizers ( & out_dir, self . target , & builder . config . channel ) ;
575575 if runtimes. is_empty ( ) {
576576 return runtimes;
577577 }
@@ -635,7 +635,11 @@ pub struct SanitizerRuntime {
635635}
636636
637637/// Returns sanitizers available on a given target.
638- fn supported_sanitizers ( out_dir : & Path , target : Interned < String > ) -> Vec < SanitizerRuntime > {
638+ fn supported_sanitizers (
639+ out_dir : & Path ,
640+ target : Interned < String > ,
641+ channel : & str ,
642+ ) -> Vec < SanitizerRuntime > {
639643 let mut result = Vec :: new ( ) ;
640644 match & * target {
641645 "x86_64-apple-darwin" => {
@@ -644,7 +648,7 @@ fn supported_sanitizers(out_dir: &Path, target: Interned<String>) -> Vec<Sanitiz
644648 cmake_target : format ! ( "clang_rt.{}_osx_dynamic" , s) ,
645649 path : out_dir
646650 . join ( & format ! ( "build/lib/darwin/libclang_rt.{}_osx_dynamic.dylib" , s) ) ,
647- name : format ! ( "librustc_rt .{}.dylib" , s) ,
651+ name : format ! ( "librustc-{}_rt .{}.dylib" , channel , s) ,
648652 } ) ;
649653 }
650654 }
@@ -653,7 +657,7 @@ fn supported_sanitizers(out_dir: &Path, target: Interned<String>) -> Vec<Sanitiz
653657 result. push ( SanitizerRuntime {
654658 cmake_target : format ! ( "clang_rt.{}-x86_64" , s) ,
655659 path : out_dir. join ( & format ! ( "build/lib/linux/libclang_rt.{}-x86_64.a" , s) ) ,
656- name : format ! ( "librustc_rt .{}.a" , s) ,
660+ name : format ! ( "librustc-{}_rt .{}.a" , channel , s) ,
657661 } ) ;
658662 }
659663 }
@@ -662,7 +666,7 @@ fn supported_sanitizers(out_dir: &Path, target: Interned<String>) -> Vec<Sanitiz
662666 result. push ( SanitizerRuntime {
663667 cmake_target : format ! ( "clang_rt.{}-x86_64" , s) ,
664668 path : out_dir. join ( & format ! ( "build/lib/fuchsia/libclang_rt.{}-x86_64.a" , s) ) ,
665- name : format ! ( "librustc_rt .{}.a" , s) ,
669+ name : format ! ( "librustc-{}_rt .{}.a" , channel , s) ,
666670 } ) ;
667671 }
668672 }
@@ -671,7 +675,7 @@ fn supported_sanitizers(out_dir: &Path, target: Interned<String>) -> Vec<Sanitiz
671675 result. push ( SanitizerRuntime {
672676 cmake_target : format ! ( "clang_rt.{}-aarch64" , s) ,
673677 path : out_dir. join ( & format ! ( "build/lib/fuchsia/libclang_rt.{}-aarch64.a" , s) ) ,
674- name : format ! ( "librustc_rt .{}.a" , s) ,
678+ name : format ! ( "librustc-{}_rt .{}.a" , channel , s) ,
675679 } ) ;
676680 }
677681 }
0 commit comments