vivek pandya via llvm-dev
2015-Dec-14 18:07 UTC
[llvm-dev] Build libLTO.a instead of libLTO.dylib with Cmake
Hello, Is there any CMake variable available to build LLVM libs as static libraries. I found one -DLIBCLANG_BUILD_STATIC=ON but what if I want libLTO.a instead of libLTO.dylib ? *Vivek Pandya* -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151214/1e03efc9/attachment.html>
Mehdi Amini via llvm-dev
2015-Dec-14 18:54 UTC
[llvm-dev] Build libLTO.a instead of libLTO.dylib with Cmake
Hi, Having a look at tools/lto/CMakeLists.txt it is unconditionally defined as a shared library: add_llvm_library(LTO SHARED ${SOURCES}) Have you tried removing the “SHARED” keyword here? — Mehdi> On Dec 14, 2015, at 10:07 AM, vivek pandya via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hello, > > Is there any CMake variable available to build LLVM libs as static libraries. I found one -DLIBCLANG_BUILD_STATIC=ON but what if I want libLTO.a instead of libLTO.dylib ? > > > Vivek Pandya > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151214/6fa64069/attachment.html>
Chris Bieneman via llvm-dev
2015-Dec-15 00:28 UTC
[llvm-dev] Build libLTO.a instead of libLTO.dylib with Cmake
For libLTO we don’t build a static archive because the use case for libLTO is pretty specific, and there is virtually no code that is in libLTO and not in the LLVM static libraries. If there is code that is libLTO specific that you want to link into a static archive I think there is a better case for moving that code into libLLVMLTO rather than supporting making libLTO static. -Chris> On Dec 14, 2015, at 10:54 AM, Mehdi Amini via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hi, > > Having a look at tools/lto/CMakeLists.txt it is unconditionally defined as a shared library: > > add_llvm_library(LTO SHARED ${SOURCES}) > > Have you tried removing the “SHARED” keyword here? > > — > Mehdi > > > >> On Dec 14, 2015, at 10:07 AM, vivek pandya via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: >> >> Hello, >> >> Is there any CMake variable available to build LLVM libs as static libraries. I found one -DLIBCLANG_BUILD_STATIC=ON but what if I want libLTO.a instead of libLTO.dylib ? >> >> >> Vivek Pandya >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org> >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151214/7700399d/attachment.html>