Makefile: Add libstdc++ assertions + randomize link order
This commit is contained in:
parent
172129179e
commit
24121a1618
18
Makefile
18
Makefile
@ -1,13 +1,15 @@
|
|||||||
|
|
||||||
CPPSTD=c++20
|
CPPSTD=c++20
|
||||||
CXXFLAGS=-std=$(CPPSTD) -O0 -g -no-pie -pipe -MMD -Wall -Wextra
|
|
||||||
RELEASE_CXXFLAGS=-std=$(CPPSTD) -O3 -pipe -MMD -Wall -Wextra
|
#CFIFLAGS=-fsanitize=cfi -fvisibility=hidden -fsanitize=cfi -flto
|
||||||
LDFLAGS=-lsqlite3 -lpthread -lcrypto -lstdc++fs
|
#Does not work reliably atm
|
||||||
|
CFIFLAGS=
|
||||||
|
|
||||||
|
CXXFLAGS=-std=$(CPPSTD) -O2 -g -no-pie -pipe -MMD -Wall -Wextra -DGLIBCXX_ASSERTIONS -D_LIBCPP_ENABLE_ASSERTIONS=1 $(CFIFLAGS)
|
||||||
|
RELEASE_CXXFLAGS=-std=$(CPPSTD) -O3 -pipe -MMD -Wall -Wextra -DGLIBCXX_ASSERTIONS -D_LIBCPP_ENABLE_ASSERTIONS=1 $(CFIFLAGS)
|
||||||
|
|
||||||
|
LDFLAGS=-lsqlite3 -lpthread -lcrypto -lstdc++fs $(CFIFLAGS)
|
||||||
INCLUDEFLAGS=-I submodules/sqlitemoderncpp/hdr -I submodules/cpp-httplib -I submodules/exile.h
|
INCLUDEFLAGS=-I submodules/sqlitemoderncpp/hdr -I submodules/cpp-httplib -I submodules/exile.h
|
||||||
|
|
||||||
CXX=g++
|
|
||||||
|
|
||||||
|
|
||||||
SOURCES=$(wildcard *.cpp)
|
SOURCES=$(wildcard *.cpp)
|
||||||
SOURCES+=$(wildcard gateway/*.cpp)
|
SOURCES+=$(wildcard gateway/*.cpp)
|
||||||
SOURCES+=$(wildcard handlers/*.cpp)
|
SOURCES+=$(wildcard handlers/*.cpp)
|
||||||
@ -54,7 +56,7 @@ exile.o: submodules/exile.h/exile.c
|
|||||||
$(CC) -std=c99 -DHAVE_LANDLOCK=0 -c submodules/exile.h/exile.c -o exile.o
|
$(CC) -std=c99 -DHAVE_LANDLOCK=0 -c submodules/exile.h/exile.c -o exile.o
|
||||||
|
|
||||||
qswiki: $(WIKIOBJECTS) exile.o
|
qswiki: $(WIKIOBJECTS) exile.o
|
||||||
$(CXX) $(WIKIOBJECTS) exile.o ${LDFLAGS} ${INCLUDEFLAGS} -o qswiki
|
$(CXX) $(shell shuf -e $(WIKIOBJECTS) exile.o ) ${LDFLAGS} ${INCLUDEFLAGS} -o qswiki
|
||||||
|
|
||||||
test: $(TESTOBJECTS)
|
test: $(TESTOBJECTS)
|
||||||
$(CXX) $(TESTOBJECTS) ${LDFLAGS} -o test
|
$(CXX) $(TESTOBJECTS) ${LDFLAGS} -o test
|
||||||
|
Loading…
Reference in New Issue
Block a user