diff --git a/devenv.sh b/devenv.sh index acb1f12..299a30e 100755 --- a/devenv.sh +++ b/devenv.sh @@ -11,8 +11,6 @@ SYS_NAME='sledge' # /sledge HOST_SYS_MOUNT=${HOST_SYS_MOUNT:-"/${SYS_NAME}"} -# SYS_WASMCEPTION='silverfish/wasmception' - # sledge SYS_DOC_NAME=${SYS_NAME} diff --git a/install.sh b/install.sh index d8a1a08..420b830 100755 --- a/install.sh +++ b/install.sh @@ -28,9 +28,9 @@ SYS_SRC_PREFIX=${SYS_SRC_PREFIX:-"/${SYS_NAME}"} # The release directory containing the binary of the aWsm compiler SYS_COMPILER_REL_DIR=${SYS_COMPILER_REL_DIR:-"${SYS_SRC_PREFIX}/${COMPILER}/target/release"} -# /opt/sledge/bin? +# /opt/sledge/bin SYS_BIN_DIR=${SYS_BIN_DIR:-"${SYS_PREFIX}/bin"} -# /opt/sledge/lib? +# /opt/sledge/lib SYS_LIB_DIR=${SYS_LIB_DIR:-"${SYS_PREFIX}/lib"} # The first argument can be either wasi or wasmception. This determines the system interface used @@ -57,12 +57,9 @@ fi rm -f "${SYS_BIN_DIR}"/* install -d -v "$SYS_BIN_DIR" || exit 1 -# Link each of the binaries in the system bin directory -BINS=${COMPILER_EXECUTABLE} -for bin in $BINS; do - # i.e. ./silverfish/target/release/silverfish -> /opt/sledge/bin/silverfish - ln -sfv "${SYS_COMPILER_REL_DIR}/${bin}" "${SYS_BIN_DIR}/${bin}" -done +# Link the Awsm compiler. Rename to awsm if still using legacy "silverfish" name +# /sledge/awsm/target/release/silverfish /opt/sledge/bin/awsm +ln -sfv "${SYS_COMPILER_REL_DIR}/${COMPILER_EXECUTABLE}" "${SYS_BIN_DIR}/awsm" for file in clang clang++; do wrapper_file="$(mktemp)" diff --git a/runtime/compiletime/instr.c b/runtime/compiletime/instr.c index 6cac91f..ad1f1de 100644 --- a/runtime/compiletime/instr.c +++ b/runtime/compiletime/instr.c @@ -1,4 +1,3 @@ -/* code from https://github.com/gwsystems/silverfish/blob/master/runtime/runtime.c */ #include #include #include diff --git a/runtime/compiletime/memory/64bit_nix.c b/runtime/compiletime/memory/64bit_nix.c index db85276..6745a41 100644 --- a/runtime/compiletime/memory/64bit_nix.c +++ b/runtime/compiletime/memory/64bit_nix.c @@ -1,5 +1,3 @@ -/* https://github.com/gwsystems/silverfish/blob/master/runtime/memory/64bit_nix.c */ - #include #include "types.h" diff --git a/runtime/src/env.c b/runtime/src/env.c index 6dc722f..b275b14 100644 --- a/runtime/src/env.c +++ b/runtime/src/env.c @@ -1,4 +1,3 @@ -/* https://github.com/gwsystems/silverfish/blob/master/runtime/libc/libc_backing.c */ #include #include #include diff --git a/runtime/src/memory/64bit_nix.c b/runtime/src/memory/64bit_nix.c index c0babc5..0b8a312 100644 --- a/runtime/src/memory/64bit_nix.c +++ b/runtime/src/memory/64bit_nix.c @@ -1,4 +1,3 @@ -/* Code from https://github.com/gwsystems/silverfish/blob/master/runtime/memory/64bit_nix.c */ #include "current_sandbox.h" #include "panic.h" #include "runtime.h" diff --git a/runtime/tests/Makefile b/runtime/tests/Makefile index e4b03af..b87e8e3 100644 --- a/runtime/tests/Makefile +++ b/runtime/tests/Makefile @@ -22,9 +22,9 @@ clean: @mkdir -p ${TMP_DIR} @echo "Compiling $(@:%_rt=%)" ${WASMCC} ${$(@:%_rt=%)_CFLAGS} ${WASMCFLAGS} ${OPTFLAGS} $(@:%_rt=%)/*.c $(AWSM_DUMMY) -o ${TMP_DIR}/$(@:%_rt=%).wasm - ${AWSM_EXECUTABLE} ${TMP_DIR}/$(@:%_rt=%).wasm -o ${TMP_DIR}/$(@:%_rt=%).bc + ${AWSM_NAME} ${TMP_DIR}/$(@:%_rt=%).wasm -o ${TMP_DIR}/$(@:%_rt=%).bc ${CC} ${CFLAGS} ${OPTFLAGS} -D${USE_MEM} -D${ARCH} ${TMP_DIR}/$(@:%_rt=%).bc ${AWSM_MEMC} ${AWSM_RT_LIBC} ${AWSM_RT_ENV} ${AWSM_RT_RT} -lm -o ${TMP_DIR}/$(@:%_rt=%)_wasm.out - ${AWSM_EXECUTABLE} --inline-constant-globals --runtime-globals ${TMP_DIR}/$(@:%_rt=%).wasm -o ${TMP_DIR}/$(@:%_rt=%).bc + ${AWSM_NAME} --inline-constant-globals --runtime-globals ${TMP_DIR}/$(@:%_rt=%).wasm -o ${TMP_DIR}/$(@:%_rt=%).bc ${CC} --shared -fPIC ${OPTFLAGS} -I${SLEDGE_RT_INC} -D${USE_MEM} ${TMP_DIR}/$(@:%_rt=%).bc ${SLEDGE_MEMC} ${SLEDGE_WASMISA} -o ${TMP_DIR}/$(@:%_rt=%)_wasm.so @cp ${TMP_DIR}/$(@:%_rt=%)_wasm.so ${SLEDGE_BIN_DIR} # @rm -rf ${TMP_DIR} diff --git a/runtime/tests/Makefile.inc b/runtime/tests/Makefile.inc index f33bcec..c5b87ed 100644 --- a/runtime/tests/Makefile.inc +++ b/runtime/tests/Makefile.inc @@ -15,11 +15,8 @@ TMP_DIR=tmp/ WASMLINKFLAGS=-Wl,-z,stack-size=524288,--allow-undefined,--no-threads,--stack-first,--no-entry,--export-all,--export=main,--export=dummy WASMCFLAGS=${WASMLINKFLAGS} -nostartfiles -# aWsm Compiler Runtime (WebAssembly -> Native) -# Currently, the component which compiles WebAssembly modules to native code, is named aWsm -# However, the executable itself still currently retains the older name silverfish +# aWsm Compiler Runtime (WebAssembly -> LLVM Bitcode) AWSM_NAME=awsm -AWSM_EXECUTABLE=silverfish AWSM_BASE_DIR=../../${AWSM_NAME} AWSM_RT_DIR=${AWSM_BASE_DIR}/runtime/ AWSM_RT_MEM=${AWSM_RT_DIR}/memory/