[llvm-bugs] [Bug 46597] New: LLVMConfig.cmake and ClangConfig.cmake not available in installation path

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jul 6 04:15:07 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=46597

            Bug ID: 46597
           Summary: LLVMConfig.cmake and ClangConfig.cmake not available
                    in installation path
           Product: Build scripts
           Version: 10.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: cmake
          Assignee: unassignedbugs at nondot.org
          Reporter: th0ma7 at gmail.com
                CC: llvm-bugs at lists.llvm.org

I am new to playing with llvm/clang.  Basically I'm building llvm/clang and
installing it into a specific path.

In order to do an out-of-tree build of other subsequent tools (opencl-clang,
etc) I need to specify the directory where LLVMConfig.cmake and
ClangConfig.cmake resides.  It appear in my case that they only reside in the
build directory but are not installed over into my installation path.  Also
note that otherwise the build & install is indeed successful.

I'm building with the following arguments:
-DCMAKE_BUILD_TYPE=release
-DCMAKE_INSTALL_PREFIX=$(WORK_DIR)/install/$(INSTALL_PREFIX)
-DCMAKE_SYSTEM_NAME=Linux
-DCMAKE_C_COMPILER=$(TC_PATH)$(TC_PREFIX)gcc
-DCMAKE_CXX_COMPILER=$(TC_PATH)$(TC_PREFIX)g++
-DCMAKE_CXX_FLAGS=-std=c++11
-DLLVM_TARGETS_TO_BUILD=X86
-DLLVM_ENABLE_PROJECTS=clang
-DLLVM_INSTALL_TOOLCHAIN_ONLY=ON
-DLLVM_INSTALL_UTILS=ON
-DLLVM_BUILD_LLVM_DYLIB=ON
-DLLVM_LINK_LLVM_DYLIB=ON

Optionnally I tried playing with the following two options with no success:
-DCLANG_CMAKE_DIR=$(WORK_DIR)/install/$(INSTALL_PREFIX)/lib/cmake/clang
-DLLVM_CMAKE_DIR=$(WORK_DIR)/install/$(INSTALL_PREFIX)/lib/cmake/llvm

Files available post-build & install:
$ find . -name "LLVMConfig.cmake"
./work-native/llvm-project-llvmorg-10.0.0/build/lib/cmake/llvm/LLVMConfig.cmake
./work-native/llvm-project-llvmorg-10.0.0/build/cmake/modules/CMakeFiles/LLVMConfig.cmake
./work-native/llvm-project-llvmorg-10.0.0/build/NATIVE/lib/cmake/llvm/LLVMConfig.cmake
./work-native/llvm-project-llvmorg-10.0.0/build/NATIVE/cmake/modules/CMakeFiles/LLVMConfig.cmake

$ find . -name "ClangConfig.cmake"
./work-native/llvm-project-llvmorg-10.0.0/build/tools/clang/cmake/modules/CMakeFiles/ClangConfig.cmake
./work-native/llvm-project-llvmorg-10.0.0/build/lib/cmake/clang/ClangConfig.cmake
./work-native/llvm-project-llvmorg-10.0.0/build/NATIVE/tools/clang/cmake/modules/CMakeFiles/ClangConfig.cmake
./work-native/llvm-project-llvmorg-10.0.0/build/NATIVE/lib/cmake/clang/ClangConfig.cmake

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200706/08cd3701/attachment.html>


More information about the llvm-bugs mailing list