Skip to content

Commit 72a1ef3

Browse files
committed
---
yaml --- r: 118263 b: refs/heads/try c: 2290dbb h: refs/heads/master i: 118261: 8900a64 118259: 2376a27 118255: f95d972 v: v3
1 parent 714596a commit 72a1ef3

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 3770c42a4959cbabc73da52abc7e3db96657974e
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: d6736a1440d42f6af967a8a20ab8d73522112b72
5-
refs/heads/try: 6a43af3f84ef97d4d0e5b55c5336a4256bd1ebb7
5+
refs/heads/try: 2290dbb8cc9c72e1b6b64b7325430f031e2cd87b
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/librustc/back/archive.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,15 @@ impl<'a> Archive<'a> {
166166
if filename.contains(".SYMDEF") { continue }
167167

168168
let filename = format!("r-{}-{}", name, filename);
169+
// LLDB (as mentioned in back::link) crashes on filenames of exactly
170+
// 16 bytes in length. If we're including an object file with
171+
// exactly 16-bytes of characters, give it some prefix so that it's
172+
// not 16 bytes.
173+
let filename = if filename.len() == 16 {
174+
format!("lldb-fix-{}", filename)
175+
} else {
176+
filename
177+
};
169178
let new_filename = file.with_filename(filename);
170179
try!(fs::rename(file, &new_filename));
171180
inputs.push(new_filename);

branches/try/src/librustc/back/link.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -958,10 +958,11 @@ fn link_rlib<'a>(sess: &'a Session,
958958

959959
// For LTO purposes, the bytecode of this library is also inserted
960960
// into the archive.
961-
// Note that we make sure that the bytecode filename in the archive is always at least
962-
// 16 bytes long by adding a 16 byte extension to it. This is to work around a bug in
963-
// LLDB that would cause it to crash if the name of a file in an archive was exactly
964-
// 16 bytes.
961+
//
962+
// Note that we make sure that the bytecode filename in the archive
963+
// is never exactly 16 bytes long by adding a 16 byte extension to
964+
// it. This is to work around a bug in LLDB that would cause it to
965+
// crash if the name of a file in an archive was exactly 16 bytes.
965966
let bc = obj_filename.with_extension("bc");
966967
let bc_deflated = obj_filename.with_extension("bytecode.deflate");
967968
match fs::File::open(&bc).read_to_end().and_then(|data| {

0 commit comments

Comments
 (0)