[llvm-bugs] [Bug 38440] New: LLVM_EXTERNAL_*_SOURCE_DIR not relative to topmost source directory

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 3 11:15:58 PDT 2018


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

            Bug ID: 38440
           Summary: LLVM_EXTERNAL_*_SOURCE_DIR not relative to topmost
                    source directory
           Product: Build scripts
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: cmake
          Assignee: unassignedbugs at nondot.org
          Reporter: tom at tromey.com
                CC: llvm-bugs at lists.llvm.org

The cmake docs (https://llvm.org/docs/CMake.html) say:

LLVM_EXTERNAL_{CLANG,LLD,POLLY}_SOURCE_DIR:PATH
    These variables specify the path to the source directory for the external
LLVM projects Clang, lld, and Polly, respectively, relative to the top-level
source directory. If the in-tree subdirectory for an external project exists
(e.g., llvm/tools/clang for Clang), then the corresponding variable will not be
used. If the variable for an external project does not point to a valid path,
then that project will not be built.


However, using a path relative to the top-level source directory does not work.

I have a directory structure like so:

.
├── build
└── src
    ├── llvm
    └── tools
        ├── clang
        └── lldb

To test it, "cd build" and then run:

cmake  -DLLVM_EXTERNAL_CLANG_SOURCE_DIR="../src/tools/clang"
-DLLVM_EXTERNAL_LLDB_SOURCE_DIR="../src/tools/lldb" ../src/llvm/

For me, this fails to include lldb in the build.
You can see this either by examining the output -- build with lldb
say something like:

-- Symbols (liblldb): exporting all symbols from the lldb namespace

... or by trying "make lldb" and having it fail.

Using a path relative to the build directory works.  An absolute path also
works.

I tend to think that the documented behavior is preferable; certainly it
would have been nicer in my situation.  However, another option would be to
fix this by changing the documentation.

-- 
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/20180803/529efae1/attachment.html>


More information about the llvm-bugs mailing list