fix: Resolve wasmception build issues

master
Sean McBride 3 years ago
parent 33d60fd936
commit ffc7573ec9

@ -1,15 +1,12 @@
AWSMCC=awsm
CC=clang
AWSMCC=../awsm/target/release/awsm
CC=clang-8
# Used by aWsm when compiling the *.wasm to *.bc
AWSMFLAGS= --inline-constant-globals --runtime-globals
# Used by clang when compiling the *.so module
# --whole-archive causes the symbols in the listed static archive to be exported from the resulting *.so
# https://stackoverflow.com/questions/805555/ld-linker-question-the-whole-archive-option
CFLAGS=-O3 -flto
LDFLAGS=-fPIC -Wl
# LDFLAGS=-flto -fvisibility=hidden
CFLAGS=-O3
LDFLAGS=--shared -fPIC -flto
# Compiletime Components to link into *.so
SLEDGE_BASE_DIR=../
@ -47,7 +44,7 @@ dist:
%_wasm.so: %.bc ${SLEDGE_COMPILETIME_SRC}
mkdir -p dist
${CC} --shared -fPIC ${OPTFLAGS} -I${SLEDGE_COMPILETIME_INC} $^ -o $@
${CC} ${CFLAGS} ${LDFLAGS} -I${SLEDGE_COMPILETIME_INC} $^ -o $@
../runtime/bin/%_wasm.so: dist/%_wasm.so
cp $^ $@

@ -1 +1 @@
Subproject commit 84ad52b5c307ffdf9dc585bc40ae1122563a6857
Subproject commit 782efc4448889ed4e89fe57ed548e1907f36eafa

@ -0,0 +1,22 @@
SLEDGE_BINARY_DIR=../../../../bin
HOSTNAME=localhost
default: run
clean:
rm -rf res/*
run:
LD_LIBRARY_PATH=${SLEDGE_BINARY_DIR} ${SLEDGE_BINARY_DIR}/sledgert spec.json
debug:
SLEDGE_DISABLE_PREEMPTION=true SLEDGE_NWORKERS=1 LD_LIBRARY_PATH=${SLEDGE_BINARY_DIR} gdb ${SLEDGE_BINARY_DIR}/sledgert --eval-command="run spec.json"
client:
curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@hyde.pnm" "${HOSTNAME}:10000"
client2:
curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../handwriting/handwrt1.pnm" "${HOSTNAME}:10000"
client3:
curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../fivebyeight/5x8.pnm" "${HOSTNAME}:10000"
Loading…
Cancel
Save