diff options
author | Robert Scott <code@humanleg.org.uk> | 2024-02-24 20:23:31 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-24 20:23:31 +0000 |
commit | 259fabc9eed14e3db5cb15a27d37ee758cefeb5a (patch) | |
tree | 41f440e651ba36fb35a68643b7a8192e8b5b2777 /pkgs/development/compilers/llvm | |
parent | 35aa42e19a778e1da77aa44f418fa2e87cc5cc41 (diff) | |
parent | 1cae11c0fc716d0a2ae83b6916e90fa538714308 (diff) |
Merge pull request #282638 from risicle/ris-trivialautovarinit
cc-wrapper: add `trivialautovarinit` hardening flag support
Diffstat (limited to 'pkgs/development/compilers/llvm')
8 files changed, 16 insertions, 0 deletions
diff --git a/pkgs/development/compilers/llvm/11/llvm/default.nix b/pkgs/development/compilers/llvm/11/llvm/default.nix index e71d63859a06d..5e22d3f4af161 100644 --- a/pkgs/development/compilers/llvm/11/llvm/default.nix +++ b/pkgs/development/compilers/llvm/11/llvm/default.nix @@ -212,6 +212,8 @@ in stdenv.mkDerivation (rec { # E.g. mesa.drivers use the build-id as a cache key (see #93946): LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; + hardeningDisable = [ "trivialautovarinit" ]; + cmakeBuildType = if debugVersion then "Debug" else "Release"; cmakeFlags = with stdenv; let diff --git a/pkgs/development/compilers/llvm/12/llvm/default.nix b/pkgs/development/compilers/llvm/12/llvm/default.nix index 3ac3ee24aec4d..d75ce3b3b052c 100644 --- a/pkgs/development/compilers/llvm/12/llvm/default.nix +++ b/pkgs/development/compilers/llvm/12/llvm/default.nix @@ -202,6 +202,8 @@ in stdenv.mkDerivation (rec { # E.g. mesa.drivers use the build-id as a cache key (see #93946): LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; + hardeningDisable = [ "trivialautovarinit" ]; + cmakeBuildType = if debugVersion then "Debug" else "Release"; cmakeFlags = with stdenv; let diff --git a/pkgs/development/compilers/llvm/13/llvm/default.nix b/pkgs/development/compilers/llvm/13/llvm/default.nix index faebfb6e2bfdc..58e742b9b41ea 100644 --- a/pkgs/development/compilers/llvm/13/llvm/default.nix +++ b/pkgs/development/compilers/llvm/13/llvm/default.nix @@ -164,6 +164,8 @@ in stdenv.mkDerivation (rec { # E.g. mesa.drivers use the build-id as a cache key (see #93946): LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; + hardeningDisable = [ "trivialautovarinit" ]; + cmakeBuildType = if debugVersion then "Debug" else "Release"; cmakeFlags = with stdenv; let diff --git a/pkgs/development/compilers/llvm/14/llvm/default.nix b/pkgs/development/compilers/llvm/14/llvm/default.nix index ed7d238ddaee9..124d07e4bb2b1 100644 --- a/pkgs/development/compilers/llvm/14/llvm/default.nix +++ b/pkgs/development/compilers/llvm/14/llvm/default.nix @@ -168,6 +168,8 @@ in stdenv.mkDerivation (rec { # E.g. mesa.drivers use the build-id as a cache key (see #93946): LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; + hardeningDisable = [ "trivialautovarinit" ]; + cmakeBuildType = if debugVersion then "Debug" else "Release"; cmakeFlags = with stdenv; let diff --git a/pkgs/development/compilers/llvm/15/llvm/default.nix b/pkgs/development/compilers/llvm/15/llvm/default.nix index 7f1232d57a18c..d7ebcbcf8b760 100644 --- a/pkgs/development/compilers/llvm/15/llvm/default.nix +++ b/pkgs/development/compilers/llvm/15/llvm/default.nix @@ -300,6 +300,8 @@ in stdenv.mkDerivation (rec { # E.g. mesa.drivers use the build-id as a cache key (see #93946): LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; + hardeningDisable = [ "trivialautovarinit" ]; + cmakeBuildType = if debugVersion then "Debug" else "Release"; cmakeFlags = with stdenv; let diff --git a/pkgs/development/compilers/llvm/16/llvm/default.nix b/pkgs/development/compilers/llvm/16/llvm/default.nix index 661866c1890bd..aed9c367d1ad3 100644 --- a/pkgs/development/compilers/llvm/16/llvm/default.nix +++ b/pkgs/development/compilers/llvm/16/llvm/default.nix @@ -287,6 +287,8 @@ in # E.g. mesa.drivers use the build-id as a cache key (see #93946): LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; + hardeningDisable = [ "trivialautovarinit" ]; + cmakeBuildType = if debugVersion then "Debug" else "Release"; cmakeFlags = with stdenv; let diff --git a/pkgs/development/compilers/llvm/9/llvm/default.nix b/pkgs/development/compilers/llvm/9/llvm/default.nix index 7d5e8389eba9b..f8f1c67670ecc 100644 --- a/pkgs/development/compilers/llvm/9/llvm/default.nix +++ b/pkgs/development/compilers/llvm/9/llvm/default.nix @@ -203,6 +203,8 @@ in stdenv.mkDerivation (rec { ln -sv $PWD/lib $out ''; + hardeningDisable = [ "trivialautovarinit" ]; + cmakeBuildType = if debugVersion then "Debug" else "Release"; cmakeFlags = with stdenv; let diff --git a/pkgs/development/compilers/llvm/git/llvm/default.nix b/pkgs/development/compilers/llvm/git/llvm/default.nix index b8cef22878060..6dc2b51aaf9a8 100644 --- a/pkgs/development/compilers/llvm/git/llvm/default.nix +++ b/pkgs/development/compilers/llvm/git/llvm/default.nix @@ -290,6 +290,8 @@ stdenv.mkDerivation (rec { # E.g. mesa.drivers use the build-id as a cache key (see #93946): LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1"; + hardeningDisable = [ "trivialautovarinit" ]; + cmakeBuildType = if debugVersion then "Debug" else "Release"; cmakeFlags = with stdenv; let |