[Lldb-commits] [PATCH] D117639: [cmake] Avoid warning or extra suffix for CMAKE_INSTALL_LIBDIR
John Ericson via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jan 18 22:54:40 PST 2022
Ericson2314 created this revision.
Ericson2314 added reviewers: arichardson, compnerd, phosek, beanz.
Herald added subscribers: libcxx-commits, mgorny.
Herald added a reviewer: bollu.
Herald added a reviewer: ldionne.
Herald added projects: libunwind, Flang.
Herald added a reviewer: libunwind.
Ericson2314 requested review of this revision.
Herald added subscribers: llvm-commits, lldb-commits, jdoerfert.
Herald added projects: LLDB, libc++, libc++abi, LLVM.
Herald added a reviewer: libc++.
Herald added a reviewer: libc++abi.
We had two related problems with `GNUInstallDirs`:
1. It might default to `lib64`, clashing with LLVM's own `*_LIBDIR_SUFFIX`. I haven't used `CMAKE_INSTALL_LIBDIR` so far for this very reason.
2. Its defaulting logic must go after `project(..)` to work correctly, but `project(..)` is often in a standalone condition making this awkward, since the rest of the condition code may also need GNUInstallDirs.
A simple solution is to just default `CMAKE_INSTALL_LIBDIR` ourselves,
which avoids both issues.
I did this with a little copy-pasted code, but we could factor it out in
`/cmake` instead. I didn't do that yet because it would mean moving the
module path manipulations instead. But if that is desired, I will do it.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D117639
Files:
flang/CMakeLists.txt
libcxx/CMakeLists.txt
libcxxabi/CMakeLists.txt
libunwind/CMakeLists.txt
lld/CMakeLists.txt
lldb/CMakeLists.txt
llvm/CMakeLists.txt
polly/CMakeLists.txt
pstl/CMakeLists.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117639.401101.patch
Type: text/x-patch
Size: 4054 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220119/eb870efd/attachment-0001.bin>
More information about the lldb-commits
mailing list