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