This repository has no description
1{
2 run,
3 config,
4 lib,
5
6 clang,
7 lld,
8 musl,
9 compiler-rt,
10}:
11
12run
13 {
14 name = "basic-init";
15 src = ./.;
16 path = [
17 clang
18 lld
19 ];
20 }
21 ''
22 clang -c -o init.o init.c --target=wasm32 -nostdinc -isystem ${musl}/include ${lib.optionalString config.debug "-g"} -matomics -mbulk-memory
23 wasm-ld -o init init.o ${compiler-rt}/libclang_rt.builtins-wasm32.a ${musl}/lib/crt1.o -L${musl}/lib -lc --fatal-warnings --import-memory --max-memory=4294967296 --shared-memory --export-table
24
25 mkdir -p $out/bin
26 cp init $out/bin
27 ''