This is an archive of the discontinued LLVM Phabricator instance.

[lld][cmake] Fix BUILD_SHARED_LIBS installation
ClosedPublic

Authored by labath on Jan 23 2017, 3:01 AM.

Details

Summary

This fixes a regression caused by D28397, which switched lld from using
add_llvm_library to llvm_add_library. The latter does not automatically set up
install rules for libraries, as it's expected the project will set them up
manually based on its own needs.

This adds the install rules to add_lld_library for lld. They were inspired by
the similar add_clang_library macro in clang.

Diff Detail

Repository
rL LLVM

Event Timeline

labath created this revision.Jan 23 2017, 3:01 AM
davidlt accepted this revision.Jan 23 2017, 3:22 PM

Looks like this resolves issues with my builds:

a/slc6_amd64_gcc700/external/llvm/4.0.0-cms3/bin/lld-link
a/slc6_amd64_gcc700/external/llvm/4.0.0-cms3/bin/lld
a/slc6_amd64_gcc700/external/llvm/4.0.0-cms3/lib64/liblldDriver.so
a/slc6_amd64_gcc700/external/llvm/4.0.0-cms3/lib64/liblldConfig.so
a/slc6_amd64_gcc700/external/llvm/4.0.0-cms3/lib64/liblldReaderWriter.so.4.0.0
a/slc6_amd64_gcc700/external/llvm/4.0.0-cms3/lib64/liblldMachO.so.4.0.0
a/slc6_amd64_gcc700/external/llvm/4.0.0-cms3/lib64/liblldCOFF.so.4.0.0
a/slc6_amd64_gcc700/external/llvm/4.0.0-cms3/lib64/liblldCore.so.4
a/slc6_amd64_gcc700/external/llvm/4.0.0-cms3/lib64/liblldReaderWriter.so
a/slc6_amd64_gcc700/external/llvm/4.0.0-cms3/lib64/liblldMachO.so.4
a/slc6_amd64_gcc700/external/llvm/4.0.0-cms3/lib64/liblldYAML.so.4
a/slc6_amd64_gcc700/external/llvm/4.0.0-cms3/lib64/liblldDriver.so.4.0.0
a/slc6_amd64_gcc700/external/llvm/4.0.0-cms3/lib64/liblldReaderWriter.so.4
a/slc6_amd64_gcc700/external/llvm/4.0.0-cms3/lib64/liblldELF.so
a/slc6_amd64_gcc700/external/llvm/4.0.0-cms3/lib64/liblldCOFF.so.4
a/slc6_amd64_gcc700/external/llvm/4.0.0-cms3/lib64/liblldMachO.so
a/slc6_amd64_gcc700/external/llvm/4.0.0-cms3/lib64/liblldYAML.so.4.0.0
a/slc6_amd64_gcc700/external/llvm/4.0.0-cms3/lib64/liblldCore.so
a/slc6_amd64_gcc700/external/llvm/4.0.0-cms3/lib64/liblldELF.so.4.0.0
a/slc6_amd64_gcc700/external/llvm/4.0.0-cms3/lib64/liblldDriver.so.4
a/slc6_amd64_gcc700/external/llvm/4.0.0-cms3/lib64/liblldELF.so.4
a/slc6_amd64_gcc700/external/llvm/4.0.0-cms3/lib64/liblldConfig.so.4
a/slc6_amd64_gcc700/external/llvm/4.0.0-cms3/lib64/liblldCore.so.4.0.0
a/slc6_amd64_gcc700/external/llvm/4.0.0-cms3/lib64/liblldConfig.so.4.0.0
a/slc6_amd64_gcc700/external/llvm/4.0.0-cms3/lib64/liblldYAML.so
a/slc6_amd64_gcc700/external/llvm/4.0.0-cms3/lib64/liblldCOFF.so
This revision is now accepted and ready to land.Jan 23 2017, 3:22 PM

Oh, and I thought that it was a feature since lld was linked statically anyway! ;-D

Oh, and I thought that it was a feature since lld was linked statically anyway! ;-D

BUILD_SHARED_LIBS is not a recommended way for deployment of llvm http://llvm.org/docs/CMake.html, but it seems it is used nonetheless.

This revision was automatically updated to reflect the committed changes.