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:
Alex Crichton 2014-02-26 13:03:40 -08:00
parent cd9010c77e
commit 40ab198356
4 changed files with 10 additions and 4 deletions

View File

@ -81,8 +81,8 @@ DEPS_test := std extra collections getopts serialize term
DEPS_time := std serialize
TOOL_DEPS_compiletest := test green rustuv getopts
TOOL_DEPS_rustdoc := rustdoc green rustuv
TOOL_DEPS_rustc := rustc green rustuv
TOOL_DEPS_rustdoc := rustdoc native
TOOL_DEPS_rustc := rustc native
TOOL_SOURCE_compiletest := $(S)src/compiletest/compiletest.rs
TOOL_SOURCE_rustdoc := $(S)src/driver/driver.rs
TOOL_SOURCE_rustc := $(S)src/driver/driver.rs

View File

@ -8,10 +8,15 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[no_uv];
#[cfg(rustdoc)]
extern crate this = "rustdoc";
#[cfg(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) }

View File

@ -433,6 +433,7 @@ pub fn readlink(p: &CString) -> IoResult<Path> {
libc::VOLUME_NAME_DOS)
});
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)),
None => Err(super::last_error()),
};

View File

@ -1217,6 +1217,6 @@ mod test {
check!(File::create(&tmpdir.join("test")).write(bytes));
let actual = check!(File::open(&tmpdir.join("test")).read_to_end());
assert!(actual.as_slice == bytes);
assert!(actual.as_slice() == bytes);
})
}