diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-02-27 15:24:23 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-02-27 15:24:23 -0300 |
commit | 76ff55750ebbf48dcd687af08ee054d182961166 (patch) | |
tree | b1a293f6fb726c5204de3e7d0b0767c0b2d817a3 /makefile | |
parent | b7edf5d2d89ed2ce1e9087de496bcb451e39d131 (diff) | |
download | lua-76ff55750ebbf48dcd687af08ee054d182961166.tar.gz lua-76ff55750ebbf48dcd687af08ee054d182961166.tar.bz2 lua-76ff55750ebbf48dcd687af08ee054d182961166.zip |
no optimizations in test mode + no more compat with 5.2 + a few more
options in comments
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -16,12 +16,12 @@ CWARNSCPP= \ | |||
16 | -Wdisabled-optimization \ | 16 | -Wdisabled-optimization \ |
17 | -Waggregate-return \ | 17 | -Waggregate-return \ |
18 | -Wdouble-promotion \ | 18 | -Wdouble-promotion \ |
19 | #-Wno-aggressive-loop-optimizations # not accepted by clang \ | 19 | -Wstrict-aliasing=3 # not accepted by clang \ |
20 | #-Wlogical-op # not accepted by clang \ | 20 | -Wno-aggressive-loop-optimizations # not accepted by clang \ |
21 | -Wlogical-op # not accepted by clang \ | ||
21 | # the next warnings generate too much noise, so they are disabled | 22 | # the next warnings generate too much noise, so they are disabled |
22 | # -Wconversion -Wno-sign-conversion \ | 23 | # -Wconversion -Wno-sign-conversion \ |
23 | # -Wsign-conversion \ | 24 | # -Wsign-conversion \ |
24 | # -Wconversion \ | ||
25 | # -Wstrict-overflow=2 \ | 25 | # -Wstrict-overflow=2 \ |
26 | # -Wformat=2 \ | 26 | # -Wformat=2 \ |
27 | # -Wcast-qual \ | 27 | # -Wcast-qual \ |
@@ -35,7 +35,7 @@ CWARNSC= -Wdeclaration-after-statement \ | |||
35 | -Wold-style-definition \ | 35 | -Wold-style-definition \ |
36 | 36 | ||
37 | 37 | ||
38 | CWARNS= $(CWARNSCPP) $(CWARNSC) | 38 | CWARNS= $(CWARNSCPP) $(CWARNSC) |
39 | 39 | ||
40 | 40 | ||
41 | # -DEXTERNMEMCHECK -DHARDSTACKTESTS -DHARDMEMTESTS -DTRACEMEM='"tempmem"' | 41 | # -DEXTERNMEMCHECK -DHARDSTACKTESTS -DHARDMEMTESTS -DTRACEMEM='"tempmem"' |
@@ -43,23 +43,24 @@ CWARNS= $(CWARNSCPP) $(CWARNSC) | |||
43 | # -pg -malign-double | 43 | # -pg -malign-double |
44 | # -DLUA_USE_CTYPE -DLUA_USE_APICHECK | 44 | # -DLUA_USE_CTYPE -DLUA_USE_APICHECK |
45 | # (in clang, '-ftrapv' for runtime checks of integer overflows) | 45 | # (in clang, '-ftrapv' for runtime checks of integer overflows) |
46 | # -fsanitize=undefined -ftrapv | 46 | # -fsanitize=undefined -ftrapv -fno-inline |
47 | TESTS= -DLUA_USER_H='"ltests.h"' | 47 | TESTS= -DLUA_USER_H='"ltests.h"' -O0 |
48 | 48 | ||
49 | # -mtune=native -fomit-frame-pointer | 49 | # -mtune=native -fomit-frame-pointer |
50 | # -fno-stack-protector | 50 | # -fno-stack-protector |
51 | LOCAL = $(TESTS) $(CWARNS) -g | 51 | # -DLUA_NILINTABLE |
52 | LOCAL = $(TESTS) $(CWARNS) -g -DEXTERNMEMCHECK | ||
52 | 53 | ||
53 | 54 | ||
54 | 55 | ||
55 | # enable Linux goodies | 56 | # enable Linux goodies |
56 | MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX -DLUA_COMPAT_5_2 | 57 | MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX |
57 | MYLDFLAGS= $(LOCAL) -Wl,-E | 58 | MYLDFLAGS= $(LOCAL) -Wl,-E |
58 | MYLIBS= -ldl -lreadline | 59 | MYLIBS= -ldl -lreadline |
59 | 60 | ||
60 | 61 | ||
61 | CC= clang-3.8 | 62 | CC= gcc |
62 | CFLAGS= -Wall -O2 $(MYCFLAGS) | 63 | CFLAGS= -Wall -O2 $(MYCFLAGS) -Wfatal-errors |
63 | AR= ar rcu | 64 | AR= ar rcu |
64 | RANLIB= ranlib | 65 | RANLIB= ranlib |
65 | RM= rm -f | 66 | RM= rm -f |