From 3b56cf6ff8296bd586640f78fa42cdf6709d60ed Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Thu, 20 Mar 2025 08:06:42 -0700 Subject: [PATCH] llvmPackages.clangNoLibcNoRt: drop nostartfiles flag `-nostartfiles` used to be needed for pkgsLLVM, causes problems so don't include it. --- .../compilers/llvm/common/default.nix | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/pkgs/development/compilers/llvm/common/default.nix b/pkgs/development/compilers/llvm/common/default.nix index 5cf68c1dd695..e499dfd81c56 100644 --- a/pkgs/development/compilers/llvm/common/default.nix +++ b/pkgs/development/compilers/llvm/common/default.nix @@ -424,18 +424,14 @@ let libcxx = null; bintools = bintoolsNoLibc'; extraPackages = [ ]; - extraBuildCommands = - lib.optionalString (lib.versions.major metadata.release_version == "13") '' - echo "-nostartfiles" >> $out/nix-support/cc-cflags - '' - + mkExtraBuildCommands0 cc; + # "-nostartfiles" used to be needed for pkgsLLVM, causes problems so don't include it. + extraBuildCommands = mkExtraBuildCommands0 cc; } // lib.optionalAttrs (lib.versionAtLeast metadata.release_version "14") { - nixSupport.cc-cflags = - [ "-nostartfiles" ] - ++ lib.optional ( - lib.versionAtLeast metadata.release_version "15" && stdenv.targetPlatform.isWasm - ) "-fno-exceptions"; + # "-nostartfiles" used to be needed for pkgsLLVM, causes problems so don't include it. + nixSupport.cc-cflags = lib.optional ( + lib.versionAtLeast metadata.release_version "15" && stdenv.targetPlatform.isWasm + ) "-fno-exceptions"; } );