Skip to content

Commit 3def2a8

Browse files
committed
---
yaml --- r: 135895 b: refs/heads/try c: 2acd6b7 h: refs/heads/master i: 135893: 8dd653d 135891: 9ec9e9b 135887: 28c2604 v: v3
1 parent ade6436 commit 3def2a8

File tree

2 files changed

+2
-42
lines changed

2 files changed

+2
-42
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: 8794107f74682607f368776cc8b78820629778e6
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ae81c89f34f1ac2cdb596cf216612e94822a8466
5-
refs/heads/try: 3b3d7021e4a2bccace8816bb24eec33eac09c9f2
5+
refs/heads/try: 2acd6b77413817d89a067603fe54fdc9baa66df0
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/librustdoc/lib.rs

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -89,47 +89,7 @@ local_data_key!(pub analysiskey: core::CrateAnalysis)
8989
type Output = (clean::Crate, Vec<plugins::PluginJson> );
9090

9191
pub fn main() {
92-
// Why run rustdoc in a separate task? That's a good question!
93-
//
94-
// We first begin our adventure at the ancient commit of e7c4fb69. In this
95-
// commit it was discovered that the stack limit frobbing on windows ended
96-
// up causing some syscalls to fail. This was worked around manually in the
97-
// relevant location.
98-
//
99-
// Our journey now continues with #13259 where it was discovered that this
100-
// stack limit frobbing has the ability to affect nearly any syscall. Note
101-
// that the key idea here is that there is currently no knowledge as to why
102-
// this is happening or how to preserve it, fun times!
103-
//
104-
// Now we continue along to #16275 where it was discovered that --test on
105-
// windows didn't work at all! Yet curiously rustdoc worked without --test.
106-
// The exact reason that #16275 cropped up is that during the expansion
107-
// phase the compiler attempted to open libstd to read out its macros. This
108-
// invoked the LLVMRustOpenArchive shim which in turned went to LLVM to go
109-
// open a file and read it. Lo and behold this function returned an error!
110-
// It was then discovered that when the same fix mentioned in #13259 was
111-
// applied, the error went away. The plot thickens!
112-
//
113-
// Remember that rustdoc works without --test, which raises the question of
114-
// how because the --test and non --test paths are almost identical. The
115-
// first thing both paths do is parse and expand a crate! It turns out that
116-
// the difference is that --test runs on the *main task* while the normal
117-
// path runs in subtask. It turns out that running --test in a sub task also
118-
// fixes the problem!
119-
//
120-
// So, in summary, it is unknown why this is necessary, what it is
121-
// preventing, or what the actual bug is. In the meantime, this allows
122-
// --test to work on windows, which seems good, right? Fun times.
123-
let (tx, rx) = channel();
124-
spawn(proc() {
125-
std::os::set_exit_status(main_args(std::os::args().as_slice()));
126-
tx.send(());
127-
});
128-
129-
// If the task failed, set an error'd exit status
130-
if rx.recv_opt().is_err() {
131-
std::os::set_exit_status(std::rt::DEFAULT_ERROR_CODE);
132-
}
92+
std::os::set_exit_status(main_args(std::os::args().as_slice()));
13393
}
13494

13595
pub fn opts() -> Vec<getopts::OptGroup> {

0 commit comments

Comments
 (0)