Skip to content

Commit

Permalink
libyang: simplify options and include dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvasko committed Apr 11, 2024
1 parent 61608e0 commit da820b6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions projects/libyang/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@
cd libyang
git checkout devel

sed -i 's/add_subdirectory/#add_subdirectory/g' ./tools/CMakeLists.txt
mkdir build && cd build
cmake ../ -DBUILD_SHARED_LIBS=OFF
cmake -DBUILD_SHARED_LIBS=OFF -DENABLE_TOOLS=OFF ..
make

static_pcre=($(find /src/pcre2 -name "libpcre2-8.a"))

for fuzzer in lyd_parse_mem_json lyd_parse_mem_xml lys_parse_mem; do
$CC $CFLAGS -c ../tests/fuzz/${fuzzer}.c -I../src -I../src/plugins_exts -I./src -I./compat
$CC $CFLAGS -c ../tests/fuzz/${fuzzer}.c -I./libyang -I./compat
$CXX $CXXFLAGS $LIB_FUZZING_ENGINE ${fuzzer}.o -o $OUT/${fuzzer} \
./libyang.a ${static_pcre}
done

0 comments on commit da820b6

Please sign in to comment.