Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 05ab3a9

Browse files
committed
Add missing optimization passthrough on debian builds
1 parent 67a28c6 commit 05ab3a9

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

haproxy/debian/rules

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,22 @@ DEP_DIST_ROOT_QUICTLS = $(shell realpath ../../deps/quictls/dist)
1212
BUILD_VERSION_REPOSHA = $(shell git rev-parse --short HEAD)
1313

1414
EXTRA_CFLAGS = -g -ggdb3 -gdwarf-4 -Wall -Wextra
15-
OPT_CFLAGS = -O2
15+
16+
HAPROXY_OPTIMIZATION = -O2
17+
OPT_CFLAGS = $(HAPROXY_OPTIMIZATION)
1618

1719
HAPROXY_LIBUBSAN = false
1820
ifeq ($(HAPROXY_LIBUBSAN),true)
19-
OPT_CFLAGS = -O1
21+
# set -Og (-O1 and some extra debug compat features) rather than the default -O2, since UBsan builds are for debug
22+
OPT_CFLAGS = -Og
2023
EXTRA_CFLAGS += -fsanitize=undefined
2124
EXTRA_CFLAGS += -static-libsan
2225
endif
2326

2427
HAPROXY_LIBASAN = false
2528
ifeq ($(HAPROXY_LIBASAN),true)
26-
# set -O1 rather than the default -O2 since LibAsan builds are debug-purpose anyway
27-
OPT_CFLAGS = -O1
29+
# set -Og (-O1 and some extra debug compat features) rather than the default -O2, since LibAsan builds are for debug
30+
OPT_CFLAGS = -Og
2831
EXTRA_CFLAGS += -fsanitize=address
2932
EXTRA_CFLAGS += -static-libsan
3033
EXTRA_CFLAGS += -fsanitize-address-use-after-scope

0 commit comments

Comments
 (0)