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

cmd/cgo: avoid absolute paths in generated C header #24945

Closed
FlorianUekermann opened this issue Apr 19, 2018 · 1 comment
Closed

cmd/cgo: avoid absolute paths in generated C header #24945

FlorianUekermann opened this issue Apr 19, 2018 · 1 comment
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@FlorianUekermann
Copy link
Contributor

I use go build -buildmode=c-archive to generate a .h and a .a file. It would be great for various reasons (vcs, hashes for build systems) if the generated header did not include absolute paths. Right now I see a comment on the top and a line directive.

/* package _/home/user/xxx/cgo */
...
#line 10 "/home/user/xxx/cgo/c_api.go"

This isn't super important, but it would be more convenient if the output didn't depend this much on the environment.

@agnivade agnivade added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 19, 2018
@agnivade agnivade changed the title cgo: Avoid absolute paths in generated C header cmd/cgo: avoid absolute paths in generated C header Apr 19, 2018
@agnivade agnivade added this to the Unreleased milestone Apr 19, 2018
@ianlancetaylor ianlancetaylor modified the milestones: Unreleased, Go1.11 Apr 19, 2018
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/108315 mentions this issue: cmd/cgo: don't use absolute paths in the export header file

@golang golang locked and limited conversation to collaborators Apr 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants