Skip to content

Commit

Permalink
Update build.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
neildhar committed May 21, 2020
1 parent 7cd2579 commit 4958de3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
4 changes: 2 additions & 2 deletions projects/hermes/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
FROM gcr.io/oss-fuzz-base/base-builder
MAINTAINER [email protected]
RUN apt-get update && \
apt-get install -y make autoconf automake libtool wget ninja-build \
libicu-dev python zip libreadline-dev libatomic-ops-dev
apt-get install -y make autoconf automake libtool wget libicu-dev \
python zip libreadline-dev libatomic-ops-dev
# Install cmake
RUN wget https://github.com/Kitware/CMake/releases/download/v3.16.6/cmake-3.16.6-Linux-x86_64.sh; \
chmod +x cmake-3.16.6-Linux-x86_64.sh; \
Expand Down
16 changes: 6 additions & 10 deletions projects/hermes/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,15 @@
#
################################################################################

CONFIGURE_FLAGS="--oss-fuzz"
BUILD_DIR_SUFFIX=""
if [ "${SANITIZER}" = address ]
then
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --enable-asan"
BUILD_DIR_SUFFIX="_asan"
CONFIGURE_FLAGS="--enable-asan"
elif [ "${SANITIZER}" = undefined ]
then
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --enable-ubsan"
BUILD_DIR_SUFFIX="_ubsan"
CONFIGURE_FLAGS="--enable-ubsan"
fi

./utils/build/configure.py $OUT/build --oss-fuzz $CONFIGURE_FLAGS
cd $OUT/build${BUILD_DIR_SUFFIX}
ninja fuzzer
cp fuzzers/fuzzer $OUT
./utils/build/configure.py "${OUT}/build" --build-system "Unix Makefiles" ${CONFIGURE_FLAGS} \
--cmake-flags="-DHERMES_USE_STATIC_ICU=ON -DHERMES_FUZZING_FLAG=${LIB_FUZZING_ENGINE}"
cmake --build "$OUT/build" --parallel --target fuzzer-jsi-entry
cp "${OUT}/build/bin/fuzzer-jsi-entry" "${OUT}"
2 changes: 1 addition & 1 deletion projects/hermes/project.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
homepage: "https://github.com/facebook/hermes"
language: C++
language: c++
primary_contact: "[email protected]"
auto_ccs:
- "[email protected]"
Expand Down

0 comments on commit 4958de3

Please sign in to comment.