[PATCH] [CMake] Introduce libLLVM.so as LLVM_ENABLE_SHARED

NAKAMURA Takumi geek4civic at gmail.com
Tue Mar 4 09:06:53 PST 2014


Hi chandlerc,

Note, this includes; http://llvm-reviews.chandlerc.com/D2941

**Why using OBJLIB?**
- --whole-archive is available only for GNU ld. Rather, I chose linking whole OBJLIBs.
- No need to create *.a(s). Archive files may be created in parallel.

**Why introducing DEPENDS instead of add_dependencies?**
- add_dependencies(target) works only for the target. Implicitly generated obj.LLVM*** are required to add deps to generated files.

**Why llvm-tblgen and clang-tblgen are tweaked?**
- They should be built out of LINK_COMPONENTS with -static.

**Why LLVM_ENABLE_SHARED turns off LLVM_DEAD_STRIP?**
- I think -ffunction-sections would not make sense for the big libLLVM.so.

**TODO**
- libLLVM-3.5.so may have VERSION.
- Consider c-index-test with libclang. With this, it requires "libclang.so libLLVM.so" in its command line to link it.
  If we could use -rpath-link, it might be simply "libclang.so" w/o libLLVM.so.
- Introduce Clang's big shared libraries.
- Introduce LLVM.dll for cygming.
- Introduce LLVM.dll for whole win32. (It would require dllexport/dllimport in public headers)

http://llvm-reviews.chandlerc.com/D2942

Files:
  clang/tools/driver/CMakeLists.txt
  clang/utils/TableGen/CMakeLists.txt
  llvm/CMakeLists.txt
  llvm/cmake/modules/AddLLVM.cmake
  llvm/cmake/modules/HandleLLVMOptions.cmake
  llvm/cmake/modules/TableGen.cmake
  llvm/lib/Analysis/CMakeLists.txt
  llvm/lib/Analysis/IPA/CMakeLists.txt
  llvm/lib/Bitcode/Reader/CMakeLists.txt
  llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt
  llvm/lib/CodeGen/CMakeLists.txt
  llvm/lib/CodeGen/SelectionDAG/CMakeLists.txt
  llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt
  llvm/lib/IR/CMakeLists.txt
  llvm/lib/Transforms/IPO/CMakeLists.txt
  llvm/lib/Transforms/InstCombine/CMakeLists.txt
  llvm/lib/Transforms/Instrumentation/CMakeLists.txt
  llvm/lib/Transforms/ObjCARC/CMakeLists.txt
  llvm/lib/Transforms/Scalar/CMakeLists.txt
  llvm/lib/Transforms/Utils/CMakeLists.txt
  llvm/lib/Transforms/Vectorize/CMakeLists.txt
  llvm/tools/CMakeLists.txt
  llvm/tools/bugpoint/CMakeLists.txt
  llvm/tools/llc/CMakeLists.txt
  llvm/tools/llvm-shlib/CMakeLists.txt
  llvm/tools/opt/CMakeLists.txt
  llvm/unittests/ExecutionEngine/JIT/CMakeLists.txt
  llvm/utils/TableGen/CMakeLists.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2942.1.patch
Type: text/x-patch
Size: 15718 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140304/7c877abe/attachment.bin>


More information about the llvm-commits mailing list