rustc: Use libnative for the compiler
The compiler itself doesn't necessarily need any features of green threading such as spawning tasks and lots of I/O, so libnative is slightly more appropriate for rustc to use itself. This should also help the rusti bot which is currently incompatible with libuv.
This commit is contained in:
parent
cd9010c77e
commit
40ab198356
|
@ -81,8 +81,8 @@ DEPS_test := std extra collections getopts serialize term
|
||||||
DEPS_time := std serialize
|
DEPS_time := std serialize
|
||||||
|
|
||||||
TOOL_DEPS_compiletest := test green rustuv getopts
|
TOOL_DEPS_compiletest := test green rustuv getopts
|
||||||
TOOL_DEPS_rustdoc := rustdoc green rustuv
|
TOOL_DEPS_rustdoc := rustdoc native
|
||||||
TOOL_DEPS_rustc := rustc green rustuv
|
TOOL_DEPS_rustc := rustc native
|
||||||
TOOL_SOURCE_compiletest := $(S)src/compiletest/compiletest.rs
|
TOOL_SOURCE_compiletest := $(S)src/compiletest/compiletest.rs
|
||||||
TOOL_SOURCE_rustdoc := $(S)src/driver/driver.rs
|
TOOL_SOURCE_rustdoc := $(S)src/driver/driver.rs
|
||||||
TOOL_SOURCE_rustc := $(S)src/driver/driver.rs
|
TOOL_SOURCE_rustc := $(S)src/driver/driver.rs
|
||||||
|
|
|
@ -8,10 +8,15 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#[no_uv];
|
||||||
|
|
||||||
#[cfg(rustdoc)]
|
#[cfg(rustdoc)]
|
||||||
extern crate this = "rustdoc";
|
extern crate this = "rustdoc";
|
||||||
|
|
||||||
#[cfg(rustc)]
|
#[cfg(rustc)]
|
||||||
extern crate this = "rustc";
|
extern crate this = "rustc";
|
||||||
|
|
||||||
fn main() { this::main() }
|
extern crate native;
|
||||||
|
|
||||||
|
#[start]
|
||||||
|
fn start(argc: int, argv: **u8) -> int { native::start(argc, argv, this::main) }
|
||||||
|
|
|
@ -433,6 +433,7 @@ pub fn readlink(p: &CString) -> IoResult<Path> {
|
||||||
libc::VOLUME_NAME_DOS)
|
libc::VOLUME_NAME_DOS)
|
||||||
});
|
});
|
||||||
let ret = match ret {
|
let ret = match ret {
|
||||||
|
Some(ref s) if s.starts_with(r"\\?\") => Ok(Path::new(s.slice_from(4))),
|
||||||
Some(s) => Ok(Path::new(s)),
|
Some(s) => Ok(Path::new(s)),
|
||||||
None => Err(super::last_error()),
|
None => Err(super::last_error()),
|
||||||
};
|
};
|
||||||
|
|
|
@ -1217,6 +1217,6 @@ mod test {
|
||||||
|
|
||||||
check!(File::create(&tmpdir.join("test")).write(bytes));
|
check!(File::create(&tmpdir.join("test")).write(bytes));
|
||||||
let actual = check!(File::open(&tmpdir.join("test")).read_to_end());
|
let actual = check!(File::open(&tmpdir.join("test")).read_to_end());
|
||||||
assert!(actual.as_slice == bytes);
|
assert!(actual.as_slice() == bytes);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue