Update Hermes build steps (#7534)

* Update Hermes build steps

* Remove cd ${SRC}
This commit is contained in:
neildhar 2022-04-13 06:50:31 -07:00 committed by GitHub
parent 2a7503cff5
commit 1fb0951d4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 7 deletions

View File

@ -30,19 +30,17 @@ ln -s $PWD/libicu.a /usr/lib/x86_64-linux-gnu/libicudata.a
ln -s $PWD/libicu.a /usr/lib/x86_64-linux-gnu/libicuuc.a
ln -s $PWD/libicu.a /usr/lib/x86_64-linux-gnu/libicui18n.a
cd $SRC/hermes
if [ "${SANITIZER}" = address ]
then
CONFIGURE_FLAGS="--enable-asan"
CONFIGURE_FLAGS="-DHERMES_ENABLE_ADDRESS_SANITIZER=ON"
elif [ "${SANITIZER}" = undefined ]
then
CONFIGURE_FLAGS="--enable-ubsan"
CONFIGURE_FLAGS="-DHERMES_ENABLE_UNDEFINED_BEHAVIOR_SANITIZER=ON"
else
CONFIGURE_FLAGS=""
fi
./utils/build/configure.py "${OUT}/build" --build-system "Ninja" ${CONFIGURE_FLAGS} \
--cmake-flags="-DHERMES_USE_STATIC_ICU=ON -DHERMES_FUZZING_FLAG=${LIB_FUZZING_ENGINE} -DHERMES_ENABLE_LIBFUZZER=ON"
cmake --build "$OUT/build" --parallel --target fuzzer-jsi-entry
cmake -S "${SRC}/hermes" -B "${OUT}/build" ${CONFIGURE_FLAGS} -DHERMES_USE_STATIC_ICU=ON \
-DHERMES_FUZZING_FLAG=${LIB_FUZZING_ENGINE} -DHERMES_ENABLE_LIBFUZZER=ON
cmake --build "$OUT/build" --target fuzzer-jsi-entry -j 4
cp "${OUT}/build/bin/fuzzer-jsi-entry" "${OUT}"