diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2021-02-10 14:11:51 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2021-02-10 14:11:51 -0300 |
commit | f79ccdca9bbe9d486d91a44a4464b99ce38de0e2 (patch) | |
tree | 5c7b75c6fa8d3176d452db1d2a813d3aedf09e98 /makefile | |
parent | 4e47f81188d37e29027158b76271d02a781242e2 (diff) | |
download | lua-github-f79ccdca9bbe9d486d91a44a4464b99ce38de0e2.tar.gz |
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).
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -5,7 +5,7 @@ # Warnings valid for both C and C++ CWARNSCPP= \ - -fmax-errors=5 \ + -Wfatal-errors \ -Wextra \ -Wshadow \ -Wsign-compare \ @@ -14,8 +14,6 @@ CWARNSCPP= \ -Wredundant-decls \ -Wdisabled-optimization \ -Wdouble-promotion \ - -Wlogical-op \ - -Wno-aggressive-loop-optimizations \ # the next warnings might be useful sometimes, # but usually they generate too much noise # -Werror \ @@ -26,6 +24,13 @@ CWARNSCPP= \ # -Wformat=2 \ # -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++ CWARNSC= -Wdeclaration-after-statement \ -Wmissing-prototypes \ @@ -35,7 +40,7 @@ CWARNSC= -Wdeclaration-after-statement \ -Wold-style-definition \ -CWARNS= $(CWARNSCPP) $(CWARNSC) +CWARNS= $(CWARNSCPP) $(CWARNSC) $(CWARNGCC) # Some useful compiler options for internal tests: # -DLUAI_ASSERT turns on all assertions inside Lua. |