@@ -558,6 +558,9 @@ fn main_result() -> anyhow::Result<i32> {
558
558
let default_db = "results.db" ;
559
559
let default_out_dir = std:: ffi:: OsStr :: new ( "results" ) ;
560
560
561
+ // XXX: This doesn't necessarily work for all archs
562
+ let target_triple = format ! ( "{}-unknown-linux-gnu" , std:: env:: consts:: ARCH ) ;
563
+
561
564
let ret = match matches. subcommand ( ) {
562
565
( "bench_local" , Some ( sub_m) ) => {
563
566
// Mandatory arguments
@@ -590,7 +593,7 @@ fn main_result() -> anyhow::Result<i32> {
590
593
rustc : & rustc,
591
594
rustdoc : rustdoc. as_deref ( ) ,
592
595
cargo : & cargo,
593
- triple : "x86_64-unknown-linux-gnu" , // XXX: technically not necessarily true
596
+ triple : & target_triple ,
594
597
is_nightly : true ,
595
598
} ,
596
599
& benchmarks,
@@ -626,7 +629,7 @@ fn main_result() -> anyhow::Result<i32> {
626
629
627
630
let pool = database:: Pool :: open ( db) ;
628
631
629
- let sysroot = Sysroot :: install ( commit. sha . to_string ( ) , "x86_64-unknown-linux-gnu" )
632
+ let sysroot = Sysroot :: install ( commit. sha . to_string ( ) , & target_triple )
630
633
. with_context ( || format ! ( "failed to install sysroot for {:?}" , commit) ) ?;
631
634
632
635
let benchmarks = get_benchmarks (
@@ -716,7 +719,7 @@ fn main_result() -> anyhow::Result<i32> {
716
719
rustdoc : Some ( Path :: new ( rustdoc. trim ( ) ) ) ,
717
720
cargo : Path :: new ( cargo. trim ( ) ) ,
718
721
is_nightly : false ,
719
- triple : "x86_64-unknown-linux-gnu" ,
722
+ triple : & target_triple ,
720
723
} ,
721
724
& benchmarks,
722
725
Some ( 3 ) ,
@@ -747,7 +750,7 @@ fn main_result() -> anyhow::Result<i32> {
747
750
rustc : & rustc,
748
751
rustdoc : rustdoc. as_deref ( ) ,
749
752
cargo : & cargo,
750
- triple : "x86_64-unknown-linux-gnu" , // XXX: technically not necessarily true
753
+ triple : & target_triple ,
751
754
is_nightly : true ,
752
755
} ;
753
756
@@ -787,7 +790,7 @@ fn main_result() -> anyhow::Result<i32> {
787
790
let last_sha = String :: from_utf8 ( last_sha. stdout ) . expect ( "utf8" ) ;
788
791
let last_sha = last_sha. split_whitespace ( ) . next ( ) . expect ( & last_sha) ;
789
792
let commit = get_commit_or_fake_it ( & last_sha) . expect ( "success" ) ;
790
- let mut sysroot = Sysroot :: install ( commit. sha . to_string ( ) , "x86_64-unknown-linux-gnu" ) ?;
793
+ let mut sysroot = Sysroot :: install ( commit. sha . to_string ( ) , & target_triple ) ?;
791
794
sysroot. preserve ( ) ; // don't delete it
792
795
793
796
// Print the directory containing the toolchain.
0 commit comments