Skip to content

Commit

Permalink
mkDerivation: explain "all" in hardeningDisable
Browse files Browse the repository at this point in the history
#28806 (comment)
(cherry picked from commit 447240b)
  • Loading branch information
orivej authored and Ericson2314 committed Sep 3, 2017
1 parent fb1a440 commit ffb2b66
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkgs/stdenv/generic/make-derivation.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ rec {
# TODO(@Ericson2314): Make this more modular, and not O(n^2).
let
supportedHardeningFlags = [ "fortify" "stackprotector" "pie" "pic" "strictoverflow" "format" "relro" "bindnow" ];
# hardeningDisable additionally supports "all".
erroneousHardeningFlags = lib.subtractLists supportedHardeningFlags (hardeningEnable ++ lib.remove "all" hardeningDisable);
in if builtins.length erroneousHardeningFlags != 0
then abort ("mkDerivation was called with unsupported hardening flags: " + lib.generators.toPretty {} {
Expand Down

0 comments on commit ffb2b66

Please sign in to comment.