Skip to content

wasi: remove wasm build tag #1964

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 22, 2021
Merged

wasi: remove wasm build tag #1964

merged 1 commit into from
Jun 22, 2021

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.

2 participants