This is an archive of the discontinued LLVM Phabricator instance.

[Support] [Debuginfod] Move HTTPClient to Debuginfod library.
ClosedPublic

Authored by noajshu on Dec 5 2021, 9:25 PM.

Details

Summary

Following the discussion in D112753, this moves the HTTPClient from Support to Debuginfod library so that tools depending on Support do not automatically depend on Curl as well. This also removes HTTPClient::initialize() and HTTPClient::cleanup() from InitLLVM so these steps should be implemented by user tools instead.

Diff Detail

Event Timeline

noajshu created this revision.Dec 5 2021, 9:25 PM
noajshu requested review of this revision.Dec 5 2021, 9:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 5 2021, 9:25 PM
phosek accepted this revision.Dec 6 2021, 12:16 AM

LGTM

llvm/unittests/Debuginfod/HTTPClientTests.cpp
1

This should be updated as well.

This revision is now accepted and ready to land.Dec 6 2021, 12:16 AM
kpn added a subscriber: kpn.Dec 6 2021, 8:58 AM

BTW, for a future ticket: having curl enabled without first checking to see if it is installed creates builds failures on non-Linux hosts. OK, yes, it can be disabled with a cmake argument, but it would be better if the extra cmake argument wasn't needed. A warning at cmake configure time that says what features will be missing without curl is probably a good idea as well.

BTW, for a future ticket: having curl enabled without first checking to see if it is installed creates builds failures on non-Linux hosts. OK, yes, it can be disabled with a cmake argument, but it would be better if the extra cmake argument wasn't needed. A warning at cmake configure time that says what features will be missing without curl is probably a good idea as well.

Thanks, the configuration step does check if curl is installed first before trying to build with it. Does this not work for your build? And does D115131 solve the problem?

noajshu updated this revision to Diff 392119.Dec 6 2021, 10:07 AM
noajshu marked an inline comment as done.

Fix header of HTTP Unit tests.

noajshu edited the summary of this revision. (Show Details)Dec 6 2021, 10:10 AM
kpn added a comment.Dec 6 2021, 12:46 PM

I don't see how this will resolve my issue. I'll start a new thread on llvm-dev. Don't let me block this review.

I don't see how this will resolve my issue. I'll start a new thread on llvm-dev. Don't let me block this review.

Sounds good, let's debug it there.

Thanks for the comments. I'm watching out for any buildbot failures on 0e0f1b28fce841b077228fa23356b1ae38844ae2. If there are none then I will commit D115131 later today.

This revision was landed with ongoing or failed builds.Dec 6 2021, 5:26 PM
This revision was automatically updated to reflect the committed changes.

Moving the dependency to another library doesn't help in the case of DLLVM_BUILD_LLVM_DYLIB=ON, because libLLVMDebuginfod is included in libLLVM.so. Are there still plans to make the libcurl dependency off by default?

Moving the dependency to another library doesn't help in the case of DLLVM_BUILD_LLVM_DYLIB=ON, because libLLVMDebuginfod is included in libLLVM.so. Are there still plans to make the libcurl dependency off by default?

I think we should consider it, toolchain vendors who want to include debuginfod in their distribution can still enable it manually, but we'll avoid the accidental dependency for everyone else.

D115500 should set Curl off by default :)