Skip to content

Commit

Permalink
Add more canonicalisations for OS_TABLE and ARCH_TABLE
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed Mar 20, 2018
1 parent ca476dd commit eae6d51
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions src/tools/compiletest/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,43 +14,59 @@ use common::Config;
/// Conversion table from triple OS name to Rust SYSNAME
const OS_TABLE: &'static [(&'static str, &'static str)] = &[
("android", "android"),
("androideabi", "android"),
("bitrig", "bitrig"),
("cloudabi", "cloudabi"),
("darwin", "macos"),
("dragonfly", "dragonfly"),
("emscripten", "emscripten"),
("freebsd", "freebsd"),
("fuchsia", "fuchsia"),
("haiku", "haiku"),
("ios", "ios"),
("l4re", "l4re"),
("linux", "linux"),
("mingw32", "windows"),
("netbsd", "netbsd"),
("openbsd", "openbsd"),
("redox", "redox"),
("solaris", "solaris"),
("win32", "windows"),
("windows", "windows"),
("solaris", "solaris"),
("emscripten", "emscripten"),
];

const ARCH_TABLE: &'static [(&'static str, &'static str)] = &[
("aarch64", "aarch64"),
("amd64", "x86_64"),
("arm", "arm"),
("arm64", "aarch64"),
("armv4t", "arm"),
("armv5te", "arm"),
("armv7", "arm"),
("armv7s", "arm"),
("asmjs", "asmjs"),
("hexagon", "hexagon"),
("i386", "x86"),
("i586", "x86"),
("i686", "x86"),
("mips64", "mips64"),
("mips", "mips"),
("mips64", "mips64"),
("mips64el", "mips64"),
("mipsel", "mips"),
("msp430", "msp430"),
("powerpc", "powerpc"),
("powerpc64", "powerpc64"),
("powerpc64le", "powerpc64"),
("s390x", "s390x"),
("sparc", "sparc"),
("sparc64", "sparc64"),
("sparcv9", "sparc64"),
("thumbv6m", "thumb"),
("thumbv7em", "thumb"),
("thumbv7m", "thumb"),
("wasm32", "wasm32"),
("x86_64", "x86_64"),
("xcore", "xcore"),
("asmjs", "asmjs"),
("wasm32", "wasm32"),
];

pub fn matches_os(triple: &str, name: &str) -> bool {
Expand Down

0 comments on commit eae6d51

Please sign in to comment.