Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Imlay committed Feb 20, 2020
1 parent 6b17330 commit 2599771
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/librustc_target/spec/aarch64_apple_ios.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::apple_sdk_base::{opts, Arch, AppleOS};
use super::apple_sdk_base::{opts, AppleOS, Arch};
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};

pub fn target() -> TargetResult {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_target/spec/aarch64_apple_tvos.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::apple_sdk_base::{opts, Arch, AppleOS};
use super::apple_sdk_base::{opts, AppleOS, Arch};
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};

pub fn target() -> TargetResult {
Expand Down
20 changes: 9 additions & 11 deletions src/librustc_target/spec/apple_sdk_base.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

use crate::spec::{LinkArgs, LinkerFlavor, TargetOptions};
use std::env;
use std::io;
Expand Down Expand Up @@ -102,14 +101,14 @@ pub fn get_sdk_root(sdk_name: &str) -> Result<String, String> {

fn build_pre_link_args(arch: Arch, os: AppleOS) -> Result<LinkArgs, String> {
let sdk_name = match (arch, os) {
(Arm64, AppleOS::tvOS) => "appletvos",
(X86_64, AppleOS::tvOS) => "appletvsimulator",
(Armv7, AppleOS::iOS) => "iphoneos",
(Armv7s, AppleOS::iOS) => "iphoneos",
(Arm64, AppleOS::iOS) => "iphoneos",
(I386, AppleOS::iOS) => "iphonesimulator",
(X86_64, AppleOS::iOS) => "iphonesimulator",
(X86_64_macabi, AppleOS::iOS) => "macosx10.15",
(Arm64, AppleOS::tvOS) => "appletvos",
(X86_64, AppleOS::tvOS) => "appletvsimulator",
(Armv7, AppleOS::iOS) => "iphoneos",
(Armv7s, AppleOS::iOS) => "iphoneos",
(Arm64, AppleOS::iOS) => "iphoneos",
(I386, AppleOS::iOS) => "iphonesimulator",
(X86_64, AppleOS::iOS) => "iphonesimulator",
(X86_64_macabi, AppleOS::iOS) => "macosx10.15",
_ => unreachable!(),
};

Expand Down Expand Up @@ -145,11 +144,10 @@ fn target_cpu(arch: Arch) -> String {
.to_string()
}


fn link_env_remove(arch: Arch) -> Vec<String> {
match arch {
Armv7 | Armv7s | Arm64 | I386 | X86_64 => vec!["MACOSX_DEPLOYMENT_TARGET".to_string()],
X86_64_macabi => vec![ "IPHONEOS_DEPLOYMENT_TARGET".to_string() ,],
X86_64_macabi => vec!["IPHONEOS_DEPLOYMENT_TARGET".to_string()],
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/librustc_target/spec/armv7_apple_ios.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::apple_sdk_base::{opts, Arch, AppleOS};
use super::apple_sdk_base::{opts, AppleOS, Arch};
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};

pub fn target() -> TargetResult {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_target/spec/armv7s_apple_ios.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::apple_sdk_base::{opts, Arch, AppleOS};
use super::apple_sdk_base::{opts, AppleOS, Arch};
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};

pub fn target() -> TargetResult {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_target/spec/i386_apple_ios.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::apple_sdk_base::{opts, Arch, AppleOS};
use super::apple_sdk_base::{opts, AppleOS, Arch};
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};

pub fn target() -> TargetResult {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_target/spec/x86_64_apple_ios.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::apple_sdk_base::{opts, Arch, AppleOS};
use super::apple_sdk_base::{opts, AppleOS, Arch};
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};

pub fn target() -> TargetResult {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_target/spec/x86_64_apple_ios_macabi.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::apple_sdk_base::{opts, Arch, AppleOS};
use super::apple_sdk_base::{opts, AppleOS, Arch};
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};

pub fn target() -> TargetResult {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_target/spec/x86_64_apple_tvos.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::apple_sdk_base::{opts, Arch, AppleOS};
use super::apple_sdk_base::{opts, AppleOS, Arch};
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};

pub fn target() -> TargetResult {
Expand Down

0 comments on commit 2599771

Please sign in to comment.