about summary refs log tree commit diff
path: root/pkgs/build-support/cc-wrapper
diff options
context:
space:
mode:
authorSam <30577766+Samasaur1@users.noreply.github.com>2024-04-02 19:21:49 -0700
committerSam <30577766+Samasaur1@users.noreply.github.com>2024-04-02 21:42:01 -0700
commitf86158cd9a0cf41edb2b99e9615495c7fedff318 (patch)
treeb073722e1bfa8cfa966f08a5c279991c44e5b5cf /pkgs/build-support/cc-wrapper
parent9fd2efac08231b9a13459eafb597820b1023e23c (diff)
Revert "swift: don't pass -march to swiftc"
This reverts commit 8a7841ceef0a7c7794174178de786ae76cc27457.
Diffstat (limited to 'pkgs/build-support/cc-wrapper')
-rw-r--r--pkgs/build-support/cc-wrapper/default.nix8
1 files changed, 2 insertions, 6 deletions
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix
index 569f6875e1fb5..23b3ce522ae38 100644
--- a/pkgs/build-support/cc-wrapper/default.nix
+++ b/pkgs/build-support/cc-wrapper/default.nix
@@ -53,10 +53,6 @@
 , gccForLibs ? if useCcForLibs then cc else null
 , fortify-headers ? null
 , includeFortifyHeaders ? null
-
-# https://github.com/NixOS/nixpkgs/issues/295322
-# should -march flag be used
-, disableMarch ? false
 }:
 
 assert nativeTools -> !propagateDoc && nativePrefix != "";
@@ -633,7 +629,7 @@ stdenv.mkDerivation {
 
     # TODO: aarch64-darwin has mcpu incompatible with gcc
     + optionalString ((targetPlatform ? gcc.arch) && !isClang && !(stdenv.isDarwin && stdenv.isAarch64) &&
-                      isGccArchSupported targetPlatform.gcc.arch && !disableMarch) ''
+                      isGccArchSupported targetPlatform.gcc.arch) ''
       echo "-march=${targetPlatform.gcc.arch}" >> $out/nix-support/cc-cflags-before
     ''
 
@@ -729,7 +725,7 @@ stdenv.mkDerivation {
     + optionalString isClang ''
       # Escape twice: once for this script, once for the one it gets substituted into.
       export march=${escapeShellArg
-        (optionalString (targetPlatform ? gcc.arch && !disableMarch)
+        (optionalString (targetPlatform ? gcc.arch)
           (escapeShellArg "-march=${targetPlatform.gcc.arch}"))}
       export defaultTarget=${targetPlatform.config}
       substituteAll ${./add-clang-cc-cflags-before.sh} $out/nix-support/add-local-cc-cflags-before.sh