make-binary-wrapper: add cc to propagatedBuildInputs

Adding cc to propagatedBuildInputs makes derivations with
makeBinaryWrapper in nativeBuildInputs run the cc-wrapper
setup hook. This isn't an issue for derivations using
stdenv, as the cc setup hook is already run by default.
However, derivations that are made with stdenvNoCC, e.g.
because they're made with runCommand, will not run the
cc-wrapper setup hook without this change.

For some reason the FreeBSD native compiler will not work
correctly without the setup hook.
This commit is contained in:
Artemis Tosini 2024-05-14 13:38:34 -07:00 committed by Audrey Dutcher
parent 4dec85d68b
commit 0c34636a56

View File

@ -10,7 +10,7 @@
makeSetupHook {
name = "make-binary-wrapper-hook";
propagatedBuildInputs = [ dieHook ];
propagatedBuildInputs = [ dieHook cc ];
substitutions = {
cc = "${cc}/bin/${cc.targetPrefix}cc ${lib.escapeShellArgs (map (s: "-fsanitize=${s}") sanitizers)}";