[LLVMdev] Some CMake issues (Are you being served?)
Greg Fitzgerald
garious at gmail.com
Mon Feb 3 12:35:01 PST 2014
On Mon, Feb 3, 2014 at 6:56 AM, David Chisnall
<David.Chisnall at cl.cam.ac.uk> wrote:
> Just to add, the ability to build clang against an installed LLVM tree would make it significantly easier for the FreeBSD LLVM and Clang ports to switch to using CMake
+1. This opens a can of worms, but one well worth opening IMHO
because it affects, at least, compiler-rt, libcxx, polly, and lld. If
clang is built against the installed llvm, then it begs the question,
how should a build compose both clang and llvm? Some options:
1) Write a CMake file that invokes two CMake builds, the llvm build,
and then the clang build.
2) Clang's CMakeLists.txt adds 'add_subdirectory(llvm)', and adds a
dependency on its 'install' step and pings the target for its install
directory. But can two builds call 'add_subdirectory(llvm)' in the
same CMake build? Can the llvm install directory be different from
the clang install directory?
3) Clang's CMakeLists.txt has an 'add_subdirectory(llvm)' but no
install step. This suggests that it is somehow possible to build
against /either/ the installed directory or llvm's binary directory.
If so, how can we ensure clang doesn't add a dependency to a file that
is unavailable in the final install directory?
Stephen, I'd appreciate your expert opinion here. Can multiple
independent customers of llvm be composed into a larger CMake build?
Thanks,
Greg
More information about the llvm-dev
mailing list