Skip to content

Conversation

@aykevl
Copy link
Member

@aykevl aykevl commented Jun 21, 2021

The wasm build tag together with GOARCH=arm was causing problems in the internal/cpu package. In general, I think having two architecture build tag will only cause problems (in this case, wasm and arm) so I've removed the wasm build tag and replaced it with tinygo.wasm.

This is similar to the tinygo.riscv build tag, which is used for older Go versions that don't yet have RISC-V support in the standard library (and therefore pretend to be GOARCH=arm instead).

The situation after this PR:

  • -target=wasm will keep using GOOS=js GOARCH=wasm
  • -target=wasi already had GOOS=linux GOARCH=arm, but will have the wasm build tag removed for compatibility with the internal/cpu package.

Once WASI gets fully supported by the Go standard library, we can remove this workaround and use GOOS=wasi GOARCH=wasm, which would be the correct way to do this.

The wasm build tag together with GOARCH=arm was causing problems in the
internal/cpu package. In general, I think having two architecture build
tag will only cause problems (in this case, wasm and arm) so I've
removed the wasm build tag and replaced it with tinygo.wasm.

This is similar to the tinygo.riscv build tag, which is used for older
Go versions that don't yet have RISC-V support in the standard library
(and therefore pretend to be GOARCH=arm instead).
@aykevl aykevl force-pushed the wasi-wasm-build-tag branch from 4511d91 to 6243440 Compare June 21, 2021 14:16
@fgsch fgsch mentioned this pull request Jun 21, 2021
@deadprogram
Copy link
Member

@aykevl thanks for the change and @fgsch thank you for testing.

Now merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants