constabulary / gb

gb, the project based build tool for Go
https://getgb.io/
MIT License
2.15k stars 150 forks source link

wish: a way to keep cgo related generated files. #697

Open bstarynk opened 7 years ago

bstarynk commented 7 years ago

It would be nice to have some documented way to keep the cgo related generated (C) files. I am a newbie, and had hard time to understand some strange gcc errors (in my sqlitelog.go file) because I mis-coded a cgo comment.

Perhaps accepting a directory keeping the generated files, e.g. #cgo keep-generated-directory: /tmp/thedirectory would put all generated files in /tmp/thedirectory/

or maybe a documented flag to gb build such as gb build -keep-temp /tmp/thedirectory

Thanks.

Basile Starynkevitch.

davecheney commented 7 years ago

I think there is a -work flag, or similar which will not delete temporary directories after the build runs.

On Thu, 9 Mar 2017, 08:17 Basile Starynkevitch notifications@github.com wrote:

It would be nice to have some documented way to keep the cgo related generated (C) files. I am a newbie, and had hard time to understand some strange gcc errors because I mis-coded a cgo comment.

Perhaps accepting a directory keeping the generated files, e.g.

cgo keep-generated-directory: /tmp/thedirectory would put all generated

files in /tmp/thedirectory/

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/constabulary/gb/issues/697, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAcA9h8yUHvKVsz12ZjgvJW6TW4K9zCks5rjxr0gaJpZM4MXUiJ .