File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,13 @@ MAKEFLAGS += --no-print-directory
17
17
LIBFILE = $(OUTPUT ) libapi.a
18
18
19
19
CFLAGS := $(EXTRA_WARNINGS ) $(EXTRA_CFLAGS )
20
- CFLAGS += -ggdb3 -Wall -Wextra -std=gnu99 -O6 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fPIC
20
+ CFLAGS += -ggdb3 -Wall -Wextra -std=gnu99 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fPIC
21
+
22
+ ifeq ($(CC ) , clang)
23
+ CFLAGS += -O3
24
+ else
25
+ CFLAGS += -O6
26
+ endif
21
27
22
28
# Treat warnings as errors unless directed not to
23
29
ifneq ($(WERROR ) ,0)
Original file line number Diff line number Diff line change @@ -19,7 +19,13 @@ MAKEFLAGS += --no-print-directory
19
19
LIBFILE = $(OUTPUT ) libsubcmd.a
20
20
21
21
CFLAGS := $(EXTRA_WARNINGS ) $(EXTRA_CFLAGS )
22
- CFLAGS += -ggdb3 -Wall -Wextra -std=gnu99 -O6 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fPIC
22
+ CFLAGS += -ggdb3 -Wall -Wextra -std=gnu99 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fPIC
23
+
24
+ ifeq ($(CC ) , clang)
25
+ CFLAGS += -O3
26
+ else
27
+ CFLAGS += -O6
28
+ endif
23
29
24
30
# Treat warnings as errors unless directed not to
25
31
ifneq ($(WERROR ) ,0)
Original file line number Diff line number Diff line change @@ -144,8 +144,12 @@ ifndef DEBUG
144
144
endif
145
145
146
146
ifeq ($(DEBUG),0)
147
+ ifeq ($(CC), clang)
148
+ CFLAGS += -O3
149
+ else
147
150
CFLAGS += -O6
148
151
endif
152
+ endif
149
153
150
154
ifdef PARSER_DEBUG
151
155
PARSER_DEBUG_BISON := -t
You can’t perform that action at this time.
0 commit comments