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

Ability to pass flags to external linker (such as wasm-ld) #4320

Closed
jmillikin opened this issue Jun 30, 2024 · 2 comments
Closed

Ability to pass flags to external linker (such as wasm-ld) #4320

jmillikin opened this issue Jun 30, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@jmillikin
Copy link

While looking into #4319, I discovered that there doesn't seem to be a way to pass flags to the wasm-ld external linker from the tinygo build command. The only way I could find is to create a custom target JSON, which is a bit heavyweight.

There is -ldflags, but it's documented as being for flags compatible with the Go linker.

The standard Go build system defines -extldflags which seems to be what I want, but tinygo build doesn't have that flag.

@dgryski
Copy link
Member

dgryski commented Jul 3, 2024

I can probably take a look at this.

@dgryski dgryski self-assigned this Jul 3, 2024
@deadprogram deadprogram added the enhancement New feature or request label Jul 17, 2024
dgryski added a commit to dgryski/tinygo that referenced this issue Sep 17, 2024
@aykevl aykevl added the next-release Will be part of next release label Sep 18, 2024
leongross pushed a commit to leongross/tinygo that referenced this issue Sep 23, 2024
@aykevl
Copy link
Member

aykevl commented Oct 22, 2024

There is also #cgo LDFLAGS which may be appropriate in some circumstances.

@aykevl aykevl closed this as completed in 892efae Oct 25, 2024
@deadprogram deadprogram removed the next-release Will be part of next release label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants