Skip to content

Commit 53733c8

Browse files
committed
auto merge of #11633 : chromatic/rust/master, r=alexcrichton
2 parents 6d58c70 + 0578c15 commit 53733c8

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

src/librustc/back/archive.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -133,12 +133,12 @@ impl Archive {
133133
run_ar(self.sess, "d", None, [&self.dst, &Path::new(file)]);
134134
}
135135

136-
/// Update all symbols in the archive (runs 'ar s' over it)
136+
/// Updates all symbols in the archive (runs 'ar s' over it)
137137
pub fn update_symbols(&mut self) {
138138
run_ar(self.sess, "s", None, [&self.dst]);
139139
}
140140

141-
/// List all files in an archive
141+
/// Lists all files in an archive
142142
pub fn files(&self) -> ~[~str] {
143143
let output = run_ar(self.sess, "t", None, [&self.dst]);
144144
str::from_utf8(output.output).lines().map(|s| s.to_owned()).collect()
@@ -182,7 +182,7 @@ impl Archive {
182182
let (osprefix, osext) = match self.sess.targ_cfg.os {
183183
abi::OsWin32 => ("", "lib"), _ => ("lib", "a"),
184184
};
185-
// On windows, static libraries sometimes show up as libfoo.a and other
185+
// On Windows, static libraries sometimes show up as libfoo.a and other
186186
// times show up as foo.lib
187187
let oslibname = format!("{}{}.{}", osprefix, name, osext);
188188
let unixlibname = format!("lib{}.a", name);
@@ -228,7 +228,7 @@ impl ArchiveRO {
228228
}
229229
}
230230

231-
/// Read a file in the archive
231+
/// Reads a file in the archive
232232
pub fn read<'a>(&'a self, file: &str) -> Option<&'a [u8]> {
233233
unsafe {
234234
let mut size = 0 as libc::size_t;

src/librustc/back/link.rs

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -183,7 +183,7 @@ pub mod write {
183183
llvm::LLVMDisposePassManager(mpm);
184184

185185
// Emit the bytecode if we're either saving our temporaries or
186-
// emitting an rlib. Whenever an rlib is create, the bytecode is
186+
// emitting an rlib. Whenever an rlib is created, the bytecode is
187187
// inserted into the archive in order to allow LTO against it.
188188
let outputs = sess.outputs.borrow();
189189
if sess.opts.save_temps ||
@@ -314,7 +314,7 @@ pub mod write {
314314
use std::unstable::mutex::{Once, ONCE_INIT};
315315
static mut INIT: Once = ONCE_INIT;
316316

317-
// Copy what clan does by turning on loop vectorization at O2 and
317+
// Copy what clang does by turning on loop vectorization at O2 and
318318
// slp vectorization at O3
319319
let vectorize_loop = !sess.no_vectorize_loops() &&
320320
(sess.opts.optimize == session::Default ||
@@ -347,7 +347,7 @@ pub mod write {
347347
// Only initialize the platforms supported by Rust here, because
348348
// using --llvm-root will have multiple platforms that rustllvm
349349
// doesn't actually link to and it's pointless to put target info
350-
// into the registry that Rust can not generate machine code for.
350+
// into the registry that Rust cannot generate machine code for.
351351
llvm::LLVMInitializeX86TargetInfo();
352352
llvm::LLVMInitializeX86Target();
353353
llvm::LLVMInitializeX86TargetMC();
@@ -381,7 +381,7 @@ pub mod write {
381381
let builder = llvm::LLVMPassManagerBuilderCreate();
382382
match opt {
383383
lib::llvm::CodeGenLevelNone => {
384-
// Don't add lifetime intrinsics add O0
384+
// Don't add lifetime intrinsics at O0
385385
llvm::LLVMRustAddAlwaysInlinePass(builder, false);
386386
}
387387
lib::llvm::CodeGenLevelLess => {
@@ -591,7 +591,7 @@ pub fn mangle(sess: Session, ss: ast_map::Path,
591591
//
592592
// It turns out that on OSX you can actually have arbitrary symbols in
593593
// function names (at least when given to LLVM), but this is not possible
594-
// when using unix's linker. Perhaps one day when we just a linker from LLVM
594+
// when using unix's linker. Perhaps one day when we just use a linker from LLVM
595595
// we won't need to do this name mangling. The problem with name mangling is
596596
// that it seriously limits the available characters. For example we can't
597597
// have things like @T or ~[T] in symbol names when one would theoretically
@@ -894,7 +894,7 @@ fn link_rlib(sess: Session,
894894
// determine the architecture of the archive in order to see whether its
895895
// linkable.
896896
//
897-
// The algorithm for this detections is: iterate over the files in the
897+
// The algorithm for this detection is: iterate over the files in the
898898
// archive. Skip magical SYMDEF names. Interpret the first file as an
899899
// object file. Read architecture from the object file.
900900
//
@@ -941,7 +941,7 @@ fn link_rlib(sess: Session,
941941
// Create a static archive
942942
//
943943
// This is essentially the same thing as an rlib, but it also involves adding
944-
// all of the upstream crates' objects into the the archive. This will slurp in
944+
// all of the upstream crates' objects into the archive. This will slurp in
945945
// all of the native libraries of upstream dependencies as well.
946946
//
947947
// Additionally, there's no way for us to link dynamic libraries, so we warn
@@ -1058,7 +1058,7 @@ fn link_args(sess: Session,
10581058
if sess.targ_cfg.os == abi::OsLinux {
10591059
// GNU-style linkers will use this to omit linking to libraries which
10601060
// don't actually fulfill any relocations, but only for libraries which
1061-
// follow this flag. Thus, use it before specifing libraries to link to.
1061+
// follow this flag. Thus, use it before specifying libraries to link to.
10621062
args.push(~"-Wl,--as-needed");
10631063

10641064
// GNU-style linkers support optimization with -O. --gc-sections
@@ -1074,7 +1074,7 @@ fn link_args(sess: Session,
10741074
if sess.targ_cfg.os == abi::OsWin32 {
10751075
// Make sure that we link to the dynamic libgcc, otherwise cross-module
10761076
// DWARF stack unwinding will not work.
1077-
// This behavior may be overriden by --link-args "-static-libgcc"
1077+
// This behavior may be overridden by --link-args "-static-libgcc"
10781078
args.push(~"-shared-libgcc");
10791079
}
10801080

@@ -1124,7 +1124,7 @@ fn link_args(sess: Session,
11241124

11251125
// # Native library linking
11261126
//
1127-
// User-supplied library search paths (-L on the cammand line) These are
1127+
// User-supplied library search paths (-L on the command line). These are
11281128
// the same paths used to find Rust crates, so some of them may have been
11291129
// added already by the previous crate linking code. This only allows them
11301130
// to be found at compile time so it is still entirely up to outside
@@ -1182,12 +1182,12 @@ fn add_upstream_rust_crates(args: &mut ~[~str], sess: Session,
11821182
if !dylib && !sess.prefer_dynamic() {
11831183
// With an executable, things get a little interesting. As a limitation
11841184
// of the current implementation, we require that everything must be
1185-
// static, or everything must be dynamic. The reasons for this are a
1185+
// static or everything must be dynamic. The reasons for this are a
11861186
// little subtle, but as with the above two cases, the goal is to
11871187
// prevent duplicate copies of the same library showing up. For example,
11881188
// a static immediate dependency might show up as an upstream dynamic
11891189
// dependency and we currently have no way of knowing that. We know that
1190-
// all dynamic libaries require dynamic dependencies (see above), so
1190+
// all dynamic libraries require dynamic dependencies (see above), so
11911191
// it's satisfactory to include either all static libraries or all
11921192
// dynamic libraries.
11931193
let crates = cstore.get_used_crates(cstore::RequireStatic);
@@ -1232,7 +1232,7 @@ fn add_upstream_rust_crates(args: &mut ~[~str], sess: Session,
12321232
}
12331233

12341234
// If we're performing LTO, then it should have been previously required
1235-
// that all upstream rust depenencies were available in an rlib format.
1235+
// that all upstream rust dependencies were available in an rlib format.
12361236
assert!(!sess.lto());
12371237

12381238
// This is a fallback of three different cases of linking:

0 commit comments

Comments
 (0)