@@ -165,12 +165,12 @@ pub fn std_cargo(builder: &Builder,
165
165
let features = builder. std_features ( ) ;
166
166
167
167
if compiler. stage != 0 && builder. config . sanitizers {
168
- // This variable is used by the sanitizer runtime crates, e.g.
169
- // rustc_lsan, to build the sanitizer runtime from C code
168
+ // This variable is used by the sanitizer runtime crates, e.g.,
169
+ // ` rustc_lsan` , to build the sanitizer runtime from C code
170
170
// When this variable is missing, those crates won't compile the C code,
171
171
// so we don't set this variable during stage0 where llvm-config is
172
172
// missing
173
- // We also only build the runtimes when --enable-sanitizers (or its
173
+ // We also only build the runtimes when ` --enable-sanitizers` (or its
174
174
// config.toml equivalent) is used
175
175
let llvm_config = builder. ensure ( native:: Llvm {
176
176
target : builder. config . build ,
@@ -895,7 +895,7 @@ impl Step for Assemble {
895
895
run. never ( )
896
896
}
897
897
898
- /// Prepare a new compiler from the artifacts in `stage`
898
+ /// Prepares a new compiler from the artifacts in `stage`
899
899
///
900
900
/// This will assemble a compiler in `build/$host/stage$stage`. The compiler
901
901
/// must have been previously produced by the `stage - 1` builder.build
@@ -921,17 +921,17 @@ impl Step for Assemble {
921
921
// produce some other architecture compiler we need to start from
922
922
// `build` to get there.
923
923
//
924
- // FIXME: Perhaps we should download those libraries?
925
- // It would make builds faster.. .
924
+ // FIXME: perhaps we should download those libraries?
925
+ // It would certainly make builds faster.
926
926
//
927
- // FIXME: It may be faster if we build just a stage 1 compiler and then
928
- // use that to bootstrap this compiler forward.
927
+ // FIXME: it may be faster if we build just a stage 1 compiler and then
928
+ // use that to bootstrap this compiler forward.
929
929
let build_compiler =
930
930
builder. compiler ( target_compiler. stage - 1 , builder. config . build ) ;
931
931
932
932
// Build the libraries for this compiler to link to (i.e., the libraries
933
933
// it uses at runtime). NOTE: Crates the target compiler compiles don't
934
- // link to these. (FIXME: Is that correct? It seems to be correct most
934
+ // link to these. (FIXME: is that correct? It seems to be correct most
935
935
// of the time but I think we do link to these for stage2/bin compilers
936
936
// when not performing a full bootstrap).
937
937
builder. ensure ( Rustc {
@@ -958,7 +958,7 @@ impl Step for Assemble {
958
958
let host = target_compiler. host ;
959
959
builder. info ( & format ! ( "Assembling stage{} compiler ({})" , stage, host) ) ;
960
960
961
- // Link in all dylibs to the libdir
961
+ // Link in all dylibs to the libdir.
962
962
let sysroot = builder. sysroot ( target_compiler) ;
963
963
let sysroot_libdir = sysroot. join ( libdir ( & * host) ) ;
964
964
t ! ( fs:: create_dir_all( & sysroot_libdir) ) ;
@@ -979,7 +979,7 @@ impl Step for Assemble {
979
979
980
980
dist:: maybe_install_llvm_dylib ( builder, target_compiler. host , & sysroot) ;
981
981
982
- // Link the compiler binary itself into place
982
+ // Link the compiler binary itself into place.
983
983
let out_dir = builder. cargo_out ( build_compiler, Mode :: Rustc , host) ;
984
984
let rustc = out_dir. join ( exe ( "rustc_binary" , & * host) ) ;
985
985
let bindir = sysroot. join ( "bin" ) ;
@@ -992,7 +992,7 @@ impl Step for Assemble {
992
992
}
993
993
}
994
994
995
- /// Link some files into a rustc sysroot.
995
+ /// Links some files into a rustc sysroot.
996
996
///
997
997
/// For a particular stage this will link the file listed in `stamp` into the
998
998
/// `sysroot_dst` provided.
@@ -1013,16 +1013,16 @@ pub fn run_cargo(builder: &Builder,
1013
1013
return Vec :: new ( ) ;
1014
1014
}
1015
1015
1016
- // `target_root_dir` looks like $dir/$target/release
1016
+ // `target_root_dir` looks like ` $dir/$target/release`.
1017
1017
let target_root_dir = stamp. parent ( ) . unwrap ( ) ;
1018
- // `target_deps_dir` looks like $dir/$target/release/deps
1018
+ // `target_deps_dir` looks like ` $dir/$target/release/deps`.
1019
1019
let target_deps_dir = target_root_dir. join ( "deps" ) ;
1020
- // `host_root_dir` looks like $dir/release
1020
+ // `host_root_dir` looks like ` $dir/release`.
1021
1021
let host_root_dir = target_root_dir. parent ( ) . unwrap ( ) // chop off `release`
1022
1022
. parent ( ) . unwrap ( ) // chop off `$target`
1023
1023
. join ( target_root_dir. file_name ( ) . unwrap ( ) ) ;
1024
1024
1025
- // Spawn Cargo slurping up its JSON output. We'll start building up the
1025
+ // Spawn Cargo, collecting its JSON output. We'll start building up the
1026
1026
// `deps` array of all files it generated along with a `toplevel` array of
1027
1027
// files we need to probe for later.
1028
1028
let mut deps = Vec :: new ( ) ;
@@ -1033,7 +1033,7 @@ pub fn run_cargo(builder: &Builder,
1033
1033
_ => return ,
1034
1034
} ;
1035
1035
for filename in filenames {
1036
- // Skip files like executables
1036
+ // Skip files like executables.
1037
1037
if !filename. ends_with ( ".rlib" ) &&
1038
1038
!filename. ends_with ( ".lib" ) &&
1039
1039
!is_dylib ( & filename) &&
@@ -1056,7 +1056,7 @@ pub fn run_cargo(builder: &Builder,
1056
1056
continue ;
1057
1057
}
1058
1058
1059
- // Otherwise this was a "top level artifact" which right now doesn't
1059
+ // Otherwise, this was a "top level artifact" which right now doesn't
1060
1060
// have a hash in the name, but there's a version of this file in
1061
1061
// the `deps` folder which *does* have a hash in the name. That's
1062
1062
// the one we'll want to we'll probe for it later.
@@ -1080,7 +1080,7 @@ pub fn run_cargo(builder: &Builder,
1080
1080
exit ( 1 ) ;
1081
1081
}
1082
1082
1083
- // Ok now we need to actually find all the files listed in `toplevel`. We've
1083
+ // Now we need to actually find all the files listed in `toplevel`. We've
1084
1084
// got a list of prefix/extensions and we basically just need to find the
1085
1085
// most recent file in the `deps` folder corresponding to each one.
1086
1086
let contents = t ! ( target_deps_dir. read_dir( ) )
@@ -1168,15 +1168,15 @@ pub fn stream_cargo(
1168
1168
Err ( e) => panic ! ( "failed to execute command: {:?}\n error: {}" , cargo, e) ,
1169
1169
} ;
1170
1170
1171
- // Spawn Cargo slurping up its JSON output. We'll start building up the
1171
+ // Spawn Cargo, collecting its JSON output. We'll start building up the
1172
1172
// `deps` array of all files it generated along with a `toplevel` array of
1173
1173
// files we need to probe for later.
1174
1174
let stdout = BufReader :: new ( child. stdout . take ( ) . unwrap ( ) ) ;
1175
1175
for line in stdout. lines ( ) {
1176
1176
let line = t ! ( line) ;
1177
1177
match serde_json:: from_str :: < CargoMessage > ( & line) {
1178
1178
Ok ( msg) => cb ( msg) ,
1179
- // If this was informational, just print it out and continue
1179
+ // If this was informational, just print it out and continue.
1180
1180
Err ( _) => println ! ( "{}" , line)
1181
1181
}
1182
1182
}
0 commit comments