This is an archive of the discontinued LLVM Phabricator instance.

Use `wasm` rather than `wasm32` as the as the default WebAssembly arch name
AbandonedPublic

Authored by sbc100 on Feb 7 2018, 11:26 AM.

Details

Reviewers
None
Summary

Keep wasm32 as an alias for wasm.

This is inline with many other arches such as: ppc, sparc, spir, amdil, hsail, x86.
All these use the basename of the arch for the 32-bit variant and add the 64 bit
suffix for 64-bit case.

The motivation for this is that wasm64 doesn't even exist yet so having the
distinction everywhere and exposing it to the users of the tools is rather pointless
and confusing.

If this change is unpopular I could invert it and make wasm an alias for wasm32?

On place I particularly want to avoid the 32 is in the tool names:
wasm32-unknown-unknown-clang is bad enough, wasm-unknown-unknown-clang
better. Ideally just wasm-clang.

Diff Detail

Event Timeline

sbc100 created this revision.Feb 7 2018, 11:26 AM
sbc100 retitled this revision from Use wasm as the default WebAssembly asch (wasm32 is still supported as an alias) This is more inline with the other architectures such as to Use `wasm` rather than `wasm32` as the as the default WebAssembly arch name.Feb 7 2018, 11:34 AM
sbc100 edited the summary of this revision. (Show Details)

In my experience it's not uncommon to see a reference to "x86" where it's not clear whether it applies to both 32-bit and 64-bit x86, or really just 32-bit x86. Also, I think many of the old architectures have names that predate the existence of their 64-bit variants. For example MIPS was originally 32-bit only. In contrast, RISC-V is an example of a new architecture with a 64-bit variant present from the start, and they call their 32-bit variant riscv32. Consequently, I've been trying to only say "wasm" for things that apply to both wasm32 and wasm64.

As an example, you can have code like this:

#ifdef __wasm__
  // do stuff with __builtin_wasm_mem_grow and __builtin_wasm_mem_size
#endif

which works for both wasm32 and wasm64.

On place I particularly want to avoid the 32 is in the tool names: wasm32-unknown-unknown-clang is bad enough, wasm-unknown-unknown-clang better.

I also hear people complain about the "unknown-unknown" part...

Ideally just wasm-clang.

Is there something using "wasm32-clang" today?

sbc100 abandoned this revision.Feb 12 2018, 3:43 PM