[PATCH] D70026: [cmake] Always build the libLLVM shared library
Chris Bieneman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 11 10:40:42 PST 2019
beanz added a comment.
I very much dislike using `EXCLUDE_FROM_ALL`. I really believe `all` should be `all`, not `most things I think are important`. In general iteration cycles the `check-*` targets won't build or link libLLVM unless you specify `LLVM_LINK_LLVM_DYLIB`, and if you actually want to build everything as a means of testing your changes the `all` target should do that.
On the specifics of this change I think there are some problems because of CMake's lack of cache invalidation. Changing this variable won't actually change anything until people delete their build directories.
Instead if you remove all uses of the variable, and you could add:
if (MSVC or BUILD_SHARED_LIBS)
if (LLVM_LINK_LLVM_DYLIB)
message(FATAL_ERROR "LLVM_LINK_LLVM_DYLIB is not supported with BUILD_SHARED_LIBS or using MSVC")
endif()
return()
endif()
to llvm-shlib/CMakelists.txt to handle Win32, and it should have roughly the same impact without cache invalidation problems.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70026/new/
https://reviews.llvm.org/D70026
More information about the llvm-commits
mailing list