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

Allow to set buildmode #43

Open
toverux opened this issue Jun 17, 2021 · 2 comments
Open

Allow to set buildmode #43

toverux opened this issue Jun 17, 2021 · 2 comments

Comments

@toverux
Copy link

toverux commented Jun 17, 2021

Hi!
I am integrating Go code in my codebase and exposing its functions in a shared library file (.so).
It would be nice to be able to set the buildmode, like in my case c-shared, or c-archive for example.
There's no hurry in my case, in the meantime I've made my own builder, based on this library.

@beeman
Copy link
Member

beeman commented Dec 27, 2021

Hi @toverux, could you provide an example of the command that would be used to set this build mode?

@toverux
Copy link
Author

toverux commented Nov 3, 2022

Hello, sorry I didn't respond back then.
I was simply passing the -buildmode c-shared option to build a shared library (.so/.dll) useable from another program (in my case Node.js with FFI). So, not an app, but the build process is the same except for just this option!
Ex: go build -o awesome.so -buildmode=c-shared awesome.go
See : https://github.com/vladimirvivien/go-cshared-examples

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

No branches or pull requests

2 participants