]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/sse2.rs
Auto merge of #47200 - BurntPizza:query-snatp, r=nikomatsakis
[rust.git] / src / test / run-pass / sse2.rs
1 // Copyright 2012-2016 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 // min-llvm-version 4.0
12 // ignore-cloudabi no std::env
13
14 #![feature(cfg_target_feature)]
15
16 use std::env;
17
18 fn main() {
19     match env::var("TARGET") {
20         Ok(s) => {
21             // Skip this tests on i586-unknown-linux-gnu where sse2 is disabled
22             if s.contains("i586") {
23                 return
24             }
25         }
26         Err(_) => return,
27     }
28     if cfg!(any(target_arch = "x86", target_arch = "x86_64")) {
29         assert!(cfg!(target_feature = "sse2"),
30                 "SSE2 was not detected as available on an x86 platform");
31     }
32 }