Skip to content

Fix fyne release --os android not respecting ldflags present in GOFLAGS environment variable#70

Open
petoem wants to merge 4 commits into
fyne-io:mainfrom
petoem:fix-ldflags
Open

Fix fyne release --os android not respecting ldflags present in GOFLAGS environment variable#70
petoem wants to merge 4 commits into
fyne-io:mainfrom
petoem:fix-ldflags

Conversation

@petoem

@petoem petoem commented Jul 18, 2025

Copy link
Copy Markdown

Fixes #69

@sdassow

sdassow commented Sep 12, 2025

Copy link
Copy Markdown
Contributor

Without having worked in that particular area of the code, it reminds me of #17.

@petoem

petoem commented Sep 14, 2025

Copy link
Copy Markdown
Author

Looked at it again. #17 fixes windows builds by not changing the environment, but that's different for android.

I explain more about this PR:

  • To make the handling of ldflags more consistent, I moved the functions for extracting them to the util package. In the process of doing this I fixed the same bug as Fix ldflags in GOFLAGS not being respected. #17 . (have not tested it)
  • To fix mobile build, I had to set the buildLdflags and pass the remaining GOFLAGS on to the go build command. Here I used the same ExtractLdFlags function mentioned above.

This pull request probably fixes ldflags for both mobile and desktop.
It would be great if someone could test if it truly fixes windows builds too.

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.

fyne release --os android does not respect ldflags present in GOFLAGS environment variable

2 participants