@@ -31,21 +31,21 @@ pub trait Environment {
31
31
self . build_artifacts ( )
32
32
. join ( "stage0" )
33
33
. join ( "bin" )
34
- . join ( format ! ( "cargo{}" , self . executable_extension( ) ) )
34
+ . join ( format ! ( "cargo{}" , executable_extension( ) ) )
35
35
}
36
36
37
37
fn rustc_stage_0 ( & self ) -> Utf8PathBuf {
38
38
self . build_artifacts ( )
39
39
. join ( "stage0" )
40
40
. join ( "bin" )
41
- . join ( format ! ( "rustc{}" , self . executable_extension( ) ) )
41
+ . join ( format ! ( "rustc{}" , executable_extension( ) ) )
42
42
}
43
43
44
44
fn rustc_stage_2 ( & self ) -> Utf8PathBuf {
45
45
self . build_artifacts ( )
46
46
. join ( "stage2" )
47
47
. join ( "bin" )
48
- . join ( format ! ( "rustc{}" , self . executable_extension( ) ) )
48
+ . join ( format ! ( "rustc{}" , executable_extension( ) ) )
49
49
}
50
50
51
51
/// Path to the built rustc-perf benchmark suite.
@@ -60,9 +60,6 @@ pub trait Environment {
60
60
61
61
fn supports_shared_llvm ( & self ) -> bool ;
62
62
63
- /// What is the extension of binary executables in this environment?
64
- fn executable_extension ( & self ) -> & ' static str ;
65
-
66
63
/// List of test paths that should be skipped when testing the optimized artifacts.
67
64
fn skipped_tests ( & self ) -> & ' static [ & ' static str ] ;
68
65
}
@@ -73,3 +70,14 @@ pub fn create_environment(target_triple: String) -> Box<dyn Environment> {
73
70
#[ cfg( target_family = "windows" ) ]
74
71
return Box :: new ( windows:: WindowsEnvironment :: new ( target_triple) ) ;
75
72
}
73
+
74
+ /// What is the extension of binary executables on this platform?
75
+ #[ cfg( target_family = "unix" ) ]
76
+ pub fn executable_extension ( ) -> & ' static str {
77
+ ""
78
+ }
79
+
80
+ #[ cfg( target_family = "windows" ) ]
81
+ pub fn executable_extension ( ) -> & ' static str {
82
+ ".exe"
83
+ }
0 commit comments