From 98d5c93e0afc2f03a768b7ff638e594b48a8f191 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 5 Oct 2024 19:07:05 +0100 Subject: [PATCH] llvmPackages.compiler-rt: remove code for macOS < 11 --- .../llvm/common/compiler-rt/default.nix | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/pkgs/development/compilers/llvm/common/compiler-rt/default.nix b/pkgs/development/compilers/llvm/common/compiler-rt/default.nix index 9ec3a2ddcbd6..b6b2d6d39755 100644 --- a/pkgs/development/compilers/llvm/common/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/common/compiler-rt/default.nix @@ -8,7 +8,6 @@ , monorepoSrc ? null , runCommand , apple-sdk -, apple-sdk_10_13 , cmake , ninja , python3 @@ -47,14 +46,6 @@ let baseName = "compiler-rt"; pname = baseName + lib.optionalString (haveLibc) "-libc"; - # Sanitizers require 10.13 or newer. Instead of disabling them for most x86_64-darwin users, - # build them with a newer SDK and the default (10.12) deployment target. - apple-sdk' = - if lib.versionOlder (lib.getVersion apple-sdk) "10.13" then - apple-sdk_10_13.override { enableBootstrap = true; } - else - apple-sdk.override { enableBootstrap = true; }; - src' = if monorepoSrc != null then runCommand "${baseName}-src-${version}" {} ('' mkdir -p "$out" @@ -80,10 +71,7 @@ stdenv.mkDerivation ({ ++ [ python3 libllvm.dev ]; buildInputs = lib.optional (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isRiscV) linuxHeaders - ++ lib.optional (stdenv.hostPlatform.isFreeBSD) freebsd.include - # Adding the bootstrap SDK to `buildInputs` on static builds propagates it, breaking `xcrun`. - # This can be removed once the minimum SDK >10.12 on x86_64-darwin. - ++ lib.optionals (stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isStatic) [ apple-sdk' ]; + ++ lib.optional (stdenv.hostPlatform.isFreeBSD) freebsd.include; env = { NIX_CFLAGS_COMPILE = toString ([ @@ -148,7 +136,7 @@ stdenv.mkDerivation ({ # Darwin support, so force it to be enabled during the first stage of the compiler-rt bootstrap. "-DCOMPILER_RT_HAS_G_FLAG=ON" ] ++ [ - "-DDARWIN_macosx_CACHED_SYSROOT=${apple-sdk'.sdkroot}" + "-DDARWIN_macosx_CACHED_SYSROOT=${apple-sdk.sdkroot}" "-DDARWIN_macosx_OVERRIDE_SDK_VERSION=${lib.versions.majorMinor (lib.getVersion apple-sdk)}" "-DDARWIN_osx_ARCHS=${stdenv.hostPlatform.darwinArch}" "-DDARWIN_osx_BUILTIN_ARCHS=${stdenv.hostPlatform.darwinArch}"