libyang: simplify options and include dirs (#11799)

Should also fix the build error.
This commit is contained in:
Michal Vasko 2024-04-11 15:15:00 +02:00 committed by GitHub
parent 61608e0ad8
commit 886b9b8d3f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 3 deletions

View File

@ -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