l10n: zh_CN: v2.34.0 round 3
[alt-git.git] / config.mak.dev
blob7673fed11425409c9a7fd584fb4387e79678d498
1 ifndef COMPILER_FEATURES
2 COMPILER_FEATURES := $(shell ./detect-compiler $(CC))
3 endif
5 ifeq ($(filter no-error,$(DEVOPTS)),)
6 DEVELOPER_CFLAGS += -Werror
7 SPARSE_FLAGS += -Wsparse-error
8 endif
10 DEVELOPER_CFLAGS += -Wall
11 ifeq ($(filter no-pedantic,$(DEVOPTS)),)
12 DEVELOPER_CFLAGS += -pedantic
13 ifneq (($or $(filter gcc5,$(COMPILER_FEATURES)),$(filter clang4,$(COMPILER_FEATURES))),)
14 DEVELOPER_CFLAGS += -Wpedantic
15 ifneq ($(filter gcc10,$(COMPILER_FEATURES)),)
16 ifeq ($(uname_S),MINGW)
17 DEVELOPER_CFLAGS += -Wno-pedantic-ms-format
18 endif
19 endif
20 endif
21 endif
22 DEVELOPER_CFLAGS += -Wdeclaration-after-statement
23 DEVELOPER_CFLAGS += -Wformat-security
24 DEVELOPER_CFLAGS += -Wold-style-definition
25 DEVELOPER_CFLAGS += -Woverflow
26 DEVELOPER_CFLAGS += -Wpointer-arith
27 DEVELOPER_CFLAGS += -Wstrict-prototypes
28 DEVELOPER_CFLAGS += -Wunused
29 DEVELOPER_CFLAGS += -Wvla
30 DEVELOPER_CFLAGS += -fno-common
32 ifneq ($(filter clang4,$(COMPILER_FEATURES)),)
33 DEVELOPER_CFLAGS += -Wtautological-constant-out-of-range-compare
34 endif
36 ifneq ($(or $(filter gcc6,$(COMPILER_FEATURES)),$(filter clang4,$(COMPILER_FEATURES))),)
37 DEVELOPER_CFLAGS += -Wextra
38 # if a function is public, there should be a prototype and the right
39 # header file should be included. If not, it should be static.
40 DEVELOPER_CFLAGS += -Wmissing-prototypes
41 ifeq ($(filter extra-all,$(DEVOPTS)),)
42 # These are disabled because we have these all over the place.
43 DEVELOPER_CFLAGS += -Wno-empty-body
44 DEVELOPER_CFLAGS += -Wno-missing-field-initializers
45 DEVELOPER_CFLAGS += -Wno-sign-compare
46 DEVELOPER_CFLAGS += -Wno-unused-parameter
47 endif
48 endif
50 # uninitialized warnings on gcc 4.9.2 in xdiff/xdiffi.c and config.c
51 # not worth fixing since newer compilers correctly stop complaining
52 ifneq ($(filter gcc4,$(COMPILER_FEATURES)),)
53 ifeq ($(filter gcc5,$(COMPILER_FEATURES)),)
54 DEVELOPER_CFLAGS += -Wno-uninitialized
55 endif
56 endif
58 GIT_TEST_PERL_FATAL_WARNINGS = YesPlease