aboutsummaryrefslogtreecommitdiff
path: root/projects/spidermonkey
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2017-11-05 18:48:44 -0500
committerOliver Chang <oliverchang@users.noreply.github.com>2017-11-06 10:48:44 +1100
commit18ffe5a3cdda206f375a694eec85ba1364852d29 (patch)
tree2b0c9787a4d9327d46dcc533711be70858917b00 /projects/spidermonkey
parentbcacae36dce0c934dccd250892613ee217a3b69a (diff)
downloadoss-fuzz-18ffe5a3cdda206f375a694eec85ba1364852d29.tar.gz
Refs #925 -- Added build for spidermonkey (#950)
* Refs #925 -- Added build for spidermonkey * review feedback * Switch to the git mirror git has --depth, which lets us speed up clones. we can switch to the hg upstream once @durin42 implements shallow clones for hg :-) * Clone this as m-c
Diffstat (limited to 'projects/spidermonkey')
-rw-r--r--projects/spidermonkey/Dockerfile25
-rwxr-xr-xprojects/spidermonkey/build.sh34
-rw-r--r--projects/spidermonkey/project.yaml6
3 files changed, 65 insertions, 0 deletions
diff --git a/projects/spidermonkey/Dockerfile b/projects/spidermonkey/Dockerfile
new file mode 100644
index 000000000..53009193f
--- /dev/null
+++ b/projects/spidermonkey/Dockerfile
@@ -0,0 +1,25 @@
+# Copyright 2017 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 agaynor@mozilla.com
+RUN apt-get update && apt-get install -y \
+ autoconf2.13 \
+ yasm
+
+RUN git clone --depth=1 https://github.com/mozilla/gecko-dev mozilla-central
+WORKDIR mozilla-central/js/src/
+COPY build.sh $SRC/
diff --git a/projects/spidermonkey/build.sh b/projects/spidermonkey/build.sh
new file mode 100755
index 000000000..8c4774b18
--- /dev/null
+++ b/projects/spidermonkey/build.sh
@@ -0,0 +1,34 @@
+#!/bin/bash -eu
+# Copyright 2017 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.
+#
+################################################################################
+
+# Required for some reason... I don't ask questions
+export SHELL=/bin/bash
+
+autoconf2.13
+
+mkdir build_DBG.OBJ
+cd build_DBG.OBJ
+
+../configure \
+ --enable-debug \
+ --disable-shared-js \
+ --disable-jemalloc \
+ --enable-address-sanitizer
+
+make
+
+cp dist/bin/js $OUT
diff --git a/projects/spidermonkey/project.yaml b/projects/spidermonkey/project.yaml
new file mode 100644
index 000000000..1022b0caf
--- /dev/null
+++ b/projects/spidermonkey/project.yaml
@@ -0,0 +1,6 @@
+homepage: "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
+primary_contact: "agaynor@mozilla.com"
+fuzzing_engines:
+ - none
+sanitizers:
+ - address