Skip to content

Clang, Windows, WebAssembly - Missing "wasm" target on windows clang #128946

@DasOhmoff

Description

@DasOhmoff

I downloaded the latest stable clang version LLVM 19.1.7, from the windows clang+llvm-19.1.7-x86_64-pc-windows-msvc.tar.xz link.

I tried building for wasm with it, but it does not seem to support the target, it says: error: unable to create target: 'No available targets are compatible with triple "wasm32"'

Also --print-targets does not include wasm:

C:\Users\adam>clang --print-targets

  Registered Targets:
    aarch64    - AArch64 (little endian)
    aarch64_32 - AArch64 (little endian ILP32)
    aarch64_be - AArch64 (big endian)
    arm        - ARM
    arm64      - ARM64 (little endian)
    arm64_32   - ARM64 (little endian ILP32)
    armeb      - ARM (big endian)
    thumb      - Thumb
    thumbeb    - Thumb (big endian)
    x86        - 32-bit X86: Pentium-Pro and above
    x86-64     - 64-bit X86: EM64T and AMD64

How can I build for wasm on windows? I have seen multiple different website talking about building wasm for windows so how come? Did the target get removed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    packagingplatform:windowsquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions