From 8feb949ab540130063d1c57db7244024887c4ed9 Mon Sep 17 00:00:00 2001 From: Andrew Childs Date: Sat, 12 Dec 2020 15:49:48 +0900 Subject: [PATCH] darwin/xcode: remove -arch flags These are now provided by the standard bintools and cc wrappers. --- pkgs/os-specific/darwin/xcode/sdk-pkgs.nix | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix b/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix index 16ed52ea81e7..cabac19ba867 100644 --- a/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix +++ b/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix @@ -14,12 +14,6 @@ let minSdkVersion = targetPlatform.minSdkVersion or "9.0"; -iosPlatformArch = { parsed, ... }: { - armv7a = "armv7"; - aarch64 = "arm64"; - x86_64 = "x86_64"; -}.${parsed.cpu.name}; - in rec { @@ -35,9 +29,7 @@ rec { binutils = wrapBintoolsWith { libc = targetIosSdkPkgs.libraries; bintools = binutils-unwrapped; - extraBuildCommands = '' - echo "-arch ${iosPlatformArch targetPlatform}" >> $out/nix-support/libc-ldflags - '' + lib.optionalString (sdk.platform == "iPhoneSimulator") '' + extraBuildCommands = lib.optionalString (sdk.platform == "iPhoneSimulator") '' echo "-platform_version ios-sim ${minSdkVersion} ${sdk.version}" >> $out/nix-support/libc-ldflags '' + lib.optionalString (sdk.platform == "iPhoneOS") '' echo "-platform_version ios ${minSdkVersion} ${sdk.version}" >> $out/nix-support/libc-ldflags @@ -52,7 +44,7 @@ rec { extraBuildCommands = '' tr '\n' ' ' < $out/nix-support/cc-cflags > cc-cflags.tmp mv cc-cflags.tmp $out/nix-support/cc-cflags - echo "-target ${targetPlatform.config} -arch ${iosPlatformArch targetPlatform}" >> $out/nix-support/cc-cflags + echo "-target ${targetPlatform.config}" >> $out/nix-support/cc-cflags echo "-isystem ${sdk}/usr/include${lib.optionalString (lib.versionAtLeast "10" sdk.version) " -isystem ${sdk}/usr/include/c++/4.2.1/ -stdlib=libstdc++"}" >> $out/nix-support/cc-cflags '' + lib.optionalString (sdk.platform == "iPhoneSimulator") '' echo "-mios-simulator-version-min=${minSdkVersion}" >> $out/nix-support/cc-cflags