1DOLLY 72TOOLCHAIN zig-build3REQUIRES HOST runtime@04REQUIRES HOST http@056FROM /v0.1.4/Dollyfile-system-build 7997c05ba08220831088b2aa713c86dbf0ded0229bbfa84f411476f00269d9fc78# Zig from its source archive with only Dolly's cc, following upstream9# bootstrap.c with two substitutions. WAMR runs the zig1.wasm seed instead of10# wasm2c + cc, whose code overflows a browser Worker's native stack. zig2 keeps11# only the C backend (/tmp/zig/config.zig), the one that yields Dolly objects12# without LLVM: this zig emits C for cc and has no `zig build` or `zig cc`.13REQUIRES HEADER libc14REQUIRES TOOL   cc15REQUIRES TOOL   tar1617SOURCE /v0.1.4/dist/static/default/zig.tar  ecb90770bd24a400120a74903557134642902eb4656d1f7dd3fe5a9eebb11943 /tmp/zig.tar18SOURCE /v0.1.4/dist/static/default/wamr.tar d35ec64a48e61f6a65397d3d9f13823735a94623a9dcd007b093279e5e0e3615 /tmp/wamr.tar19SLOP tar \20  -xf /tmp/zig.tar \21  -C /22SLOP tar \23  -xf /tmp/wamr.tar \24  -C /2526# WAMR's target is WebAssembly (config/wamr-dolly.patch), which has no native27# calling convention: only raw natives can be called, and zig1 binds only those.28SLOP CWD /tmp/wamr/core cc \29  -O2 \30  -std=gnu99 \31  -fno-strict-aliasing \32  -w \33  -D_PLATFORM_WASI_TYPES_H \34  -DBH_PLATFORM_DOLLY \35  -DBH_MALLOC=wasm_runtime_malloc \36  -DBH_FREE=wasm_runtime_free \37  -DWA_MALLOC=wasm_runtime_malloc \38  -DWA_FREE=wasm_runtime_free \39  -DWASM_ENABLE_INTERP=1 \40  -DWASM_ENABLE_FAST_INTERP=1 \41  -DWASM_ENABLE_LABELS_AS_VALUES=0 \42  -DWASM_CPU_SUPPORTS_UNALIGNED_ADDR_ACCESS=0 \43  -DWASM_ENABLE_BULK_MEMORY=1 \44  -DWASM_ENABLE_BULK_MEMORY_OPT=1 \45  -DWASM_ENABLE_SHRUNK_MEMORY=1 \46  -DWASM_DISABLE_HW_BOUND_CHECK=1 \47  -DWASM_DISABLE_STACK_HW_BOUND_CHECK=1 \48  -DWASM_DISABLE_WRITE_GS_BASE=1 \49  -DWASM_DISABLE_WAKEUP_BLOCKING_OP=1 \50  -DWASM_ENABLE_SHARED_MEMORY=0 \51  -DWASM_ENABLE_MULTI_MODULE=0 \52  -DWASM_ENABLE_MINI_LOADER=0 \53  -DWASM_ENABLE_REF_TYPES=0 \54  -DWASM_ENABLE_SIMD=0 \55  -DWASM_ENABLE_EXTENDED_CONST_EXPR=0 \56  -DWASM_ENABLE_MEMORY64=0 \57  -I /tmp/wamr \58  -I /tmp/zig/stage1 \59  -I shared/platform/include \60  -I shared/utils \61  -I shared/mem-alloc \62  -I iwasm/include \63  -I iwasm/common \64  -I iwasm/interpreter \65  /tmp/wamr/zig1.c \66  /tmp/wamr/wamr-platform.c \67  shared/mem-alloc/mem_alloc.c \68  shared/mem-alloc/ems/ems_alloc.c \69  shared/mem-alloc/ems/ems_gc.c \70  shared/mem-alloc/ems/ems_hmu.c \71  shared/mem-alloc/ems/ems_kfc.c \72  shared/utils/bh_assert.c \73  shared/utils/bh_bitmap.c \74  shared/utils/bh_common.c \75  shared/utils/bh_hashmap.c \76  shared/utils/bh_leb128.c \77  shared/utils/bh_list.c \78  shared/utils/bh_log.c \79  shared/utils/bh_queue.c \80  shared/utils/bh_vector.c \81  shared/utils/runtime_timer.c \82  iwasm/common/wasm_application.c \83  iwasm/common/wasm_blocking_op.c \84  iwasm/common/wasm_c_api.c \85  iwasm/common/wasm_exec_env.c \86  iwasm/common/wasm_loader_common.c \87  iwasm/common/wasm_memory.c \88  iwasm/common/wasm_native.c \89  iwasm/common/wasm_runtime_common.c \90  iwasm/common/wasm_shared_memory.c \91  iwasm/interpreter/wasm_interp_fast.c \92  iwasm/interpreter/wasm_loader.c \93  iwasm/interpreter/wasm_runtime.c \94  -o /tmp/zig/zig19596# zig1's WASI adapter reaches only its working directory and lib argument.97SLOP CWD / /tmp/zig/zig1 \98  /tmp/zig/stage1/zig1.wasm \99  /usr/lib/zig \100  build-exe \101  -target wasm64-emscripten \102  -mcpu=generic+atomics \103  -fsingle-threaded \104  -OReleaseSmall \105  -ofmt=c \106  -lc \107  --name zig2 \108  -femit-bin=tmp/zig/zig2.c \109  --dep build_options \110  --dep aro \111  -Mroot=tmp/zig/src/main.zig \112  -Mbuild_options=tmp/zig/config.zig \113  -Maro=usr/lib/zig/compiler/aro/aro.zig114SLOP CWD / /tmp/zig/zig1 \115  /tmp/zig/stage1/zig1.wasm \116  /usr/lib/zig \117  build-obj \118  -target wasm64-emscripten \119  -mcpu=generic+atomics \120  -fsingle-threaded \121  -OReleaseSmall \122  -ofmt=c \123  --name compiler_rt \124  -femit-bin=tmp/zig/compiler_rt.c \125  -Mroot=usr/lib/zig/compiler_rt.zig126127# zig.h passes usize (unsigned long) as uint64_t * (unsigned long long *) and,128# not recognizing Clang's wasm memory builtins, names an undefined129# zig_unimplemented().130SLOP CWD /tmp/zig cc \131  -c \132  -O2 \133  -std=c99 \134  -fno-strict-aliasing \135  -Wno-incompatible-pointer-types \136  '-Dzig_unimplemented()=(__builtin_trap(),0)' \137  -I /usr/lib/zig \138  -o zig2.o \139  zig2.c140SLOP CWD /tmp/zig cc \141  -c \142  -O2 \143  -std=c99 \144  -fno-strict-aliasing \145  -Wno-incompatible-pointer-types \146  -I /usr/lib/zig \147  -o compiler_rt.o \148  compiler_rt.c149SLOP CWD /tmp/zig cc \150  -o /usr/bin/zig \151  zig2.o \152  compiler_rt.o153154EXPORTS TOOL   zig155EXPORTS FOLDER zig-lib     /usr/lib/zig156EXPORTS ENV    ZIG_LIB_DIR /usr/lib/zig157FILE /usr/share/licenses/zig/LICENSE158