mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-01 11:22:58 +00:00
make-binary-wrapper: Add sanitizer default option
This commit is contained in:
parent
d5e028a441
commit
bdaa0e2930
@ -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 New Issue
Block a user