summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuild11
-rw-r--r--jit-test.c13
-rwxr-xr-xjit-test.sh6
3 files changed, 30 insertions, 0 deletions
diff --git a/build b/build
index 2a40656..497a1e8 100755
--- a/build
+++ b/build
@@ -4,3 +4,14 @@ include ../source.mk
nop:
@:
+
+build:
+ oh-autoconfigure -- \
+ --enable-utf \
+ --enable-unicode-properties \
+ $$(../jit-test.sh)
+ oh-autobuild
+ if [ 'x$(OPK_BUILD_ARCH)' = 'x$(OPK_HOST_ARCH)' ]; then \
+ oh-autobuild -T check; \
+ fi
+ touch $@
diff --git a/jit-test.c b/jit-test.c
new file mode 100644
index 0000000..3c17a65
--- /dev/null
+++ b/jit-test.c
@@ -0,0 +1,13 @@
+#define SLJIT_CONFIG_AUTO 1
+
+#include "tmp/src/sljit/sljitConfigInternal.h"
+
+#ifdef SLJIT_CONFIG_UNSUPPORTED
+#error SLJIT unsupported
+#endif
+
+int
+main(void)
+{
+ return 0;
+}
diff --git a/jit-test.sh b/jit-test.sh
new file mode 100755
index 0000000..bcdfc27
--- /dev/null
+++ b/jit-test.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+if ${CC} -c -o/dev/null "${0%.sh}.c"; then
+ printf '--enable-jit\n'
+fi
+exit 0