summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBen Smith <binji@chromium.org>2016-02-26 17:25:46 -0800
committerBen Smith <binji@chromium.org>2016-02-26 17:30:38 -0800
commit1596a6a2a657c17e4b66afa5fe793e222df44fb3 (patch)
treeeece1fd68707fcfc8346989567639c7fa60d9d3c /Makefile
parent414dec24c373c5be4dcde89541f687ea554325e4 (diff)
downloadwabt-1596a6a2a657c17e4b66afa5fe793e222df44fb3.tar.gz
wabt-1596a6a2a657c17e4b66afa5fe793e222df44fb3.tar.bz2
wabt-1596a6a2a657c17e4b66afa5fe793e222df44fb3.zip
add optimized build
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 712f1b6b..4830a170 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@
.SUFFIXES:
-ALL = sexpr-wasm
+ALL = sexpr-wasm sexpr-wasm-opt
EVERYTHING = $(ALL) sexpr-wasm-asan sexpr-wasm-msan sexpr-wasm-lsan
CFLAGS = -Wall -Werror -g -Wno-unused-function -Wno-return-type
DEPEND_FLAGS = -MMD -MP -MF $(patsubst %.o,%.d,$@)
@@ -32,6 +32,11 @@ SEXPR_WASM_SRCS := \
wasm-check.c wasm-writer.c wasm-binary-writer.c wasm-allocator.c \
wasm-stack-allocator.c wasm-ast.c
+SEXPR_WASM_OPT_CC := $(CC)
+SEXPR_WASM_OPT_CFLAGS := $(CFLAGS) -O3
+SEXPR_WASM_OPT_LDFLAGS :=
+SEXPR_WASM_OPT_SRCS := $(SEXPR_WASM_SRCS)
+
ASAN_FLAGS := -fsanitize=address
SEXPR_WASM_ASAN_CC := clang
SEXPR_WASM_ASAN_CFLAGS := $(ASAN_FLAGS) $(CFLAGS)
@@ -86,6 +91,7 @@ out/$(1): $$($(2)_OBJS) | out
endef
$(eval $(call EXE,sexpr-wasm,SEXPR_WASM))
+$(eval $(call EXE,sexpr-wasm-opt,SEXPR_WASM_OPT))
$(eval $(call EXE,sexpr-wasm-asan,SEXPR_WASM_ASAN))
$(eval $(call EXE,sexpr-wasm-msan,SEXPR_WASM_MSAN))
$(eval $(call EXE,sexpr-wasm-lsan,SEXPR_WASM_LSAN))