From 2a791c418d83b48691a84efc3e2c7ed357bec1a2 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Wed, 20 Jun 2018 08:34:05 -0700 Subject: [PATCH] start with hello world in C --- Tupfile.rules | 4 +--- cmd/land/Tupfile | 2 +- cmd/land/testdata/Tupfile | 1 + cmd/land/testdata/fileops.wasm | Bin 260 -> 0 bytes cmd/land/testdata/hello.wasm | Bin 80 -> 0 bytes cmd/land/testdata/helloworld.c | 21 +++++++++++++++++++++ cmd/land/testdata/land.h | 9 +++++++++ cmd/land/testdata/writefile.wasm | Bin 131 -> 0 bytes 8 files changed, 33 insertions(+), 4 deletions(-) delete mode 100644 cmd/land/testdata/fileops.wasm delete mode 100644 cmd/land/testdata/hello.wasm create mode 100644 cmd/land/testdata/helloworld.c create mode 100644 cmd/land/testdata/land.h delete mode 100644 cmd/land/testdata/writefile.wasm diff --git a/Tupfile.rules b/Tupfile.rules index 644dd4a..3e4e48b 100644 --- a/Tupfile.rules +++ b/Tupfile.rules @@ -1,3 +1 @@ -.gitignore - -: foreach *.wast |> wat2wasm -o %o %f |> %B.wasm \ No newline at end of file +.gitignore \ No newline at end of file diff --git a/cmd/land/Tupfile b/cmd/land/Tupfile index 51ea52d..33c9413 100644 --- a/cmd/land/Tupfile +++ b/cmd/land/Tupfile @@ -1,4 +1,4 @@ include_rules -: *_test.go | testdata/arbint.wasm testdata/struct.wasm |> vgo test -v -cover -race -o %o |> ../../bin/%d.test +: *_test.go | testdata/*.wasm |> vgo test -v -cover -race -o %o |> ../../bin/%d.test : *.go |> vgo build -o %o |> ../../bin/land diff --git a/cmd/land/testdata/Tupfile b/cmd/land/testdata/Tupfile index cb970cd..586fd90 100644 --- a/cmd/land/testdata/Tupfile +++ b/cmd/land/testdata/Tupfile @@ -4,4 +4,5 @@ CFLAGS += --target=wasm32-unknown-unknown-wasm CFLAGS += --sysroot=~/code/wasmception/sysroot/ CFLAGS += -O0 -nostartfiles -Wl,--no-entry -nostdlib +: foreach *.wast |> wat2wasm -o %o %f |> %B.wasm : foreach *.c |> ~/code/wasmception/dist/bin/clang $(CFLAGS) %f -o %o |> %B.wasm diff --git a/cmd/land/testdata/fileops.wasm b/cmd/land/testdata/fileops.wasm deleted file mode 100644 index c0eb0a47812ecee0ae444f77b103b95c13777438..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 260 zcmXYpJx;_h5QX3PZ?iF4xpo1Y4k0e#4o*NDi@1pJIw%ROsC+$6!ZpB7C}!q+Pwx%< zav=b8t9r_mdzS0wc{?ab89l(B6%XlCzQ$<@KxHw#hXmT}>pZRjY_sR!haJ_p_;vl- zDF})R`Bo{(*$q965NL>7w(6%q~2=`6y!H~Ye8SaPN$uPT%-zvD(P0bi-^*vEG qsw+WrD1(1)3Jbd#M~4np>pNCES`2>m^{YNTg&3#D^L3iz(6xV5Su(Kz diff --git a/cmd/land/testdata/hello.wasm b/cmd/land/testdata/hello.wasm deleted file mode 100644 index 1828cc65dfe8593c3857dbd50ad6667ef3dc30b2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 80 zcmWm0ISzm@3Sn#i+SGTKWm7 ckU~yoyTaQSrpPl+Gv-#o+t4f5?3?KU|44Y;8FFG z5>v0zA7GNRDC^%vcv=r+Ew^Qg7F0qh6~X<1#XL+NQnft6d}wYB%$KHacrnnrlU(&~ VjbnJlymbAr&V~DR3yT}O>IeGk97g~E