File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,8 @@ fn init_late_loggers() {
100
100
}
101
101
}
102
102
103
+ /// Returns the "default sysroot" that Miri will use if no `--sysroot` flag is set.
104
+ /// Should be a compile-time constant.
103
105
fn compile_time_sysroot ( ) -> String {
104
106
// Taken from PR <https://github.com/Manishearth/rust-clippy/pull/911>.
105
107
let home = option_env ! ( "RUSTUP_HOME" ) . or ( option_env ! ( "MULTIRUST_HOME" ) ) ;
@@ -168,8 +170,7 @@ fn main() {
168
170
if !rustc_args. contains ( & sysroot_flag) {
169
171
// We need to *always* set a --sysroot, as the "default" rustc uses is
170
172
// somewhere in the directory miri was built in.
171
- // If neither MIRI_SYSROOT nor --sysroot are given, fall back to env
172
- // vars that are read at *compile-time*.
173
+ // If no --sysroot is given, fall back to env vars that are read at *compile-time*.
173
174
rustc_args. push ( sysroot_flag) ;
174
175
rustc_args. push ( compile_time_sysroot ( ) ) ;
175
176
}
You can’t perform that action at this time.
0 commit comments