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)