Skip to content

Wasm build fails on mac arm with apple clang 17 #127

@ntjohnson1

Description

@ntjohnson1

Repro:

$ cargo --version
cargo 1.87.0 (99624be96 2025-05-06)
$ rustup --version
rustup 1.28.2 (e4f3ad6f8 2025-04-28)
$ rustc --version
rustc 1.87.0 (17067e9ac 2025-05-09)
$ clang --version
clang --version
Apple clang version 17.0.0 (clang-1700.0.13.5)
Target: arm64-apple-darwin24.5.0
Thread model: posix

$ cargo build --target wasm32-unknown-unknown --release
Compiling psm v0.1.26 (/Users/nick/repos/stacker/psm)
warning: [email protected]: warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: archive library: /Users/nick/repos/stacker/target/wasm32-unknown-unknown/release/build/psm-ab2ede286de84622/out/libpsm_s.a the table of contents is empty (no object file members in the library define global symbols)
   Compiling stacker v0.1.21 (/Users/nick/repos/stacker)
error: failed to build archive at `/Users/nick/repos/stacker/target/wasm32-unknown-unknown/release/deps/libpsm-36af2f6cb1fcbb57.rlib`: LLVM error: section too large

This appears to be related to the note in wasm32.s about a relatively recent llvm but this is the base version on macos arm (M4 etc).
This appears to be impacting upstream crates who are coming up with various work arounds
drager/wasm-pack#1381
apache/datafusion#13766

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions