This is an archive of the discontinued LLVM Phabricator instance.

[NFC][cmake] Respect LLVM_ENABLE_TERMINFO when building llvm-config
Needs ReviewPublic

Authored by andrew-wja on Jan 27 2022, 6:15 AM.

Details

Reviewers
mgorny
Summary

llvm-config currently ignores LLVM_ENABLE_TERMINFO and always passes -ltinfo when linking the executable.

This currently breaks cross-compilation of LLVM for a target system without a native libtinfo available, which is not ideal.

This patch simply removes -ltinfo from the llvm-config link line if LLVM_ENABLE_TERMINFO is false.

Diff Detail

Event Timeline

andrew-wja requested review of this revision.Jan 27 2022, 6:15 AM
andrew-wja created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJan 27 2022, 6:15 AM

Please upload patches generated with -U9999, so that Phabricator has the complete context to show.

That said, I'm sorry but I'm confused. Could you explain in greater detail what are you doing? llvm-config doesn't sound like something you should use for cross-compiling.