Skip to content

Commit

Permalink
Do not use prefixed clang for wasi
Browse files Browse the repository at this point in the history
Rust 1.68 (rust-lang/rust#106489) broke this:

```
= note: clang-15: error: unsupported option '--export'
        clang-15: error: unsupported option '--stack-first'
        clang-15: error: unsupported option '--allow-undefined'
        clang-15: error: unsupported option '--fatal-warnings'
        clang-15: error: unsupported option '--no-demangle'
        clang-15: error: unsupported option '--gc-sections'
        clang-15: error: unknown argument: '-flavor'
        clang-15: error: no such file or directory: 'wasm'
        clang-15: error: no such file or directory: '__main_void'
```
  • Loading branch information
taiki-e committed Mar 12, 2023
1 parent 22db560 commit 711735a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,7 @@ jobs:
- target: illumos
- target: redox
# - target: fuchsia
# TODO(wasi):
# = note: clang-15: error: unsupported option '--export'
# clang-15: error: unsupported option '--stack-first'
# clang-15: error: unsupported option '--allow-undefined'
# clang-15: error: unsupported option '--fatal-warnings'
# clang-15: error: unsupported option '--no-demangle'
# clang-15: error: unsupported option '--gc-sections'
# clang-15: error: unknown argument: '-flavor'
# clang-15: error: no such file or directory: 'wasm'
# clang-15: error: no such file or directory: '__main_void'
# - target: wasi
- target: wasi
- target: emscripten
- target: windows-gnu
- target: windows-gnu
Expand Down
7 changes: 4 additions & 3 deletions docker/wasi.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ COPY --from=wasi-sdk /wasi-sdk "${TOOLCHAIN_DIR}"
RUN --mount=type=bind,target=/docker \
/docker/base/common.sh

RUN --mount=type=bind,target=/docker \
COMMON_FLAGS="-L\"\${toolchain_dir}\"/lib -L\"\${toolchain_dir}\"/${RUST_TARGET}/lib/${RUST_TARGET}" \
/docker/clang-cross.sh
# Do not use prefixed clang: https://github.com/taiki-e/setup-cross-toolchain-action/commit/fd352f3ffabd00daf2759ab4a3276729e52eeb10
# RUN --mount=type=bind,target=/docker \
# COMMON_FLAGS="-L\"\${toolchain_dir}\"/lib -L\"\${toolchain_dir}\"/${RUST_TARGET}/lib/${RUST_TARGET}" \
# /docker/clang-cross.sh

FROM ghcr.io/taiki-e/build-base:ubuntu-"${UBUNTU_VERSION}" as test-base
SHELL ["/bin/bash", "-euxo", "pipefail", "-c"]
Expand Down

0 comments on commit 711735a

Please sign in to comment.