mirror of
https://github.com/lua/lua
synced 2024-11-22 12:51:30 +03:00
Eases the use of clang in the makefile
New definition in the makefile for warnings that are valid for gcc but not for clang (CWARNGCC).
This commit is contained in:
parent
4e47f81188
commit
f79ccdca9b
13
makefile
13
makefile
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
# Warnings valid for both C and C++
|
# Warnings valid for both C and C++
|
||||||
CWARNSCPP= \
|
CWARNSCPP= \
|
||||||
-fmax-errors=5 \
|
-Wfatal-errors \
|
||||||
-Wextra \
|
-Wextra \
|
||||||
-Wshadow \
|
-Wshadow \
|
||||||
-Wsign-compare \
|
-Wsign-compare \
|
||||||
@ -14,8 +14,6 @@ CWARNSCPP= \
|
|||||||
-Wredundant-decls \
|
-Wredundant-decls \
|
||||||
-Wdisabled-optimization \
|
-Wdisabled-optimization \
|
||||||
-Wdouble-promotion \
|
-Wdouble-promotion \
|
||||||
-Wlogical-op \
|
|
||||||
-Wno-aggressive-loop-optimizations \
|
|
||||||
# the next warnings might be useful sometimes,
|
# the next warnings might be useful sometimes,
|
||||||
# but usually they generate too much noise
|
# but usually they generate too much noise
|
||||||
# -Werror \
|
# -Werror \
|
||||||
@ -26,6 +24,13 @@ CWARNSCPP= \
|
|||||||
# -Wformat=2 \
|
# -Wformat=2 \
|
||||||
# -Wcast-qual \
|
# -Wcast-qual \
|
||||||
|
|
||||||
|
|
||||||
|
# Warnings for gcc, not valid for clang
|
||||||
|
CWARNGCC= \
|
||||||
|
-Wlogical-op \
|
||||||
|
-Wno-aggressive-loop-optimizations \
|
||||||
|
|
||||||
|
|
||||||
# The next warnings are neither valid nor needed for C++
|
# The next warnings are neither valid nor needed for C++
|
||||||
CWARNSC= -Wdeclaration-after-statement \
|
CWARNSC= -Wdeclaration-after-statement \
|
||||||
-Wmissing-prototypes \
|
-Wmissing-prototypes \
|
||||||
@ -35,7 +40,7 @@ CWARNSC= -Wdeclaration-after-statement \
|
|||||||
-Wold-style-definition \
|
-Wold-style-definition \
|
||||||
|
|
||||||
|
|
||||||
CWARNS= $(CWARNSCPP) $(CWARNSC)
|
CWARNS= $(CWARNSCPP) $(CWARNSC) $(CWARNGCC)
|
||||||
|
|
||||||
# Some useful compiler options for internal tests:
|
# Some useful compiler options for internal tests:
|
||||||
# -DLUAI_ASSERT turns on all assertions inside Lua.
|
# -DLUAI_ASSERT turns on all assertions inside Lua.
|
||||||
|
Loading…
Reference in New Issue
Block a user