]> wimlib.net Git - wimlib/commitdiff
Add tools/clang-build-with-cfi
authorEric Biggers <ebiggers3@gmail.com>
Sat, 28 Jan 2017 23:14:23 +0000 (15:14 -0800)
committerEric Biggers <ebiggers3@gmail.com>
Sun, 29 Jan 2017 09:21:14 +0000 (01:21 -0800)
tools/clang-build-with-cfi [new file with mode: 0755]

diff --git a/tools/clang-build-with-cfi b/tools/clang-build-with-cfi
new file mode 100755 (executable)
index 0000000..1a04198
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -evu
+
+./configure CC=clang --enable-test-support
+
+ARGS=(-fsanitize=cfi -fsanitize=safe-stack
+       -flto -fvisibility=hidden
+       -O3 -std=c99 -Wall -Wno-pointer-sign
+       -D_GNU_SOURCE -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64
+       -Iinclude -I. -I/usr/include/libxml2
+       -lntfs-3g -lxml2 -lfuse -lpthread -lrt -lcrypto)
+
+clang src/*.c programs/imagex.c -o wimlib-imagex "${ARGS[@]}"
+clang src/*.c tests/wlfuzz.c -o wlfuzz "${ARGS[@]}"