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

Comments

@FlorianUekermann
Copy link
Contributor

commented Apr 19, 2018

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 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

This comment has been minimized.

Copy link

commented Apr 19, 2018

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

@gopherbot gopherbot closed this in be012e1 Apr 25, 2018

@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.
Projects
None yet
4 participants
You can’t perform that action at this time.