Skip to content

Commit

Permalink
test: update c wasm testdata
Browse files Browse the repository at this point in the history
Signed-off-by: Marko Kungla <marko.kungla@gmail.com>
  • Loading branch information
mkungla authored and egonelbre committed Feb 8, 2023
1 parent db033cf commit e88fa73
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 30 deletions.
2 changes: 2 additions & 0 deletions testdata/c-wasm/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.s.o
*.s
19 changes: 16 additions & 3 deletions testdata/c-wasm/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
clang --target=wasm32 -emit-llvm -c -S example.c
llc -march=wasm32 -filetype=obj example.s
wasm-objdump -x example.wasm
PHONY := llc
llc:
clang --target=wasm32 -emit-llvm -g -c -S example.c
llc -O0 -march=wasm32 \
--filetype=obj \
example.s
wasm-ld --no-entry --export-all -o example.wasm example.s.o

PHONY := clang
clang:
clang --target=wasm32 --no-standard-libraries -Wl,--export-all -Wl,--no-entry -o example-clang.wasm example.c

PHONY := odump-clang
odump:
wasm-objdump -x example-clang.wasm
wasm-objdump -x example.wasm
27 changes: 0 additions & 27 deletions testdata/c-wasm/example.s

This file was deleted.

Binary file removed testdata/c-wasm/example.wasm
Binary file not shown.

0 comments on commit e88fa73

Please sign in to comment.