diff options
| author | Vadim Chugunov <vadimcn@gmail.com> | 2014-08-10 21:26:45 -0700 |
|---|---|---|
| committer | Vadim Chugunov <vadimcn@gmail.com> | 2014-08-12 00:13:43 -0700 |
| commit | 3dfd12967aed35b7788f7d3c7460b76b76e70b60 (patch) | |
| tree | 6c28e2873f65ce3bc29edacd4a7e3f2bf4eb5725 /src/compiletest | |
| parent | 98332b1a06193c4f83fc2613f72273b50b77f2b3 (diff) | |
| download | rust-3dfd12967aed35b7788f7d3c7460b76b76e70b60.tar.gz rust-3dfd12967aed35b7788f7d3c7460b76b76e70b60.zip | |
Replace #[cfg(target_os = "win32")] with #[cfg(target_os = "windows")]
Diffstat (limited to 'src/compiletest')
| -rw-r--r-- | src/compiletest/runtest.rs | 15 | ||||
| -rw-r--r-- | src/compiletest/util.rs | 17 |
2 files changed, 21 insertions, 11 deletions
diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs index a9c7673d4dd..940b1f185cf 100644 --- a/src/compiletest/runtest.rs +++ b/src/compiletest/runtest.rs @@ -16,7 +16,8 @@ use header::TestProps; use header; use procsrv; use util::logv; -#[cfg(target_os = "win32")] +#[cfg(target_os = "windows")] +#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot use util; use std::io::File; @@ -816,7 +817,8 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> , format!("{}:{}:", testfile.display(), ee.line) }).collect::<Vec<String> >(); - #[cfg(target_os = "win32")] + #[cfg(target_os = "windows")] + #[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot fn to_lower( s : &str ) -> String { let i = s.chars(); let c : Vec<char> = i.map( |c| { @@ -829,7 +831,8 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> , String::from_chars(c.as_slice()) } - #[cfg(target_os = "win32")] + #[cfg(target_os = "windows")] + #[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot fn prefix_matches( line : &str, prefix : &str ) -> bool { to_lower(line).as_slice().starts_with(to_lower(prefix).as_slice()) } @@ -1246,14 +1249,16 @@ fn make_cmdline(_libpath: &str, prog: &str, args: &[String]) -> String { format!("{} {}", prog, args.connect(" ")) } -#[cfg(target_os = "win32")] +#[cfg(target_os = "windows")] +#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot fn make_cmdline(libpath: &str, prog: &str, args: &[String]) -> String { format!("{} {} {}", lib_path_cmd_prefix(libpath), prog, args.connect(" ")) } // Build the LD_LIBRARY_PATH variable as it would be seen on the command line // for diagnostic purposes -#[cfg(target_os = "win32")] +#[cfg(target_os = "windows")] +#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot fn lib_path_cmd_prefix(path: &str) -> String { format!("{}=\"{}\"", util::lib_path_env_var(), util::make_new_path(path)) } diff --git a/src/compiletest/util.rs b/src/compiletest/util.rs index 445e814a1eb..8947856e332 100644 --- a/src/compiletest/util.rs +++ b/src/compiletest/util.rs @@ -10,13 +10,15 @@ use common::Config; -#[cfg(target_os = "win32")] +#[cfg(target_os = "windows")] +#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot use std::os::getenv; /// Conversion table from triple OS name to Rust SYSNAME static OS_TABLE: &'static [(&'static str, &'static str)] = &[ - ("mingw32", "win32"), - ("win32", "win32"), + ("mingw32", "windows"), + ("win32", "windows"), + ("windows", "windows"), ("darwin", "macos"), ("android", "android"), ("linux", "linux"), @@ -33,7 +35,8 @@ pub fn get_os(triple: &str) -> &'static str { fail!("Cannot determine OS from triple"); } -#[cfg(target_os = "win32")] +#[cfg(target_os = "windows")] +#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot pub fn make_new_path(path: &str) -> String { // Windows just uses PATH as the library search path, so we have to @@ -46,10 +49,12 @@ pub fn make_new_path(path: &str) -> String { } } -#[cfg(target_os = "win32")] +#[cfg(target_os = "windows")] +#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot pub fn lib_path_env_var() -> &'static str { "PATH" } -#[cfg(target_os = "win32")] +#[cfg(target_os = "windows")] +#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot pub fn path_div() -> &'static str { ";" } pub fn logv(config: &Config, s: String) { |
