This is an archive of the discontinued LLVM Phabricator instance.

CMake: Check LLVM_ENABLE_LIBXML2 in clang
AbandonedPublic

Authored by rinon on Apr 3 2018, 3:52 PM.

Details

Reviewers
hans
rnk
Summary

If LLVM_ENABLE_LIBXML2=OFF, we should not attempt to link clang against
libxml2.

Diff Detail

Event Timeline

rinon created this revision.Apr 3 2018, 3:52 PM
rinon removed a subscriber: llvm-commits.Apr 3 2018, 3:52 PM
rnk added a comment.Apr 4 2018, 12:47 PM

The only think that links against libxml2 is c-index-test. Surely nobody cares about installing c-index-test on some other machine that lacks the local version of libxml2. What's the use case for this to justify the complexity of interacting with LLVM's configuration options?

rinon added a comment.Apr 4 2018, 5:46 PM

I'd be fine with not building c-index-test when building clang, but I didn't see any easy way to disable it.

My use-case here is just to build LLVM+clang without having to link against my system libxml2 at all. It's a rather weird build situation, but Android builds a toolchain against a fixed, prebuilt set of headers. My system libxml2 expects unicode support that these prebuilt headers don't have, so it's much simpler to just disable libxml2 support. This led me to the realization that you can't actually disable libxml2 support for clang, which struck me as odd since it's so unimportant.

rnk accepted this revision.Apr 10 2018, 10:49 AM

lgtm

This revision is now accepted and ready to land.Apr 10 2018, 10:49 AM
shafik added a subscriber: shafik.Sep 21 2023, 11:40 AM

Is this change still relevant of can we close this?

Herald added a project: Restricted Project. · View Herald TranscriptSep 21 2023, 11:40 AM
rinon abandoned this revision.Sep 21 2023, 12:16 PM

Looks like this was effectively implemented in c4d75361, so this change is no longer necessary.