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

Rewrite //go:cgo_ldflag comments to relative paths in stdlib action #4005

Closed
wants to merge 1 commit into from

Conversation

fmeum
Copy link
Member

@fmeum fmeum commented Aug 2, 2024

What type of PR is this?

Bug fix

What does this PR do? Why is it needed?

The linker flags passed to the stdlib action need to contain absolute paths to work in Go's own build environment, but should not pollute the resulting archives with absolute paths. Since cgo persists the linker flags in //go:cgo_ldflag comments, those are now rewritten by the (renamed) filterbuildid command.

Which issues(s) does this PR fix?

Fixes #3994

Other notes for review

The linker flags passed to the stdlib action need to contain absolute
paths to work in Go's own build environment, but should not pollute the
resulting archives with absolute paths. Since cgo persists the linker
flags in `//go:cgo_ldflag` comments, those are now rewritten by the
(renamed) filterbuildid command.
@fmeum
Copy link
Member Author

fmeum commented Aug 7, 2024

#4009 is a more general solution

@fmeum fmeum closed this Aug 7, 2024
@fmeum fmeum deleted the 3994-absolute-ldflag branch August 7, 2024 10:17
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.

GoStdlib includes absolute paths in the output
1 participant