mirror of
https://github.com/NixOS/nix
synced 2025-07-07 14:21:48 +02:00
enable LTO in optimized builds
gives 2-5% performance improvement across a board of tests.
LTO is broken when using clang; some libs link fine while others crash
the linker with a segfault in the llvm linker plugin. 🙁
This commit is contained in:
parent
6097790863
commit
2799fe4cdb
6 changed files with 25 additions and 6 deletions
3
Makefile
3
Makefile
|
@ -27,7 +27,8 @@ makefiles = \
|
|||
OPTIMIZE = 1
|
||||
|
||||
ifeq ($(OPTIMIZE), 1)
|
||||
GLOBAL_CXXFLAGS += -O3
|
||||
GLOBAL_CXXFLAGS += -O3 $(CXXLTO)
|
||||
GLOBAL_LDFLAGS += $(CXXLTO)
|
||||
else
|
||||
GLOBAL_CXXFLAGS += -O0 -U_FORTIFY_SOURCE
|
||||
endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue