make-binary-wrapper: Add sanitizer default option
This commit is contained in:
parent
d5e028a441
commit
bdaa0e2930
1 changed files with 12 additions and 5 deletions
|
@ -607,12 +607,19 @@ in
|
|||
../build-support/setup-hooks/make-wrapper.sh;
|
||||
|
||||
makeBinaryWrapper = let
|
||||
script = runCommand "make-binary-wrapper.sh" {} ''
|
||||
substitute ${../build-support/setup-hooks/make-binary-wrapper.sh} $out \
|
||||
--replace " @CC@ " " ${gcc}/bin/cc "
|
||||
'';
|
||||
f = { cc, sanitizers }: let
|
||||
san = lib.concatMapStringsSep " " (s: "-fsanitize=${s}") sanitizers;
|
||||
script = runCommand "make-binary-wrapper.sh" {} ''
|
||||
substitute ${../build-support/setup-hooks/make-binary-wrapper.sh} $out \
|
||||
--replace " @CC@ " " ${cc}/bin/cc ${san} "
|
||||
'';
|
||||
in
|
||||
makeSetupHook { deps = [ dieHook ]; } script;
|
||||
in
|
||||
makeSetupHook { deps = [ dieHook ]; } script;
|
||||
lib.makeOverridable f {
|
||||
cc = gcc;
|
||||
sanitizers = [ "undefined" "address" ];
|
||||
};
|
||||
|
||||
makeModulesClosure = { kernel, firmware, rootModules, allowMissing ? false }:
|
||||
callPackage ../build-support/kernel/modules-closure.nix {
|
||||
|
|
Loading…
Reference in a new issue