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

link all included libs statically if compiler is run with --static #5385

Merged
merged 1 commit into from Dec 15, 2017

Conversation

repomaa
Copy link
Contributor

@repomaa repomaa commented Dec 15, 2017

# program.cr
@[Link("libzmq")]
lib LibZMQ
  alias ZMQ = Void*
  fun zmq_init : ZMQ
end

LibZMQ.zmq_init
$ crystal build --static program.cr

This will automatically add static: true to the Link attribute.

@ysbaddaden
Copy link
Contributor

It's great but I can't merge from a phone because Travis failed :/

@ysbaddaden ysbaddaden closed this Dec 15, 2017
@ysbaddaden ysbaddaden reopened this Dec 15, 2017
@RX14 RX14 merged commit 0b7944b into crystal-lang:master Dec 15, 2017
@RX14 RX14 added this to the Next milestone Dec 15, 2017
@RX14
Copy link
Contributor

RX14 commented Dec 15, 2017

I've categorized it as a bug, because I really should have done this when I initially added the --static flag.

@RX14 RX14 modified the milestones: 0.24.1, Next Dec 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants