Skip to content

Commit

Permalink
Adds native architecture support for building with Docker.
Browse files Browse the repository at this point in the history
  • Loading branch information
colinbdclark committed Sep 23, 2023
1 parent 7423e41 commit ac89ccd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
],
"defines": [],
"macFrameworkPath": [
"/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/System/Library/Frameworks"
"/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks"
],
"compilerPath": "/opt/homebrew/opt/llvm/bin/clang",
"compilerPath": "/usr/bin/clang",
"cStandard": "c99",
"cppStandard": "c++11",
"intelliSenseMode": "macos-clang-arm64",
Expand Down
13 changes: 9 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
FROM emscripten/emsdk:latest
FROM jarnoharno/emsdk:latest

RUN apt update && apt install -y python3 python3-pip \
python3-setuptools python3-wheel ninja-build
python3-setuptools python3-wheel
RUN pip3 install meson

WORKDIR /gcc-arm
RUN wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
RUN tar -xf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
ARG TARGETARCH
RUN if [ "$TARGETARCH" = "amd64" ]; \
then export TOOLCHAIN_ARCH="x86_64"; \
else export TOOLCHAIN_ARCH="aarch64"; \
fi; \
wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-$TOOLCHAIN_ARCH-linux.tar.bz2; \
tar -xf gcc-arm-none-eabi-10-2020-q4-major-$TOOLCHAIN_ARCH-linux.tar.bz2;

ENV GCC_PATH=/gcc-arm/gcc-arm-none-eabi-10-2020-q4-major/bin
RUN export PATH=$GCC_PATH:$PATH
Expand Down
2 changes: 1 addition & 1 deletion docker-build-wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

# Build the Web Assembly version of Signaletic using a Docker container
# that has all the appropriate dependencies installed.
docker run --platform=linux/amd64 -v `pwd`:/signaletic signaletic /signaletic/cross-build-wasm.sh
docker run -v `pwd`:/signaletic signaletic /signaletic/cross-build-wasm.sh

0 comments on commit ac89ccd

Please sign in to comment.