digitalmars.D.learn - How to build static linked executable
- zunkree (5/5) Mar 17 2018 Hi,
- Seb (4/9) Mar 17 2018 Yes, use -static
- Seb (3/14) Mar 17 2018 I forgot to mention that -static is an LDC-only flag, but you
- Jacob Carlborg (4/8) Mar 18 2018 FYI, -static is not support on macOS.
- zunkree (2/8) Mar 20 2018 So, how to build static binary for macOS?
- David Nadlinger (4/7) Mar 20 2018 Static binaries aren't really supported by Apple (anymore).
- Jacob Carlborg (14/15) Mar 20 2018 I don't see a need to do that. I build static binaries on Linux
- zunkree (2/13) Mar 20 2018 Thank you very much.
Hi, Is there a way to build static linked executable with dub for vibe-d based app? Regards, zunkree
Mar 17 2018
On Saturday, 17 March 2018 at 14:44:42 UTC, zunkree wrote:Hi, Is there a way to build static linked executable with dub for vibe-d based app? Regards, zunkreeYes, use -static Here's how we build the DTour: https://github.com/dlang-tour/core/blob/master/dub.sdl
Mar 17 2018
On Saturday, 17 March 2018 at 15:42:06 UTC, Seb wrote:On Saturday, 17 March 2018 at 14:44:42 UTC, zunkree wrote:I forgot to mention that -static is an LDC-only flag, but you wouldn't want to use DMD for an optimized application anyhow.Hi, Is there a way to build static linked executable with dub for vibe-d based app? Regards, zunkreeYes, use -static Here's how we build the DTour: https://github.com/dlang-tour/core/blob/master/dub.sdl
Mar 17 2018
On 2018-03-17 16:42, Seb wrote:Yes, use -static Here's how we build the DTour: https://github.com/dlang-tour/core/blob/master/dub.sdlFYI, -static is not support on macOS. -- /Jacob Carlborg
Mar 18 2018
On Sunday, 18 March 2018 at 14:36:04 UTC, Jacob Carlborg wrote:On 2018-03-17 16:42, Seb wrote:So, how to build static binary for macOS?Yes, use -static Here's how we build the DTour: https://github.com/dlang-tour/core/blob/master/dub.sdlFYI, -static is not support on macOS.
Mar 20 2018
On Tuesday, 20 March 2018 at 10:37:55 UTC, zunkree wrote:On Sunday, 18 March 2018 at 14:36:04 UTC, Jacob Carlborg wrote:Static binaries aren't really supported by Apple (anymore). What do you need it for? — DavidFYI, -static is not support on macOS.So, how to build static binary for macOS?
Mar 20 2018
On Tuesday, 20 March 2018 at 10:37:55 UTC, zunkree wrote:So, how to build static binary for macOS?I don't see a need to do that. I build static binaries on Linux because they work across all distros and all versions. But for macOS, there are no distros. For supporting multiple versions, or rather an older version than you're building on, you can use the "-macosx_version_min" linker flag. See [1] for an example. If you really want a static binary, I think it's possible if you're calling the kernel directly (I think Go can do this). But then most of D would not work, since it builds on the C standard library. [1] https://github.com/jacob-carlborg/dstep/blob/19a5ddb8ad3f44b3445c89840155bb7cd1ee44b7/dub.json#L20 -- /Jacob Carlborg
Mar 20 2018
On Saturday, 17 March 2018 at 15:42:06 UTC, Seb wrote:On Saturday, 17 March 2018 at 14:44:42 UTC, zunkree wrote:Thank you very much.Hi, Is there a way to build static linked executable with dub for vibe-d based app? Regards, zunkreeYes, use -static Here's how we build the DTour: https://github.com/dlang-tour/core/blob/master/dub.sdl
Mar 20 2018