Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions platforms/switch/clang-3.9.1/linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ RUN wget -O musl.zip https://github.com/open-ead/botw-lib-musl/archive/${MUSL_HA
RUN unzip musl.zip
RUN cp -r botw-lib-musl-${MUSL_HASH} /compilers/switch/clang-3.9.1/

RUN apk add patch

ARG PATCH_REPO=https://github.com/GRAnimated/switch-clang-patches
ARG PATCH_BRANCH=main

RUN wget -O patches.zip "${PATCH_REPO}/archive/refs/heads/${PATCH_BRANCH}.zip"
RUN unzip patches.zip -d /tmp
RUN mv /tmp/switch-clang-patches-${PATCH_BRANCH} /tmp/patches

# apply patches to clang
RUN patch_dir="/tmp/patches/clang-3.9.1" && \
find "$patch_dir" -type f -name '*.diff' -print0 | while IFS= read -r -d '' patch; do \
echo "Applying patch: $patch"; \
patch -d "/compilers/switch/clang-3.9.1" -p0 < "$patch"; \
done;

RUN chown -R root:root /compilers/switch/clang-3.9.1/


Expand Down
16 changes: 16 additions & 0 deletions platforms/switch/clang-4.0.1/darwin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ RUN wget -O musl.zip https://github.com/open-ead/botw-lib-musl/archive/${MUSL_HA
RUN unzip musl.zip
RUN cp -r botw-lib-musl-${MUSL_HASH} /compilers/switch/clang-4.0.1/

RUN apk add patch

ARG PATCH_REPO=https://github.com/GRAnimated/switch-clang-patches
ARG PATCH_BRANCH=main

RUN wget -O patches.zip "${PATCH_REPO}/archive/refs/heads/${PATCH_BRANCH}.zip"
RUN unzip patches.zip -d /tmp
RUN mv /tmp/switch-clang-patches-${PATCH_BRANCH} /tmp/patches

# apply patches to clang
RUN patch_dir="/tmp/patches/clang-4.0.1" && \
find "$patch_dir" -type f -name '*.diff' -print0 | while IFS= read -r -d '' patch; do \
echo "Applying patch: $patch"; \
patch -d "/compilers/switch/clang-4.0.1" -p0 < "$patch"; \
done;

RUN chown -R root:root /compilers/switch/clang-4.0.1/


Expand Down
16 changes: 16 additions & 0 deletions platforms/switch/clang-4.0.1/linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ RUN wget -O musl.zip https://github.com/open-ead/botw-lib-musl/archive/${MUSL_HA
RUN unzip musl.zip
RUN cp -r botw-lib-musl-${MUSL_HASH} /compilers/switch/clang-4.0.1/

RUN apk add patch

ARG PATCH_REPO=https://github.com/GRAnimated/switch-clang-patches
ARG PATCH_BRANCH=main

RUN wget -O patches.zip "${PATCH_REPO}/archive/refs/heads/${PATCH_BRANCH}.zip"
RUN unzip patches.zip -d /tmp
RUN mv /tmp/switch-clang-patches-${PATCH_BRANCH} /tmp/patches

# apply patches to clang
RUN patch_dir="/tmp/patches/clang-4.0.1" && \
find "$patch_dir" -type f -name '*.diff' -print0 | while IFS= read -r -d '' patch; do \
echo "Applying patch: $patch"; \
patch -d "/compilers/switch/clang-4.0.1" -p0 < "$patch"; \
done;

RUN chown -R root:root /compilers/switch/clang-4.0.1/


Expand Down
16 changes: 16 additions & 0 deletions platforms/switch/clang-8.0.0/darwin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ RUN wget -O musl.zip https://github.com/open-ead/botw-lib-musl/archive/${MUSL_HA
RUN unzip musl.zip
RUN cp -r botw-lib-musl-${MUSL_HASH} /compilers/switch/clang-8.0.0/

RUN apk add patch

ARG PATCH_REPO=https://github.com/GRAnimated/switch-clang-patches
ARG PATCH_BRANCH=main

RUN wget -O patches.zip "${PATCH_REPO}/archive/refs/heads/${PATCH_BRANCH}.zip"
RUN unzip patches.zip -d /tmp
RUN mv /tmp/switch-clang-patches-${PATCH_BRANCH} /tmp/patches

# apply patches to clang
RUN patch_dir="/tmp/patches/clang-8.0.0" && \
find "$patch_dir" -type f -name '*.diff' -print0 | while IFS= read -r -d '' patch; do \
echo "Applying patch: $patch"; \
patch -d "/compilers/switch/clang-8.0.0" -p0 < "$patch"; \
done;

RUN chown -R root:root /compilers/switch/clang-8.0.0/


Expand Down
16 changes: 16 additions & 0 deletions platforms/switch/clang-8.0.0/linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ RUN wget -O musl.zip https://github.com/open-ead/botw-lib-musl/archive/${MUSL_HA
RUN unzip musl.zip
RUN cp -r botw-lib-musl-${MUSL_HASH} /compilers/switch/clang-8.0.0/

RUN apk add patch

ARG PATCH_REPO=https://github.com/GRAnimated/switch-clang-patches
ARG PATCH_BRANCH=main

RUN wget -O patches.zip "${PATCH_REPO}/archive/refs/heads/${PATCH_BRANCH}.zip"
RUN unzip patches.zip -d /tmp
RUN mv /tmp/switch-clang-patches-${PATCH_BRANCH} /tmp/patches

# apply patches to clang
RUN patch_dir="/tmp/patches/clang-8.0.0" && \
find "$patch_dir" -type f -name '*.diff' -print0 | while IFS= read -r -d '' patch; do \
echo "Applying patch: $patch"; \
patch -d "/compilers/switch/clang-8.0.0" -p0 < "$patch"; \
done;

RUN chown -R root:root /compilers/switch/clang-8.0.0/


Expand Down
16 changes: 16 additions & 0 deletions templates/switch/clang.j2
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,22 @@ RUN wget -O musl.zip https://github.com/open-ead/botw-lib-musl/archive/${MUSL_HA
RUN unzip musl.zip
RUN cp -r botw-lib-musl-${MUSL_HASH} /compilers/{{ platform }}/{{ id }}/

RUN apk add patch

ARG PATCH_REPO=https://github.com/GRAnimated/switch-clang-patches
ARG PATCH_BRANCH=main

RUN wget -O patches.zip "${PATCH_REPO}/archive/refs/heads/${PATCH_BRANCH}.zip"
RUN unzip patches.zip -d /tmp
RUN mv /tmp/switch-clang-patches-${PATCH_BRANCH} /tmp/patches

# apply patches to clang
RUN patch_dir="/tmp/patches/{{ id }}" && \
find "$patch_dir" -type f -name '*.diff' -print0 | while IFS= read -r -d '' patch; do \
echo "Applying patch: $patch"; \
patch -d "/compilers/{{ platform }}/{{ id }}" -p0 < "$patch"; \
done;

RUN chown -R root:root /compilers/{{ platform }}/{{ id }}/


Expand Down