mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
Allows additional C(XX)FLAGS to be passed through command line (#142)
* Allow passing additional compiler flags through command line * Simplify branching for compiler flags * Optimize for debug while debugging or sanitizing specified
This commit is contained in:
committed by
Daniel Lemire
parent
d4c03ce6cf
commit
f4a06036c6
@@ -7,19 +7,16 @@
|
||||
.PHONY: clean cleandist
|
||||
COREDEPSINCLUDE = -Idependencies/rapidjson/include -Idependencies/sajson/include -Idependencies/cJSON -Idependencies/jsmn
|
||||
EXTRADEPSINCLUDE = -Idependencies/jsoncppdist -Idependencies/json11 -Idependencies/fastjson/src -Idependencies/fastjson/include -Idependencies/gason/src -Idependencies/ujson4c/3rdparty -Idependencies/ujson4c/src
|
||||
CXXFLAGS = -std=c++17 -march=native -Wall -Wextra -Wshadow -Iinclude -Ibenchmark/linux
|
||||
CFLAGS = -march=native -Idependencies/ujson4c/3rdparty -Idependencies/ujson4c/src
|
||||
CXXFLAGS := $(CXXFLAGS) -std=c++17 -march=native -Wall -Wextra -Wshadow -Iinclude -Ibenchmark/linux -O3
|
||||
CFLAGS := $(CFLAGS) -march=native -Idependencies/ujson4c/3rdparty -Idependencies/ujson4c/src -O3
|
||||
|
||||
ifeq ($(SANITIZE),1)
|
||||
CXXFLAGS += -g3 -O0 -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined
|
||||
CFLAGS += -g3 -O0 -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined
|
||||
else
|
||||
ifeq ($(DEBUG),1)
|
||||
CXXFLAGS += -g3 -O0
|
||||
CFLAGS += -g3 -O0
|
||||
else
|
||||
CXXFLAGS += -O3
|
||||
CFLAGS += -O3
|
||||
CXXFLAGS += -g3 -Og -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined
|
||||
CFLAGS += -g3 -Og -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined
|
||||
endif
|
||||
ifeq ($(DEBUG),1)
|
||||
CXXFLAGS += -g3 -Og
|
||||
CFLAGS += -g3 -Og
|
||||
endif
|
||||
|
||||
MAINEXECUTABLES=parse minify json2json jsonstats statisticalmodel
|
||||
|
||||
Reference in New Issue
Block a user