Bootstrapped Rust » rustc-1.29.0.dyson.patch
| mrust/rustc-1.29.0-src/src/librustc_target/spec/mod.rs 2019-12-01 14:59:43.464760937 +0100 | ||
|---|---|---|
|
("armebv7r-none-eabihf", armebv7r_none_eabihf),
|
||
|
("x86_64-pc-solaris2.11", x86_64_pc_solaris),
|
||
|
("x86_64-sun-solaris", x86_64_sun_solaris),
|
||
|
("sparcv9-sun-solaris", sparcv9_sun_solaris),
|
||
| mrust/rustc-1.29.0-src/src/librustc_target/spec/x86_64_pc_solaris.rs 2019-12-01 15:02:06.222678682 +0100 | ||
|---|---|---|
|
// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
|
||
|
// file at the top-level directory of this distribution and at
|
||
|
// http://rust-lang.org/COPYRIGHT.
|
||
|
//
|
||
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||
|
// option. This file may not be copied, modified, or distributed
|
||
|
// except according to those terms.
|
||
|
use spec::{LinkerFlavor, Target, TargetResult};
|
||
|
pub fn target() -> TargetResult {
|
||
|
let mut base = super::solaris_base::opts();
|
||
|
base.pre_link_args.insert(LinkerFlavor::Gcc, vec!["-m64".to_string()]);
|
||
|
base.cpu = "x86-64".to_string();
|
||
|
base.max_atomic_width = Some(64);
|
||
|
base.stack_probes = true;
|
||
|
Ok(Target {
|
||
|
llvm_target: "x86_64-pc-solaris".to_string(),
|
||
|
target_endian: "little".to_string(),
|
||
|
target_pointer_width: "64".to_string(),
|
||
|
target_c_int_width: "32".to_string(),
|
||
|
data_layout: "e-m:e-i64:64-f80:128-n8:16:32:64-S128".to_string(),
|
||
|
arch: "x86_64".to_string(),
|
||
|
target_os: "solaris".to_string(),
|
||
|
target_env: "gnu".to_string(),
|
||
|
target_vendor: "unknown".to_string(),
|
||
|
linker_flavor: LinkerFlavor::Gcc,
|
||
|
options: base,
|
||
|
})
|
||
|
}
|
||
| mrust/rustc-1.29.0-src/src/vendor/regex/build.rs 2019-11-29 13:52:13.710194395 +0100 | ||
|---|---|---|
|
use std::process::Command;
|
||
|
fn main() {
|
||
|
let rustc = env::var_os("RUSTC").unwrap_or(OsString::from("rustc"));
|
||
|
let output = Command::new(&rustc)
|
||
|
.arg("--version")
|
||
|
.output()
|
||
|
.unwrap()
|
||
|
.stdout;
|
||
|
let version = String::from_utf8(output).unwrap();
|
||
|
enable_simd_optimizations(&version);
|
||
|
enable_simd_optimizations();
|
||
|
}
|
||
|
fn enable_simd_optimizations(version: &str) {
|
||
|
fn enable_simd_optimizations() {
|
||
|
// If we're using nightly Rust, then we can enable vector optimizations.
|
||
|
// Note that these aren't actually activated unless the `unstable` feature
|
||
|
// is enabled.
|
||
| ... | ... | |
|
if env::var_os("CARGO_CFG_REGEX_DISABLE_AUTO_OPTIMIZATIONS").is_some() {
|
||
|
return;
|
||
|
}
|
||
|
let parsed = match Version::parse(&version) {
|
||
|
Ok(parsed) => parsed,
|
||
|
Err(err) => {
|
||
|
eprintln!("failed to parse `rustc --version`: {}", err);
|
||
|
return;
|
||
|
}
|
||
|
};
|
||
|
let minimum = Version { major: 1, minor: 27, patch: 0 };
|
||
|
if version.contains("nightly") || parsed >= minimum {
|
||
|
println!("cargo:rustc-cfg=regex_runtime_teddy_ssse3");
|
||
|
println!("cargo:rustc-cfg=regex_runtime_teddy_avx2");
|
||
|
}
|
||
|
}
|
||
|
#[derive(Clone, Copy, Debug, Eq, PartialEq, PartialOrd, Ord)]
|
||
- « Previous
- 1
- 2
- Next »