mirror of
https://github.com/NixOS/nix.git
synced 2024-11-25 08:12:29 +00:00
unset NIX_HARDENING_ENABLE
in fast build mode
`NIX_HARDENING_ENABLE` causes `_FORTIFY_SOURCE` to be defined. This isn't compatible with `-O0`, and the compiler will happily remind us about it at every call, spamming the terminal with warnings and stack traces. We don't really care hardening in that case, so just disable it if we pass `OPTIMIZE=0`.
This commit is contained in:
parent
da90be789d
commit
f6142cd0d1
1
Makefile
1
Makefile
@ -68,6 +68,7 @@ ifeq ($(OPTIMIZE), 1)
|
|||||||
GLOBAL_LDFLAGS += $(CXXLTO)
|
GLOBAL_LDFLAGS += $(CXXLTO)
|
||||||
else
|
else
|
||||||
GLOBAL_CXXFLAGS += -O0 -U_FORTIFY_SOURCE
|
GLOBAL_CXXFLAGS += -O0 -U_FORTIFY_SOURCE
|
||||||
|
unexport NIX_HARDENING_ENABLE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include mk/platform.mk
|
include mk/platform.mk
|
||||||
|
@ -396,6 +396,7 @@
|
|||||||
# Make bash completion work.
|
# Make bash completion work.
|
||||||
XDG_DATA_DIRS+=:$out/share
|
XDG_DATA_DIRS+=:$out/share
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = attrs.nativeBuildInputs or []
|
nativeBuildInputs = attrs.nativeBuildInputs or []
|
||||||
# TODO: Remove the darwin check once
|
# TODO: Remove the darwin check once
|
||||||
# https://github.com/NixOS/nixpkgs/pull/291814 is available
|
# https://github.com/NixOS/nixpkgs/pull/291814 is available
|
||||||
|
Loading…
Reference in New Issue
Block a user