Navigation Menu

Skip to content
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

wasm: emit producer custom section #33295

Closed
xtuc opened this issue Jul 26, 2019 · 7 comments
Closed

wasm: emit producer custom section #33295

xtuc opened this issue Jul 26, 2019 · 7 comments
Labels
arch-wasm WebAssembly issues FeatureRequest FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@xtuc
Copy link

xtuc commented Jul 26, 2019

What version of Go are you using (go version)?

$ go version
go version devel +1c45dca365 Mon Mar 4 14:21:23 2019 -0800 linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

GOHOSTARCH="amd64"
GOHOSTOS="linux"

go env Output
$ go env

What did you do?

Build with GOOS=js GOARCH=wasm.

What did you expect to see?

A wasm producers custom section: https://github.com/WebAssembly/tool-conventions/blob/master/ProducersSection.md with Golang's compiler and its version (or the git hash).

What did you see instead?

Not present.

@agnivade agnivade added FeatureRequest NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Jul 26, 2019
@agnivade agnivade added this to the Unplanned milestone Jul 26, 2019
@agnivade
Copy link
Contributor

@neelance - thoughts ?

We already use the custom section for recording the buildid.

@agnivade agnivade added the arch-wasm WebAssembly issues label Jul 26, 2019
@neelance
Copy link
Member

Sure, we can add this. Sounds useful. Maybe language set to Go and processed-by set to gc?

@agnivade
Copy link
Contributor

SGTM.

@agnivade agnivade added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Jul 30, 2019
@cherrymui
Copy link
Member

cherrymui commented Aug 7, 2019

processed-by set to gc?

For DWARF, we set DW_AT_producer to "Go cmd/compile <version>". Maybe we can consider doing the same.

@neelance neelance self-assigned this Aug 15, 2019
@neelance
Copy link
Member

@xtuc Is there already some tool that prints the contents of the producer section (and checks its format while doing so)?

@xtuc
Copy link
Author

xtuc commented Sep 21, 2019

I use to print it out https://github.com/xtuc/webassemblyjs/blob/master/packages/cli/src/get-producer-section.js, it will fail to parse if the format is invalid.

@gopherbot
Copy link

Change https://golang.org/cl/196804 mentions this issue: cmd/link: add producer section to wasm binaries

@golang golang locked and limited conversation to collaborators Sep 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly issues FeatureRequest FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants