File tree Expand file tree Collapse file tree 3 files changed +15
-5
lines changed
branches/try2/src/librustc/back Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
5
5
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
- refs/heads/try2: 6a43af3f84ef97d4d0e5b55c5336a4256bd1ebb7
8
+ refs/heads/try2: 2290dbb8cc9c72e1b6b64b7325430f031e2cd87b
9
9
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
10
10
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
11
11
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Original file line number Diff line number Diff line change @@ -166,6 +166,15 @@ impl<'a> Archive<'a> {
166
166
if filename. contains ( ".SYMDEF" ) { continue }
167
167
168
168
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
+ } ;
169
178
let new_filename = file. with_filename ( filename) ;
170
179
try!( fs:: rename ( file, & new_filename) ) ;
171
180
inputs. push ( new_filename) ;
Original file line number Diff line number Diff line change @@ -958,10 +958,11 @@ fn link_rlib<'a>(sess: &'a Session,
958
958
959
959
// For LTO purposes, the bytecode of this library is also inserted
960
960
// 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.
965
966
let bc = obj_filename. with_extension ( "bc" ) ;
966
967
let bc_deflated = obj_filename. with_extension ( "bytecode.deflate" ) ;
967
968
match fs:: File :: open ( & bc) . read_to_end ( ) . and_then ( |data| {
You can’t perform that action at this time.
0 commit comments