Skip to content

Link libcurl statically #24

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

Merged
merged 1 commit into from
Oct 2, 2018
Merged

Link libcurl statically #24

merged 1 commit into from
Oct 2, 2018

Conversation

bpintea
Copy link
Collaborator

@bpintea bpintea commented Oct 1, 2018

Add static linking for libcurl and make it the default.

This is useful since the client app might use libcurl and have it loaded
already. Since in this case no second version of the DLL will be loaded
(by default), the driver would have to use that instance, which might or
not have all the necessary features compiled in and behave or not as
expected.

Add static linking for libcurl and make it the default.

This is useful since the client app might use libcurl and have it loaded
already. Since in this case no second version of the DLL will be loaded
(by default), the driver would have to use that instance, which might or
not have all the necessary features compiled in and behave or not as
expected.
@bpintea bpintea mentioned this pull request Oct 1, 2018
Closed
Copy link
Collaborator

@edsavage edsavage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@droberts195 droberts195 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

The only thing I would say is that there's a lot of complexity in the build system now to account for the possibility of wanting to dynamically link to libcurl. If static linking is best then I'd just do that, with no option to do anything different.

Since you've already added all the options you might as well commit the PR as is, but after a while if you find that you never ever use the option to link dynamically to libcurl then you could remove the extra complexity.

@bpintea
Copy link
Collaborator Author

bpintea commented Oct 2, 2018

Thanks, Ed, Dave.
@droberts195 indeed, keeping the dynamic loading, plus having the release/debug type propagate down to libcurl makes it more complex now. I was thinking of keeping it as is until all parts are in (i.e. also the config editor) and then later possibly restructure it to simplify.
I also hope to be able to switch to curl's CMake, which can already do more than the current "maintained" win build system (ex. skip building the curl.exe, allow disabling non-HTTP protos, || build, setting output destination) and that seems to work just fine for HTTP-only configuration (despite the embedded warning still there).

@bpintea bpintea merged commit 115b591 into elastic:master Oct 2, 2018
@bpintea bpintea deleted the feature/static_libcurl branch October 2, 2018 08:50
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.

3 participants