[Openmp-commits] [PATCH] D99484: Use `GNUInstallDirs` to support custom installation dirs.

Louis Dionne via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Mar 31 08:34:49 PDT 2021

ldionne added a subscriber: phosek.
ldionne added a comment.

I am generally OK with the libcxx and libcxxabi changes.

Comment at: compiler-rt/cmake/Modules/CompilerRTUtils.cmake:389
     get_compiler_rt_target(${arch} target)
-    set(${install_dir} ${COMPILER_RT_INSTALL_PATH}/lib/${target} PARENT_SCOPE)
lebedev.ri wrote:
> This looks suspect
Yeah, I don't understand why this isn't just `CMAKE_INSTALL_LIBDIR` like elsewhere.

Comment at: libcxx/cmake/Modules/HandleLibCXXABI.cmake:66
           install(FILES "${LIBCXX_BINARY_INCLUDE_DIR}/${fpath}"
-            DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1/${dstdir}
             COMPONENT cxx-headers
compnerd wrote:
> Ericson2314 wrote:
> > compnerd wrote:
> > > @ldionne - how is the `LIBCXX_INSTALL_HEADER_PREFIX` used?  Can altering the value of `CMAKE_INSTALL_INCLUDEDIR` serve the purpose?
> > It is sometimes modified to be per target when multiple targets are being used at once. All things `CMAKE_INSTALL_*` are globally scoped so in general the combination builds are quite awkward.
> > 
> > (Having worked on Meson, I am really missing https://mesonbuild.com/Subprojects.html which is exactly what's needed to do this without these bespoke idioms that never work well enough . Alas...)
> I don't think that bringing up other build systems is particularly helpful.
> I do expect it to be modified, and I suspect that this is used specifically for builds that @ldionne supports.
Actually, I've never used it myself, but @phosek seems to be using it for the Runtimes build to output one set of headers for each target, as mentioned above.

It seems to me that tweaking `CMAKE_INSTALL_PREFIX` globally when driving the libc++ build from the runtimes build would be more in-line with the CMake way of doing things (one configuration == one build), but I'm curious to hear what @phosek has to say about that.

  rG LLVM Github Monorepo



More information about the Openmp-commits mailing list