wasm-ld: error: unknown argument: --start-group
wasm-ld: error: unknown argument: --end-group
wasm-ld: error: unknown argument: -rpath
wasm-ld: error: unknown argument: -rpath-link
wasm-ld: error: cannot open $ORIGIN/: No such file or directory
wasm-ld: error: cannot open $HOME/Projects/wasi-demo/builddir/: Is a directory
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
system parameters
Log:
meson --cross-file wasi-sdk-11.0.cross builddir
The Meson build system
Version: 0.55.0
Source dir: /Users/gerhard/Projects/wasi-demo
Build dir: /Users/gerhard/Projects/wasi-demo/builddir
Build type: cross build
Project name: wasi-demo
Project version: undefined
C compiler for the build machine: ccache cc (clang 11.0.3 "Apple clang version 11.0.3 (clang-1103.0.32.62)")
C linker for the build machine: cc ld64 556.6
C compiler for the host machine: $HOME/.local/opt/wasi-sdk-11.0/bin/clang (clang 10.0.0 "clang version 10.0.0 (https://github.com/llvm/llvm-project d32170dbd5b0d54436537b6b75beaf44324e0c28)")
C linker for the host machine: $HOME/.local/opt/wasi-sdk-11.0/bin/clang ld.lld 10.0.0
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: wasm32
Host machine cpu: wasm32
Target machine cpu family: wasm32
Target machine cpu: wasm32
Build targets in project: 3
Describe the bug Meson cannot cross compile with wasi-sdk-11.0 if static libraries are linked.
To Reproduce Download the SDK from: https://github.com/WebAssembly/wasi-sdk/releases
Create a project: wasi-demo.tar.gz
meson.build:
wasi-sdk-11.0.cross:
main.c:
call.c:
Expected behavior I expect both executables to be built, but the one which links the static library fails. Working (link both object files directly):
Fails (link main.o directly, call.o via the static library):
Errors given:
system parameters
Log: