diff options
author | Ben Smith <binji@chromium.org> | 2015-11-18 14:53:02 -0800 |
---|---|---|
committer | Ben Smith <binji@chromium.org> | 2015-12-03 17:04:35 -0800 |
commit | b52ec9837de5f2ecf7eec6c9e36a359709ccfca5 (patch) | |
tree | 28776c0f02d3b9455e2147f1f12b9b83d1e91e36 /Makefile | |
parent | 0154e0e1615ce75a06bf396b5978b7c3e7c089f6 (diff) | |
download | wabt-b52ec9837de5f2ecf7eec6c9e36a359709ccfca5.tar.gz wabt-b52ec9837de5f2ecf7eec6c9e36a359709ccfca5.tar.bz2 wabt-b52ec9837de5f2ecf7eec6c9e36a359709ccfca5.zip |
fix clang build
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -4,6 +4,7 @@ ALL = sexpr-wasm EVERYHING = $(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,$@) +LIBS = -ll ASAN_FLAGS = -fsanitize=address MSAN_FLAGS = -fsanitize=memory LSAN_FLAGS = -fsanitize=leak @@ -32,28 +33,25 @@ src/wasm-parser.c src/wasm-parser.h: src/wasm-parser.y $(OBJS): out/%.o: src/%.c | out $(CC) $(CFLAGS) -c -o $@ $(DEPEND_FLAGS) $< out/sexpr-wasm: $(OBJS) | out - $(CC) -o $@ $^ -ll + $(CC) -o $@ $^ ${LIBS} # ASAN $(ASAN_OBJS): out/%.asan.o: src/%.c | out clang $(ASAN_FLAGS) $(CFLAGS) -c -o $@ $(DEPEND_FLAGS) $< out/sexpr-wasm-asan: $(ASAN_OBJS) | out - clang $(ASAN_FLAGS) -o $@ $^ + clang $(ASAN_FLAGS) -o $@ $^ ${LIBS} # MSAN $(MSAN_OBJS): out/%.msan.o: src/%.c | out clang $(MSAN_FLAGS) $(CFLAGS) -c -o $@ $(DEPEND_FLAGS) $< out/sexpr-wasm-msan: $(MSAN_OBJS) | out - clang $(MSAN_FLAGS) -o $@ $^ + clang $(MSAN_FLAGS) -o $@ $^ ${LIBS} # LSAN $(LSAN_OBJS): out/%.lsan.o: src/%.c | out clang $(LSAN_FLAGS) $(CFLAGS) -c -o $@ $(DEPEND_FLAGS) $< out/sexpr-wasm-lsan: $(LSAN_OBJS) | out - clang $(LSAN_FLAGS) -o $@ $^ - -src/wasm-keywords.h: src/wasm-keywords.gperf - gperf --compare-strncmp --readonly-tables --struct-type $< --output-file $@ + clang $(LSAN_FLAGS) -o $@ $^ ${LIBS} -include $(OBJS:.o=.d) $(ASAN_OBJS:.o=.d) $(MSAN_OBJS:.o=.d) $(LSAN_OBJS:.o=.d) |