summaryrefslogtreecommitdiffstats
path: root/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/language-bindings/go/samples/build.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 02:57:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 02:57:58 +0000
commitbe1c7e50e1e8809ea56f2c9d472eccd8ffd73a97 (patch)
tree9754ff1ca740f6346cf8483ec915d4054bc5da2d /fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/language-bindings/go/samples/build.sh
parentInitial commit. (diff)
downloadnetdata-be1c7e50e1e8809ea56f2c9d472eccd8ffd73a97.tar.xz
netdata-be1c7e50e1e8809ea56f2c9d472eccd8ffd73a97.zip
Adding upstream version 1.44.3.upstream/1.44.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/language-bindings/go/samples/build.sh')
-rwxr-xr-xfluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/language-bindings/go/samples/build.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/language-bindings/go/samples/build.sh b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/language-bindings/go/samples/build.sh
new file mode 100755
index 00000000..1b0a8071
--- /dev/null
+++ b/fluent-bit/lib/wasm-micro-runtime-WAMR-1.2.2/language-bindings/go/samples/build.sh
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+
+# Copyright (C) 2019 Intel Corporation. All rights reserved.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+PLATFORM=$(uname -s | tr A-Z a-z)
+CUR_DIR=$PWD
+WAMR_DIR=$PWD/../../..
+WAMR_GO_DIR=$PWD/../wamr
+
+cp -a ${WAMR_DIR}/core/iwasm/include/*.h ${WAMR_GO_DIR}/packaged/include
+
+mkdir -p build && cd build
+cmake ${WAMR_DIR}/product-mini/platforms/${PLATFORM} \
+ -DWAMR_BUILD_LIB_PTHREAD=1 -DWAMR_BUILD_DUMP_CALL_STACK=1 \
+ -DWAMR_BUILD_MEMORY_PROFILING=1
+make -j ${nproc}
+cp -a libvmlib.a ${WAMR_GO_DIR}/packaged/lib/${PLATFORM}-amd64
+
+cd ${CUR_DIR}
+rm -f test
+go build test.go
+./test