1DOLLY 72TOOLCHAIN zig-llvm-build3REQUIRES HOST runtime@04REQUIRES HOST http@056# Build-only: Zig 0.16 compiled to C as upstream's CMake build makes zig2 for7# LLVM, zig1 (upstream's zig1.wasm, run by WAMR as in zig-build) with8# upstream's stage1/config.zig.in, and cc's objects of it. zig-llvm links9# them with LLVM.10FROM /v0.1.4/Dollyfile-system-build 7997c05ba08220831088b2aa713c86dbf0ded0229bbfa84f411476f00269d9fc11REQUIRES HEADER libc12REQUIRES TOOL   cc13REQUIRES TOOL   tar14REQUIRES TOOL   cp15REQUIRES TOOL   rm1617SOURCE /v0.1.4/dist/static/zig-llvm/zig.tar 77bba138188678c3bb9864288366988913857b9a2fdff86264be81a7c668f5fc /tmp/zig.tar18SOURCE /v0.1.4/dist/static/zig-llvm/wamr.tar d5d0e05cf074e3f4167bc0430342a39f69666d3e27ee09c748f2a2a22299dfea /tmp/wamr.tar19SLOP tar -xf /tmp/zig.tar -C /20SLOP tar -xf /tmp/wamr.tar -C /2122# WAMR requires a BUILD_TARGET; zig1 binds only raw natives, so the target23# selects no native calling convention here.24SLOP CWD /tmp/wamr/core cc \25  -O2 \26  -std=gnu99 \27  -fno-strict-aliasing \28  -w \29  -D_PLATFORM_WASI_TYPES_H \30  -DBH_PLATFORM_DOLLY \31  -DBUILD_TARGET_X86_64 \32  -DBH_MALLOC=wasm_runtime_malloc \33  -DBH_FREE=wasm_runtime_free \34  -DWA_MALLOC=wasm_runtime_malloc \35  -DWA_FREE=wasm_runtime_free \36  -DWASM_ENABLE_INTERP=1 \37  -DWASM_ENABLE_FAST_INTERP=1 \38  -DWASM_ENABLE_LABELS_AS_VALUES=0 \39  -DWASM_CPU_SUPPORTS_UNALIGNED_ADDR_ACCESS=0 \40  -DWASM_ENABLE_BULK_MEMORY=1 \41  -DWASM_ENABLE_BULK_MEMORY_OPT=1 \42  -DWASM_ENABLE_SHRUNK_MEMORY=1 \43  -DWASM_DISABLE_HW_BOUND_CHECK=1 \44  -DWASM_DISABLE_STACK_HW_BOUND_CHECK=1 \45  -DWASM_DISABLE_WRITE_GS_BASE=1 \46  -DWASM_DISABLE_WAKEUP_BLOCKING_OP=1 \47  -DWASM_ENABLE_SHARED_MEMORY=0 \48  -DWASM_ENABLE_MULTI_MODULE=0 \49  -DWASM_ENABLE_MINI_LOADER=0 \50  -DWASM_ENABLE_REF_TYPES=0 \51  -DWASM_ENABLE_SIMD=0 \52  -DWASM_ENABLE_EXTENDED_CONST_EXPR=0 \53  -DWASM_ENABLE_MEMORY64=0 \54  -I /tmp/wamr \55  -I /tmp/zig/stage1 \56  -I shared/platform/include \57  -I shared/utils \58  -I shared/mem-alloc \59  -I iwasm/include \60  -I iwasm/common \61  -I iwasm/interpreter \62  /tmp/wamr/zig1.c \63  /tmp/wamr/wamr-platform.c \64  shared/mem-alloc/mem_alloc.c \65  shared/mem-alloc/ems/ems_alloc.c \66  shared/mem-alloc/ems/ems_gc.c \67  shared/mem-alloc/ems/ems_hmu.c \68  shared/mem-alloc/ems/ems_kfc.c \69  shared/utils/bh_assert.c \70  shared/utils/bh_bitmap.c \71  shared/utils/bh_common.c \72  shared/utils/bh_hashmap.c \73  shared/utils/bh_leb128.c \74  shared/utils/bh_list.c \75  shared/utils/bh_log.c \76  shared/utils/bh_queue.c \77  shared/utils/bh_vector.c \78  shared/utils/runtime_timer.c \79  iwasm/common/wasm_application.c \80  iwasm/common/wasm_blocking_op.c \81  iwasm/common/wasm_c_api.c \82  iwasm/common/wasm_exec_env.c \83  iwasm/common/wasm_loader_common.c \84  iwasm/common/wasm_memory.c \85  iwasm/common/wasm_native.c \86  iwasm/common/wasm_runtime_common.c \87  iwasm/common/wasm_shared_memory.c \88  iwasm/common/arch/invokeNative_general.c \89  iwasm/interpreter/wasm_interp_fast.c \90  iwasm/interpreter/wasm_loader.c \91  iwasm/interpreter/wasm_runtime.c \92  -o /tmp/zig/zig19394# /tmp/zig/config.zig is upstream's configuration of zig2 for an LLVM build.95SLOP CWD / /tmp/zig/zig1 \96  /tmp/zig/stage1/zig1.wasm \97  /usr/lib/zig \98  build-exe \99  -target wasm64-emscripten \100  -mcpu=generic+atomics \101  -fsingle-threaded \102  -OReleaseSmall \103  -ofmt=c \104  -lc \105  --name zig2 \106  -femit-bin=tmp/zig/zig2.c \107  --dep build_options \108  --dep aro \109  -Mroot=tmp/zig/src/main.zig \110  -Mbuild_options=tmp/zig/config.zig \111  -Maro=usr/lib/zig/compiler/aro/aro.zig112SLOP CWD / /tmp/zig/zig1 \113  /tmp/zig/stage1/zig1.wasm \114  /usr/lib/zig \115  build-obj \116  -target wasm64-emscripten \117  -mcpu=generic+atomics \118  -fsingle-threaded \119  -OReleaseSmall \120  -ofmt=c \121  --name compiler_rt \122  -femit-bin=tmp/zig/compiler_rt.c \123  -Mroot=usr/lib/zig/compiler_rt.zig124125# As zig-build compiles the C zig1 emits (zig.h's pointer types and its126# unrecognized wasm memory builtins).127SLOP CWD /tmp/zig cc -c -O2 -std=c99 -fno-strict-aliasing -Wno-incompatible-pointer-types \128  '-Dzig_unimplemented()=(__builtin_trap(),0)' -I /usr/lib/zig -o zig2.o zig2.c129SLOP CWD /tmp/zig cc -c -O2 -std=c99 -fno-strict-aliasing -Wno-incompatible-pointer-types \130  -I /usr/lib/zig -o compiler_rt.o compiler_rt.c131# What zig-llvm compiles and links: zigcpp's sources and the two objects.132SLOP mkdir -p /usr/lib/zig-llvm-build133SLOP CWD /tmp/zig cp zig2.o compiler_rt.o src/zig_llvm.cpp src/zig_llvm.h src/zig_llvm-ar.cpp src/zig_clang_driver.cpp src/zig_clang_cc1_main.cpp src/zig_clang_cc1as_main.cpp /usr/lib/zig-llvm-build134SLOP rm -rf /tmp/zig /tmp/wamr /tmp/zig.tar /tmp/wamr.tar135FOLDER /usr/lib/zig-llvm-build136FOLDER /usr/lib/zig137FILE /usr/share/licenses/zig/LICENSE138