diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2019-05-08 16:35:18 +0200 |
---|---|---|
committer | Max Moroz <mmoroz@chromium.org> | 2019-05-08 07:35:18 -0700 |
commit | 2b6fc9a9436f1ff7381b0f859a75481229c92e02 (patch) | |
tree | 44e2931371e34cc83c150abb50005a344445c26e /projects/libxslt | |
parent | c73a4b3ff2205f4ca3e0337cc6c846a8dd376172 (diff) | |
download | oss-fuzz-2b6fc9a9436f1ff7381b0f859a75481229c92e02.tar.gz |
[libxslt] Adjust build script (#2389)
- Link targets with fuzz.o
- Move code block for readability
Diffstat (limited to 'projects/libxslt')
-rwxr-xr-x | projects/libxslt/build.sh | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/projects/libxslt/build.sh b/projects/libxslt/build.sh index 4257c4f96..25700085d 100755 --- a/projects/libxslt/build.sh +++ b/projects/libxslt/build.sh @@ -21,11 +21,6 @@ if [ "$SANITIZER" = undefined ]; then export CXXFLAGS="$CXXFLAGS -fno-sanitize=unsigned-integer-overflow,float-divide-by-zero" fi -cd ../libxml2 -./autogen.sh --without-python --disable-shared -make -j$(nproc) V=1 - -cd ../libxslt if [ "$SANITIZER" = memory ]; then # This would require an instrumented libgcrypt build. CRYPTO_CONF=--without-crypto @@ -34,19 +29,28 @@ else CRYPTO_CONF=--with-crypto CRYPTO_LIBS=-lgcrypt fi + +cd ../libxml2 +./autogen.sh --without-python --disable-shared +make -j$(nproc) V=1 + +cd ../libxslt ./autogen.sh --without-python $CRYPTO_CONF --disable-shared \ --with-libxml-src=../libxml2 make -j$(nproc) V=1 -for fuzzer in xpath xslt; do +for file in xpath xslt fuzz; do # Compile as C $CC $CFLAGS \ -I. -I../libxml2/include \ - -c tests/fuzz/$fuzzer.c \ - -o tests/fuzz/$fuzzer.o \ + -c tests/fuzz/$file.c \ + -o tests/fuzz/$file.o +done + +for fuzzer in xpath xslt; do # Link with $CXX $CXX $CXXFLAGS \ - tests/fuzz/$fuzzer.o \ + tests/fuzz/$fuzzer.o tests/fuzz/fuzz.o \ -o $OUT/$fuzzer \ $LIB_FUZZING_ENGINE \ libexslt/.libs/libexslt.a libxslt/.libs/libxslt.a \ |