mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-06 11:39:32 +00:00
Fix lint issues in build.sh
This commit is contained in:
parent
690b6d8105
commit
5fbe02999c
@ -1,30 +1,31 @@
|
|||||||
#!/bin/bash -eu
|
#!/bin/bash -eu
|
||||||
|
|
||||||
# Build Mestastic and a few needed dependencies using clang++
|
# Build Meshtastic and a few needed dependencies using clang++
|
||||||
# and the OSS-Fuzz required build flags.
|
# and the OSS-Fuzz required build flags.
|
||||||
|
|
||||||
env
|
env
|
||||||
|
|
||||||
cd "$SRC"
|
cd "$SRC"
|
||||||
|
NPROC=$(nproc || echo 1)
|
||||||
|
|
||||||
LDFLAGS=-lpthread cmake -S "$SRC/yaml-cpp" -B "$SRC/yaml-cpp/build" \
|
LDFLAGS=-lpthread cmake -S "$SRC/yaml-cpp" -B "$SRC/yaml-cpp/build" \
|
||||||
-DBUILD_SHARED_LIBS=OFF
|
-DBUILD_SHARED_LIBS=OFF
|
||||||
cmake --build "$SRC/yaml-cpp/build" -j "$(nproc)"
|
cmake --build "$SRC/yaml-cpp/build" -j "$NPROC"
|
||||||
cmake --install "$SRC/yaml-cpp/build" --prefix /usr
|
cmake --install "$SRC/yaml-cpp/build" --prefix /usr
|
||||||
|
|
||||||
cmake -S "$SRC/orcania" -B "$SRC/orcania/build" \
|
cmake -S "$SRC/orcania" -B "$SRC/orcania/build" \
|
||||||
-DBUILD_STATIC=ON
|
-DBUILD_STATIC=ON
|
||||||
cmake --build "$SRC/orcania/build" -j "$(nproc)"
|
cmake --build "$SRC/orcania/build" -j "$NPROC"
|
||||||
cmake --install "$SRC/orcania/build" --prefix /usr
|
cmake --install "$SRC/orcania/build" --prefix /usr
|
||||||
|
|
||||||
cmake -S "$SRC/yder" -B "$SRC/yder/build" \
|
cmake -S "$SRC/yder" -B "$SRC/yder/build" \
|
||||||
-DBUILD_STATIC=ON -DWITH_JOURNALD=OFF
|
-DBUILD_STATIC=ON -DWITH_JOURNALD=OFF
|
||||||
cmake --build "$SRC/yder/build" -j "$(nproc)"
|
cmake --build "$SRC/yder/build" -j "$NPROC"
|
||||||
cmake --install "$SRC/yder/build" --prefix /usr
|
cmake --install "$SRC/yder/build" --prefix /usr
|
||||||
|
|
||||||
cmake -S "$SRC/ulfius" -B "$SRC/ulfius/build" \
|
cmake -S "$SRC/ulfius" -B "$SRC/ulfius/build" \
|
||||||
-DBUILD_STATIC=ON -DWITH_JANSSON=OFF -DWITH_CURL=OFF -DWITH_WEBSOCKET=OFF
|
-DBUILD_STATIC=ON -DWITH_JANSSON=OFF -DWITH_CURL=OFF -DWITH_WEBSOCKET=OFF
|
||||||
cmake --build "$SRC/ulfius/build" -j "$(nproc)"
|
cmake --build "$SRC/ulfius/build" -j "$NPROC"
|
||||||
cmake --install "$SRC/ulfius/build" --prefix /usr
|
cmake --install "$SRC/ulfius/build" --prefix /usr
|
||||||
|
|
||||||
cd "$SRC/firmware"
|
cd "$SRC/firmware"
|
||||||
@ -52,7 +53,8 @@ for f in .clusterfuzzlite/*_fuzzer.cpp; do
|
|||||||
cp ".pio/build/$PIO_ENV/program" "$OUT/$fuzzer"
|
cp ".pio/build/$PIO_ENV/program" "$OUT/$fuzzer"
|
||||||
|
|
||||||
# Copy shared libraries used by the fuzzer.
|
# Copy shared libraries used by the fuzzer.
|
||||||
cp -f $(ldd ".pio/build/$PIO_ENV/program" | sed -n 's/[^=]\+=> \([^ ]\+\).*/\1/p') "$OUT/lib/"
|
read -ra shared_libs < <(ldd ".pio/build/$PIO_ENV/program" | sed -n 's/[^=]\+=> \([^ ]\+\).*/\1/p')
|
||||||
|
cp -f "${shared_libs[@]}" "$OUT/lib/"
|
||||||
|
|
||||||
# Build the initial fuzzer seed corpus.
|
# Build the initial fuzzer seed corpus.
|
||||||
corpus_name="${fuzzer}_seed_corpus"
|
corpus_name="${fuzzer}_seed_corpus"
|
||||||
|
Loading…
Reference in New Issue
Block a user