File tree Expand file tree Collapse file tree 2 files changed +25
-23
lines changed Expand file tree Collapse file tree 2 files changed +25
-23
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
- # prerequisites
4
- #
5
- # WASI_SDK: wasi-sdk 25.0 or later
6
- # WASM_OPT: binaryen wasm-opt version_117 or later
7
-
8
- # Note:
9
- # we specify the target "--target=wasm32-wasi" explicitly below for the case
10
- # where $CLANG is built with a configuration different from wasi-sdk.
11
- # ditto for "-B ${WASI_SDK}/bin/".
12
-
13
3
set -e
14
4
15
- WASI_SDK=${WASI_SDK:-/ opt/ wasi-sdk-25.0}
16
- WASI_SYSROOT=${WASI_SYSROOT:- ${WASI_SDK} / share/ wasi-sysroot}
17
- WASM_OPT=${WASM_OPT:- wasm-opt}
18
- RESOURCE_DIR=$( ${WASI_SDK} /bin/clang --print-resource-dir)
19
- LLVM_DIR=${LLVM_DIR:- ${WASI_SDK} }
20
- CLANG=${CLANG:- ${LLVM_DIR} / bin/ clang}
21
- CC=" ${CLANG} --sysroot ${WASI_SYSROOT} -resource-dir ${RESOURCE_DIR} "
22
-
23
- CFLAGS=" --target=wasm32-wasi -D_WASI_EMULATED_PROCESS_CLOCKS -D_WASI_EMULATED_SIGNAL -D_WASI_EMULATED_MMAN -mllvm -wasm-enable-sjlj" \
24
- LDFLAGS=" --target=wasm32-wasi -lwasi-emulated-process-clocks -lwasi-emulated-signal -lwasi-emulated-mman -lsetjmp -B ${WASI_SDK} /bin/" \
25
5
make \
26
- CC=" ${CC} " \
27
- STRIP=" ${WASI_SDK} /bin/strip" \
28
- SIZE=" ${WASI_SDK} /bin/size" \
29
6
UNAME_S=wasi \
30
7
VARIANT=wasi \
31
8
" $@ "
Original file line number Diff line number Diff line change
1
+ # prerequisites
2
+ #
3
+ # WASI_SDK: wasi-sdk 25.0 or later
4
+ # WASM_OPT: binaryen wasm-opt version_117 or later
5
+
6
+ # Note:
7
+ # we specify the target "--target=wasm32-wasi" explicitly below for the case
8
+ # where $CLANG is built with a configuration different from wasi-sdk.
9
+ # ditto for "-B ${WASI_SDK}/bin/".
10
+
11
+ WASI_SDK = /opt/wasi-sdk-25.0
12
+ WASI_SYSROOT = $(WASI_SDK ) /share/wasi-sysroot
13
+ WASM_OPT = wasm-opt
14
+ RESOURCE_DIR = $(shell $(WASI_SDK ) /bin/clang --print-resource-dir)
15
+ LLVM_DIR = $(WASI_SDK )
16
+ CLANG = $(LLVM_DIR ) /bin/clang
17
+
18
+ CC = $(CLANG ) --sysroot $(WASI_SYSROOT ) -resource-dir $(RESOURCE_DIR )
19
+ STRIP = $(WASI_SDK ) /bin/strip
20
+ SIZE = $(WASI_SDK ) /bin/size
21
+
22
+ CFLAGS += --target=wasm32-wasi -D_WASI_EMULATED_PROCESS_CLOCKS -D_WASI_EMULATED_SIGNAL -D_WASI_EMULATED_MMAN -mllvm -wasm-enable-sjlj
23
+
24
+ LDFLAGS += --target=wasm32-wasi -lwasi-emulated-process-clocks -lwasi-emulated-signal -lwasi-emulated-mman -lsetjmp -B ${WASI_SDK}/bin/
25
+
1
26
# WASI doesn't have FFI
2
27
MICROPY_PY_FFI = 0
3
28
You can’t perform that action at this time.
0 commit comments