aboutsummaryrefslogtreecommitdiffhomepage
path: root/projects/hermes
diff options
context:
space:
mode:
authorGravatar neildhar <neildhar@users.noreply.github.com>2020-05-21 19:46:47 -0700
committerGravatar GitHub <noreply@github.com>2020-05-21 19:46:47 -0700
commitb5a6683cc353ca23d2de5086cf7755c89bb60a57 (patch)
tree32b2499e9baf2cc4338191c179a35c3674bcc78b /projects/hermes
parentf8a00efe4c71ced9472551f118cce91295605932 (diff)
[hermes] Initial setup for Hermes (#3698)
Diffstat (limited to 'projects/hermes')
-rw-r--r--projects/hermes/Dockerfile28
-rwxr-xr-xprojects/hermes/build.sh29
-rw-r--r--projects/hermes/project.yaml13
3 files changed, 70 insertions, 0 deletions
diff --git a/projects/hermes/Dockerfile b/projects/hermes/Dockerfile
new file mode 100644
index 00000000..d88b2cd8
--- /dev/null
+++ b/projects/hermes/Dockerfile
@@ -0,0 +1,28 @@
+# Copyright 2020 Google Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+################################################################################
+
+FROM gcr.io/oss-fuzz-base/base-builder
+MAINTAINER neildhar@fb.com
+RUN apt-get update && \
+ apt-get install -y make autoconf automake libtool wget libicu-dev \
+ ninja-build 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; \
+ ./cmake-3.16.6-Linux-x86_64.sh --skip-license --prefix="/usr/local"
+RUN git clone https://github.com/facebook/hermes.git
+WORKDIR hermes
+COPY build.sh $SRC/
diff --git a/projects/hermes/build.sh b/projects/hermes/build.sh
new file mode 100755
index 00000000..015cf99c
--- /dev/null
+++ b/projects/hermes/build.sh
@@ -0,0 +1,29 @@
+#!/bin/bash -eu
+# Copyright 2020 Google Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+################################################################################
+
+if [ "${SANITIZER}" = address ]
+then
+ CONFIGURE_FLAGS="--enable-asan"
+elif [ "${SANITIZER}" = undefined ]
+then
+ CONFIGURE_FLAGS="--enable-ubsan"
+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}"
+cmake --build "$OUT/build" --parallel --target fuzzer-jsi-entry
+cp "${OUT}/build/bin/fuzzer-jsi-entry" "${OUT}"
diff --git a/projects/hermes/project.yaml b/projects/hermes/project.yaml
new file mode 100644
index 00000000..6a0ace6b
--- /dev/null
+++ b/projects/hermes/project.yaml
@@ -0,0 +1,13 @@
+homepage: "https://github.com/facebook/hermes"
+language: c++
+primary_contact: "neildhar@fb.com"
+auto_ccs:
+ - "dulinr@fb.com"
+vendor_ccs:
+ - "oss-fuzz@fb.com"
+fuzzing_engines:
+ - libfuzzer
+ - afl
+sanitizers:
+ - address
+ - undefined