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;
|
../build-support/setup-hooks/make-wrapper.sh;
|
||||||
|
|
||||||
makeBinaryWrapper = let
|
makeBinaryWrapper = let
|
||||||
script = runCommand "make-binary-wrapper.sh" {} ''
|
f = { cc, sanitizers }: let
|
||||||
substitute ${../build-support/setup-hooks/make-binary-wrapper.sh} $out \
|
san = lib.concatMapStringsSep " " (s: "-fsanitize=${s}") sanitizers;
|
||||||
--replace " @CC@ " " ${gcc}/bin/cc "
|
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
|
in
|
||||||
makeSetupHook { deps = [ dieHook ]; } script;
|
lib.makeOverridable f {
|
||||||
|
cc = gcc;
|
||||||
|
sanitizers = [ "undefined" "address" ];
|
||||||
|
};
|
||||||
|
|
||||||
makeModulesClosure = { kernel, firmware, rootModules, allowMissing ? false }:
|
makeModulesClosure = { kernel, firmware, rootModules, allowMissing ? false }:
|
||||||
callPackage ../build-support/kernel/modules-closure.nix {
|
callPackage ../build-support/kernel/modules-closure.nix {
|
||||||
|
|
Loading…
Reference in a new issue