nx-go icon indicating copy to clipboard operation
nx-go copied to clipboard

Allow to set buildmode

Open toverux opened this issue 2 years ago • 2 comments

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.

toverux avatar Jun 17 '21 16:06 toverux

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

beeman avatar Dec 27 '21 23:12 beeman

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

toverux avatar Nov 03 '22 09:11 toverux