diff --git a/applications/Makefile b/applications/Makefile index bf6c29b..f040069 100644 --- a/applications/Makefile +++ b/applications/Makefile @@ -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 $^ $@ diff --git a/awsm b/awsm index 84ad52b..782efc4 160000 --- a/awsm +++ b/awsm @@ -1 +1 @@ -Subproject commit 84ad52b5c307ffdf9dc585bc40ae1122563a6857 +Subproject commit 782efc4448889ed4e89fe57ed548e1907f36eafa diff --git a/runtime/experiments/applications/ocr/hyde/Makefile b/runtime/experiments/applications/ocr/hyde/Makefile new file mode 100644 index 0000000..296acb5 --- /dev/null +++ b/runtime/experiments/applications/ocr/hyde/Makefile @@ -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"