[PATCH] D70519: [CMake] use findzlib util to include zlib
Pavel Labath via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 22 00:43:18 PST 2019
labath added a reviewer: beanz.
labath added a subscriber: beanz.
labath added a comment.
In D70519#1755566 <https://reviews.llvm.org/D70519#1755566>, @Holman wrote:
> Ah thanks for the context! Unfortunately, it does change that to `-l/usr/lib/x86_64-linux-gnu/libz.so`. What do you think if I call FindZLIB `if (ZLIB_ROOT OR ZLIB_INCLUDE_DIR OR ZLIB_LIBRARY)`, and otherwise use the existing loop?
I think that's... suboptimal? Let me pull in @beanz here as he has a lot of ideas about cmake (though some of his ideas include deleting llvm-config :P).
Overall, I very much like using standard cmake solution for finding dependencies, but don't like duplicating logic even more. Maybe we could pry apart (either in cmake or llvm-config) that `/usr/lib/x86_64-linux-gnu/libz.so` into appropriate `-L -l` switches? Or just get llvm-config to drop the `-l` from `-l/usr/lib/x86_64-linux-gnu/libz.so`, so it produces a valid (though not completely equivalent) compile line?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70519/new/
https://reviews.llvm.org/D70519
More information about the llvm-commits
mailing list