aboutsummaryrefslogtreecommitdiffhomepage
path: root/projects/oniguruma/build.sh
diff options
context:
space:
mode:
authorGravatar K.Kosako <kkosako0@gmail.com>2020-04-30 10:17:46 +0900
committerGravatar GitHub <noreply@github.com>2020-04-29 18:17:46 -0700
commit6527c33b77cd78f8de27d19a1f9b1f6c5e24581b (patch)
tree33aafea826277c075bedff5430026bdafaa3a7b0 /projects/oniguruma/build.sh
parent1acee225473f90da0c6e5ad8b985c9f02fbbeb83 (diff)
Add project oniguruma (#3730)
* add projects/oniguruma * add language into project.yaml * update by review * revert some previous changes to pass the Travis tests
Diffstat (limited to 'projects/oniguruma/build.sh')
-rwxr-xr-xprojects/oniguruma/build.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/projects/oniguruma/build.sh b/projects/oniguruma/build.sh
new file mode 100755
index 00000000..4ebd5c1e
--- /dev/null
+++ b/projects/oniguruma/build.sh
@@ -0,0 +1,33 @@
+#!/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.
+#
+################################################################################
+
+# build project
+./autogen.sh
+./configure
+make clean
+make -j$(nproc)
+
+FUZZ_SRCDIR=harnesses
+FUZZ_TARGET=fuzzer
+
+# build fuzzer
+$CC $CFLAGS -o $FUZZ_SRCDIR/fuzzer_syntax.o -I src -c -DSYNTAX_TEST $FUZZ_SRCDIR/base.c
+$CXX $CXXFLAGS -o $OUT/$FUZZ_TARGET $FUZZ_SRCDIR/fuzzer_syntax.o $LIB_FUZZING_ENGINE src/.libs/libonig.a
+
+# setup files
+cp $FUZZ_SRCDIR/$FUZZ_TARGET.options $OUT/
+cp $FUZZ_SRCDIR/ascii_compatible.dict $OUT/$FUZZ_TARGET.dict