[libcxx-commits] [PATCH] D107892: [runtimes] Allow overriding where CMake installs RUNTIME type libraries (DLLs)

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Aug 18 03:28:17 PDT 2021


mstorsjo added a comment.

In D107892#2950876 <https://reviews.llvm.org/D107892#2950876>, @compnerd wrote:

> Why not just use CMAKE_RUNTIME_OUTPUT_DIRECTORY to initialize the value?

You mean instead of the e.g. `set(LIBUNWIND_INSTALL_RUNTIME_DIR bin ...` and `set(LIBUNWIND_INSTALL_RUNTIME_DIR bin/${LLVM_DEFAULT_TARGET_TRIPLE} ...` statements - making them e.g. `set(LIBUNWIND_INSTALL_RUNTIME_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ...`? By default `CMAKE_RUNTIME_OUTPUT_DIRECTORY` is unset it seems; such a setup makes the DLLs not be installed at all unless the user sets `CMAKE_RUNTIME_OUTPUT_DIRECTORY`.

Our own cmake code initializes `CMAKE_RUNTIME_OUTPUT_DIRECTORY` right below - so in libunwind/libcxxabi/libcxx, `CMAKE_RUNTIME_OUTPUT_DIRECTORY`, `CMAKE_ARCHIVE_OUTPUT_DIRECTORY` and `CMAKE_LIBRARY_OUTPUT_DIRECTORY` aren't anything you can set as an end-user to influence where things are installed (as they're overwritten unconditionally), but the end user should set e.g. `LIBUNWIND_INSTALL_LIBRARY_DIR` instead.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107892/new/

https://reviews.llvm.org/D107892



More information about the libcxx-commits mailing list