]>
Commit | Line | Data |
---|---|---|
a7813a04 | 1 | // Copyright 2012-2016 The Rust Project Developers. See the COPYRIGHT |
223e47cc LB |
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. | |
2c00a5a8 XL |
10 | |
11 | // no-system-llvm -- needs MCSubtargetInfo::getFeatureTable() | |
12 | // ignore-cloudabi no std::env | |
223e47cc | 13 | |
a7813a04 | 14 | #![feature(cfg_target_feature)] |
1a4d82fc | 15 | |
32a655c1 SL |
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 | } | |
a7813a04 XL |
28 | if cfg!(any(target_arch = "x86", target_arch = "x86_64")) { |
29 | assert!(cfg!(target_feature = "sse2"), | |
32a655c1 | 30 | "SSE2 was not detected as available on an x86 platform"); |
223e47cc LB |
31 | } |
32 | } |