@@ -35,13 +35,6 @@ ifneq ($(LTO),no)
35
35
CLANG_VERSION ?= $(shell ${CC} -dumpversion)
36
36
override OBJDIR := $(OBJDIR ) /llvm-lto/$(CLANG_VERSION )
37
37
endif
38
- # The directory where we store files and tools for generating WASIp2 bindings
39
- BINDING_WORK_DIR ?= build/bindings
40
- # URL from which to retrieve the WIT files used to generate the WASIp2 bindings
41
- WASI_CLI_URL ?= https://github.com/WebAssembly/wasi-cli/archive/refs/tags/v0.2.0.tar.gz
42
- # URL from which to retrieve the `wit-bindgen` command used to generate the
43
- # WASIp2 bindings.
44
- WIT_BINDGEN_URL ?= https://github.com/bytecodealliance/wit-bindgen/releases/download/wit-bindgen-cli-0.17.0/wit-bindgen-v0.17.0-x86_64-linux.tar.gz
45
38
46
39
# When the length is no larger than this threshold, we consider the
47
40
# overhead of bulk memory opcodes to outweigh the performance benefit,
@@ -926,6 +919,10 @@ finish: check-symbols
926
919
endif
927
920
endif
928
921
922
+ install : finish
923
+ mkdir -p " $( INSTALL_DIR) "
924
+ cp -r " $( SYSROOT) /lib" " $( SYSROOT) /share" " $( SYSROOT) /include" " $( INSTALL_DIR) "
925
+
929
926
DEFINED_SYMBOLS = $(SYSROOT_SHARE ) /defined-symbols.txt
930
927
UNDEFINED_SYMBOLS = $(SYSROOT_SHARE ) /undefined-symbols.txt
931
928
@@ -1053,9 +1050,19 @@ check-symbols: $(STARTUP_FILES) libc
1053
1050
# This ignores whitespace because on Windows the output has CRLF line endings.
1054
1051
diff -wur "$(EXPECTED_TARGET_DIR)" "$(SYSROOT_SHARE)"
1055
1052
1056
- install : finish
1057
- mkdir -p " $( INSTALL_DIR) "
1058
- cp -r " $( SYSROOT) /lib" " $( SYSROOT) /share" " $( SYSROOT) /include" " $( INSTALL_DIR) "
1053
+
1054
+ # #### BINDINGS #################################################################
1055
+ # The `bindings` target retrieves the necessary WIT files for the wasi-cli world
1056
+ # and generates a header file used by the wasip2 target.
1057
+ # ###############################################################################
1058
+
1059
+ # The directory where we store files and tools for generating WASIp2 bindings
1060
+ BINDING_WORK_DIR ?= build/bindings
1061
+ # URL from which to retrieve the WIT files used to generate the WASIp2 bindings
1062
+ WASI_CLI_URL ?= https://github.com/WebAssembly/wasi-cli/archive/refs/tags/v0.2.0.tar.gz
1063
+ # URL from which to retrieve the `wit-bindgen` command used to generate the
1064
+ # WASIp2 bindings.
1065
+ WIT_BINDGEN_URL ?= https://github.com/bytecodealliance/wit-bindgen/releases/download/wit-bindgen-cli-0.17.0/wit-bindgen-v0.17.0-x86_64-linux.tar.gz
1059
1066
1060
1067
$(BINDING_WORK_DIR ) /wasi-cli :
1061
1068
mkdir -p " $( BINDING_WORK_DIR) "
0 commit comments