diff --git a/.gitignore b/.gitignore index c52dd0d..2048919 100644 --- a/.gitignore +++ b/.gitignore @@ -33,7 +33,6 @@ *.out *.app *.i*86 -*.x86_64 *.hex # Debug files @@ -60,3 +59,6 @@ runtime/tests/tmp/ # Editor Configs .vscode + +# Symlinks +Dockerfile diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 new file mode 100644 index 0000000..4c738f8 --- /dev/null +++ b/Dockerfile.aarch64 @@ -0,0 +1,61 @@ +# Inspired by lucet's Dockerfile. + +# using ubuntu 18 docker image +FROM ubuntu:bionic + +# install some basic packages +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + build-essential \ + curl \ + git \ + python3-dev \ + python3-pip \ + cmake \ + ca-certificates \ + libssl-dev \ + pkg-config \ + gcc \ + g++ \ + clang-8 \ + clang-tools-8 \ + llvm-8 \ + llvm-8-dev \ + libc++-dev \ + libc++abi-dev \ + lld-8 \ + lldb-8 \ + libclang-8-dev \ + libclang-common-8-dev \ + vim \ + apache2 \ + subversion \ + libapache2-mod-svn \ + libsvn-dev \ + binutils-dev \ + build-essential \ + automake \ + libtool \ + strace \ + less \ + libuv1-dev \ + && rm -rf /var/lib/apt/lists/* + +# set to use our installed clang version +RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-8 100 +RUN update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-8 100 + +# set LD_LIBRARY_PATH +ENV LD_LIBRARY_PATH=/usr/local/lib + +RUN curl https://sh.rustup.rs -sSf | \ + sh -s -- --default-toolchain stable -y +ENV PATH=/root/.cargo/bin:$PATH + +RUN rustup component add rustfmt +RUN rustup target add wasm32-wasi + +RUN cargo install --debug cargo-audit cargo-watch rsign2 + +ENV PATH=/opt/awsm/bin:$PATH + diff --git a/Dockerfile b/Dockerfile.x86_64 similarity index 100% rename from Dockerfile rename to Dockerfile.x86_64 diff --git a/devenv.sh b/devenv.sh index 4a9301a..471d140 100755 --- a/devenv.sh +++ b/devenv.sh @@ -71,6 +71,10 @@ envsetup() { echo "Updating git submodules" git submodule update --init --recursive 2>/dev/null || :d + echo "Using Dockerfile.$(uname -m)" + rm -f Dockerfile + ln -s Dockerfile.$(uname -m) Dockerfile + # As a user nicety, warn the user if awsm-dev is detected # This UX differs from detecting awsm, which immediately exits # This is disabled because it doesn't seem useful diff --git a/silverfish b/silverfish index 62994ac..507ef4b 160000 --- a/silverfish +++ b/silverfish @@ -1 +1 @@ -Subproject commit 62994ac60d0c3af18d647a4fc4f97b7ca8b9aa95 +Subproject commit 507ef4b2a14f45ccb246a202b485d175116e0b80