[llvm-dev] Repo directory layout

via llvm-dev llvm-dev at lists.llvm.org
Thu May 24 08:47:44 PDT 2018


via llvm-dev <llvm-dev at lists.llvm.org> writes:

> Reid Kleckner via llvm-dev <llvm-dev at lists.llvm.org> writes:
>
>> The first layout is older, and the second is newer. Going forward,
>> things are likely to move around. The second layout is more flexible
>> because it doesn't put any repo inside another repo, so I would
>> recommend adopting it. At the very least, using it will put you in a
>> good position to adapt to any future layout changes.
>
> Note that I don't think the second layout supports having
> debuginfo-tests at the same level as "llvm."  It has to be in
> llvm/projects.  It would be nice to remove that restriction.

Well, I take that back.  It seems it is supported via
LLVM_ENABLE_PROJECTS.  You also have to set
LLVM_EXTERNAL_DEBUGINFO_TESTS_SOURCE_DIR.  Here's the current
description of that variable on the web page, which probably should be
updated:

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.

I have found that listing compiler-rt in LLVM_ENABLE_PROJECTS and
setting LLVM_EXTERNAL_COMPILER_RT_SOURCE_DIR also lets me build
compiler-rt checked out next to llvm.

In other words, the documentation limiting that variable to clang, ldd
and polly is not correct.

This is also confusing:

LLVM_EXTERNAL_PROJECTS:STRING
    Semicolon-separated list of additional external projects to build as
    part of llvm. For each project LLVM_EXTERNAL_<NAME>_SOURCE_DIR have
    to be specified with the path for the source code of the
    project. Example: -DLLVM_EXTERNAL_PROJECTS="Foo;Bar"
    -DLLVM_EXTERNAL_FOO_SOURCE_DIR=/src/foo
    -DLLVM_EXTERNAL_BAR_SOURCE_DIR=/src/bar.

What's the difference between that and LLVM_ENABLE_PROJECTS?

                                -David


More information about the llvm-dev mailing list