user1832047
user1832047

Reputation: 305

LLVM won't build libLLVM-3.4.so

I'm trying to build llvm 3.4.2 on CentOS 7 with GCC 4.8.5. I can successfully build all of the libs, except libLLVM-3.4.so doesn't want to build - everything else gets created except that one. What's worse is I've managed it previously in the past, but can't do it again now.

I've tried both with CMake and autotools, with the same result. Is there an option I'm missing? Or some error in configuration possibly?

Upvotes: 1

Views: 1828

Answers (2)

Piyush Shukla
Piyush Shukla

Reputation: 21

You can use

LLVM_BUILD_LLVM_DYLIB

when building from source. The official docs say

BUILD_SHARED_LIBS is only recommended for use by LLVM developers. If you want to build LLVM as a shared library, you should use the LLVM_BUILD_LLVM_DYLIB option.

source: https://llvm.org/docs/CMake.html

Upvotes: 2

user1832047
user1832047

Reputation: 305

Found it - it was the --enable-shared flag to configure which causes the main shared library to be built. Confusingly this does something completely different from the CMake BUILD_SHARED_LIBS variable, which causes each of the individual libraries to be built as a shared library instead of static, but doesn't build the main shared library.

Upvotes: 7

Related Questions