From 6cc523ca28008cf19c727e1ee84c3f6be51eabca Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 27 Feb 2023 00:38:03 +0000 Subject: [PATCH] lld: build with 2M stack size Port of 6485a02fb3c ("llvm 14 lld: build with 2M stack size to fix firefox lto"). --- pkgs/development/compilers/llvm/10/lld/default.nix | 1 + pkgs/development/compilers/llvm/11/lld/default.nix | 1 + pkgs/development/compilers/llvm/12/lld/default.nix | 1 + pkgs/development/compilers/llvm/13/lld/default.nix | 1 + pkgs/development/compilers/llvm/5/lld/default.nix | 1 + pkgs/development/compilers/llvm/6/lld/default.nix | 1 + pkgs/development/compilers/llvm/7/lld/default.nix | 1 + pkgs/development/compilers/llvm/8/lld/default.nix | 1 + pkgs/development/compilers/llvm/9/lld/default.nix | 1 + pkgs/development/compilers/llvm/git/lld/default.nix | 1 + 10 files changed, 10 insertions(+) diff --git a/pkgs/development/compilers/llvm/10/lld/default.nix b/pkgs/development/compilers/llvm/10/lld/default.nix index 4b7d4eafcbf32..94cab09d680d5 100644 --- a/pkgs/development/compilers/llvm/10/lld/default.nix +++ b/pkgs/development/compilers/llvm/10/lld/default.nix @@ -25,6 +25,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen" ]; + LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152"; outputs = [ "out" "lib" "dev" ]; diff --git a/pkgs/development/compilers/llvm/11/lld/default.nix b/pkgs/development/compilers/llvm/11/lld/default.nix index 8a9daf317c24a..0a245879e93c2 100644 --- a/pkgs/development/compilers/llvm/11/lld/default.nix +++ b/pkgs/development/compilers/llvm/11/lld/default.nix @@ -25,6 +25,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen" ]; + LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152"; outputs = [ "out" "lib" "dev" ]; diff --git a/pkgs/development/compilers/llvm/12/lld/default.nix b/pkgs/development/compilers/llvm/12/lld/default.nix index cc476259612ca..507628b1b6fb3 100644 --- a/pkgs/development/compilers/llvm/12/lld/default.nix +++ b/pkgs/development/compilers/llvm/12/lld/default.nix @@ -33,6 +33,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen" ]; + LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152"; outputs = [ "out" "lib" "dev" ]; diff --git a/pkgs/development/compilers/llvm/13/lld/default.nix b/pkgs/development/compilers/llvm/13/lld/default.nix index d37a380c63970..f4bd093f6a480 100644 --- a/pkgs/development/compilers/llvm/13/lld/default.nix +++ b/pkgs/development/compilers/llvm/13/lld/default.nix @@ -34,6 +34,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen" ]; + LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152"; outputs = [ "out" "lib" "dev" ]; diff --git a/pkgs/development/compilers/llvm/5/lld/default.nix b/pkgs/development/compilers/llvm/5/lld/default.nix index ad0ba40bf998c..c1949e619c441 100644 --- a/pkgs/development/compilers/llvm/5/lld/default.nix +++ b/pkgs/development/compilers/llvm/5/lld/default.nix @@ -24,6 +24,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen" ]; + LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152"; outputs = [ "out" "lib" "dev" ]; diff --git a/pkgs/development/compilers/llvm/6/lld/default.nix b/pkgs/development/compilers/llvm/6/lld/default.nix index 81dd39c39eb8b..19a0c3a37e17f 100644 --- a/pkgs/development/compilers/llvm/6/lld/default.nix +++ b/pkgs/development/compilers/llvm/6/lld/default.nix @@ -25,6 +25,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen" ]; + LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152"; outputs = [ "out" "lib" "dev" ]; diff --git a/pkgs/development/compilers/llvm/7/lld/default.nix b/pkgs/development/compilers/llvm/7/lld/default.nix index 7858599990caf..4c450bc8a1d04 100644 --- a/pkgs/development/compilers/llvm/7/lld/default.nix +++ b/pkgs/development/compilers/llvm/7/lld/default.nix @@ -25,6 +25,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen" ]; + LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152"; outputs = [ "out" "lib" "dev" ]; diff --git a/pkgs/development/compilers/llvm/8/lld/default.nix b/pkgs/development/compilers/llvm/8/lld/default.nix index 30be084fa814f..4906989378bd6 100644 --- a/pkgs/development/compilers/llvm/8/lld/default.nix +++ b/pkgs/development/compilers/llvm/8/lld/default.nix @@ -25,6 +25,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen" ]; + LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152"; outputs = [ "out" "lib" "dev" ]; diff --git a/pkgs/development/compilers/llvm/9/lld/default.nix b/pkgs/development/compilers/llvm/9/lld/default.nix index 73cfe630bbbbe..d37e5996c98f6 100644 --- a/pkgs/development/compilers/llvm/9/lld/default.nix +++ b/pkgs/development/compilers/llvm/9/lld/default.nix @@ -25,6 +25,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen" ]; + LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152"; outputs = [ "out" "lib" "dev" ]; diff --git a/pkgs/development/compilers/llvm/git/lld/default.nix b/pkgs/development/compilers/llvm/git/lld/default.nix index 03d20264de206..e8bca769de5fa 100644 --- a/pkgs/development/compilers/llvm/git/lld/default.nix +++ b/pkgs/development/compilers/llvm/git/lld/default.nix @@ -36,6 +36,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen" ]; + LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152"; outputs = [ "out" "lib" "dev" ];