2024-03-25 06:45:25 +00:00
|
|
|
# 2024-03-24: jade benchmarked the default sanitize reporting in clang and got
|
|
|
|
# a regression of about 10% on hackage-packages.nix with clang. So we are trapping instead.
|
|
|
|
#
|
|
|
|
# This has an overhead of 0-4% on gcc and unmeasurably little on clang, in
|
|
|
|
# Nix evaluation benchmarks.
|
|
|
|
DEFAULT_SANITIZE_FLAGS = -fsanitize=signed-integer-overflow -fsanitize-undefined-trap-on-error
|
|
|
|
GLOBAL_CXXFLAGS += -Wno-deprecated-declarations -Werror=switch $(DEFAULT_SANITIZE_FLAGS)
|
|
|
|
GLOBAL_LDFLAGS += $(DEFAULT_SANITIZE_FLAGS)
|
2023-04-03 16:11:42 +00:00
|
|
|
# Allow switch-enum to be overridden for files that do not support it, usually because of dependency headers.
|
|
|
|
ERROR_SWITCH_ENUM = -Werror=switch-enum
|
2014-02-07 16:15:00 +00:00
|
|
|
|
2020-02-03 17:04:09 +00:00
|
|
|
$(foreach i, config.h $(wildcard src/lib*/*.hh), \
|
2015-06-09 09:14:36 +00:00
|
|
|
$(eval $(call install-file-in, $(i), $(includedir)/nix, 0644)))
|
2019-12-05 19:26:24 +00:00
|
|
|
|
2020-10-06 11:27:09 +00:00
|
|
|
$(GCH): src/libutil/util.hh config.h
|
2020-03-30 12:29:29 +00:00
|
|
|
|
|
|
|
GCH_CXXFLAGS = -I src/libutil
|