This is an archive of the discontinued LLVM Phabricator instance.

Use z instead of ZLIB::ZLIB
AbandonedPublic

Authored by lxfind on Aug 6 2020, 3:13 PM.

Details

Reviewers
phosek
wenlei
Summary

With D79219, when building LLVM, the following is seen in file build_dir/lib/cmake/llvm/LLVMExports.cmake:

set_target_properties(LLVMSupport PROPERTIES
  INTERFACE_LINK_LIBRARIES "curses;m;ZLIB::ZLIB;LLVMDemangle"

We should be consistent in how to set import libs here. Everywhere else we use the short names, such as rt, m and etc.
We should also use z here.

Diff Detail

Event Timeline

lxfind created this revision.Aug 6 2020, 3:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 6 2020, 3:13 PM
lxfind requested review of this revision.Aug 6 2020, 3:13 PM
arsenm added a subscriber: arsenm.Aug 6 2020, 3:18 PM

This seems like the backwards direction. Namespaced imported targets are the more modern cmake option

lxfind added a comment.Aug 6 2020, 3:22 PM

@arsenm, we use the direct names everywhere else though (if you scan through the rest of this file). Anyway, I don't mind using it as long as it works properly. I have seen (and have seen others asking in the other commit as well), that ZLIB::ZLIB shows up in build_dir/lib/cmake/llvm/LLVMExports.cmake. That needs to be resolved.

phosek added a comment.Aug 6 2020, 4:02 PM

I agree with @arsenm, this is backwards of what we want to do. The goal of D79219 is to move to modern CMake and simplify life for consumers of LLVM like Swift.

lxfind abandoned this revision.Aug 11 2020, 9:27 PM