Skip to content

Commit e11a441

Browse files
michaelwoeristeralexcrichton
authored andcommitted
---
yaml --- r: 152329 b: refs/heads/try2 c: 6a43af3 h: refs/heads/master i: 152327: 77e442a v: v3
1 parent 6fb24f2 commit e11a441

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 735e518a815bd06fa99ea343351041ba22751fe4
8+
refs/heads/try2: 6a43af3f84ef97d4d0e5b55c5336a4256bd1ebb7
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ impl<'a> Archive<'a> {
109109
pub fn add_rlib(&mut self, rlib: &Path, name: &str,
110110
lto: bool) -> io::IoResult<()> {
111111
let object = format!("{}.o", name);
112-
let bytecode = format!("{}.bc.deflate", name);
112+
let bytecode = format!("{}.bytecode.deflate", name);
113113
let mut ignore = vec!(bytecode.as_slice(), METADATA_FILENAME);
114114
if lto {
115115
ignore.push(object.as_slice());

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,8 +958,12 @@ 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.
961965
let bc = obj_filename.with_extension("bc");
962-
let bc_deflated = obj_filename.with_extension("bc.deflate");
966+
let bc_deflated = obj_filename.with_extension("bytecode.deflate");
963967
match fs::File::open(&bc).read_to_end().and_then(|data| {
964968
fs::File::create(&bc_deflated)
965969
.write(match flate::deflate_bytes(data.as_slice()) {

branches/try2/src/librustc/back/lto.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ pub fn run(sess: &session::Session, llmod: ModuleRef,
5555
let archive = ArchiveRO::open(&path).expect("wanted an rlib");
5656
debug!("reading {}", name);
5757
let bc = time(sess.time_passes(),
58-
format!("read {}.bc.deflate", name).as_slice(),
58+
format!("read {}.bytecode.deflate", name).as_slice(),
5959
(),
6060
|_| {
61-
archive.read(format!("{}.bc.deflate",
61+
archive.read(format!("{}.bytecode.deflate",
6262
name).as_slice())
6363
});
6464
let bc = bc.expect("missing compressed bytecode in archive!");

0 commit comments

Comments
 (0)