@@ -35,13 +35,6 @@ ifneq ($(LTO),no)
3535CLANG_VERSION ?= $(shell ${CC} -dumpversion)
3636override OBJDIR := $(OBJDIR ) /llvm-lto/$(CLANG_VERSION )
3737endif
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
4538
4639# When the length is no larger than this threshold, we consider the
4740# overhead of bulk memory opcodes to outweigh the performance benefit,
@@ -926,6 +919,10 @@ finish: check-symbols
926919endif
927920endif
928921
922+ install : finish
923+ mkdir -p " $( INSTALL_DIR) "
924+ cp -r " $( SYSROOT) /lib" " $( SYSROOT) /share" " $( SYSROOT) /include" " $( INSTALL_DIR) "
925+
929926DEFINED_SYMBOLS = $(SYSROOT_SHARE ) /defined-symbols.txt
930927UNDEFINED_SYMBOLS = $(SYSROOT_SHARE ) /undefined-symbols.txt
931928
@@ -1053,9 +1050,19 @@ check-symbols: $(STARTUP_FILES) libc
10531050 # This ignores whitespace because on Windows the output has CRLF line endings.
10541051 diff -wur "$(EXPECTED_TARGET_DIR)" "$(SYSROOT_SHARE)"
10551052
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
10591066
10601067$(BINDING_WORK_DIR ) /wasi-cli :
10611068 mkdir -p " $( BINDING_WORK_DIR) "
0 commit comments