[llvm-dev] Installing selected subset of LLVM Tools with shared build
Marcin Słowik via llvm-dev
llvm-dev at lists.llvm.org
Sat Jul 1 08:37:06 PDT 2017
I have an application that requires a select subset of LLVM tools to be
installed into a custom-built sysroot. Until recently, I've been building
LLVM statically and everything seemed fine, but recently, due to disk space
limits, I have decided to give shared build a try.
The problem I encountered, however, is that when I ask `ninja` to only
build and install a specific component, its dependencies are being built,
but not installed. In particular:
cmake $sources_path/llvm \
-G Ninja \
cmake --build $build_dir --target llvm-ar
cmake --build $build_dir --target install-llvm-ar
This compiles all the required shared libraries, but installs only the
llvm-ar executable, which causes:
build-env/sysroot/bin/llvm-ar: error while loading shared libraries:
libLLVMX86CodeGen.so.5: cannot open shared object file: No such file or
Is there a way to force the existing build system to also install
dependencies, when using `install-$tool` target? AFAIK, plain `install`
builds and installs everything, which would require a manual search through
the output directory in order to clean up the unneeded tools.
Alternatively, is there an easy way to list the targets required by a
specific component in such a way, a proper collection of install targets
can be invoked later?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev