llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.48k stars 11.77k forks source link

CMAKE: darwin: lldb executables are no longer installed with `make install` if !LLDB_BUILD_FRAMEWORK #30781

Closed 0e6f8740-1d2a-4afc-85fd-df25c3a603fd closed 7 years ago

0e6f8740-1d2a-4afc-85fd-df25c3a603fd commented 7 years ago
Bugzilla Link 31433
Resolution FIXED
Resolved on Dec 20, 2016 10:28
Version unspecified
OS All
CC @llvm-beanz

Extended Description

As of some change over the past few months, running 'make install' no longer installs the lldb executables, only liblldb. The executables are built during the build phase but not installed during installation.

The project is configured with:

cmake -DCMAKE_INSTALL_PREFIX='/opt/local/libexec/llvm-devel' -DCMAKE_BUILD_TYPE=Debug -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_C_COMPILER="$CC" -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_MODULE_PATH=/opt/local/share/cmake/Modules -DCMAKE_VERBOSE_MAKEFILE=ON -Wno-dev -DCMAKE_INSTALL_NAME_DIR=/opt/local/libexec/llvm-devel/lib -DCMAKE_INSTALL_RPATH=/opt/local/libexec/llvm-devel/lib -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local/libexec/llvm-devel;/opt/local;/usr" -DLLVM_LINK_LLVM_DYLIB=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_ENABLE_FFI=ON -DLLVM_BINDINGS_LIST=none -DFFI_INCLUDE_DIR=/opt/local/include -DFFI_LIBRARY_DIR=/opt/local/lib -DLLDB_CODESIGN_IDENTITY=- -DCLANG_ENABLE_ARCMT=OFF -DCLANG_INCLUDE_TESTS=OFF -DCLANG_ENABLE_STATIC_ANALYZER=OFF -DLLVM_BUILD_RUNTIME=ON -DLIBCXX_ENABLE_SHARED=OFF -DLIBCXX_INSTALL_LIBRARY=OFF -DPYTHON_EXECUTABLE=/opt/local/bin/python2.7 -DPYTHON_INCLUDE_DIR=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.11" -DCMAKE_OSX_SYSROOT="/"


Looking through various history, I see that r286059 was successful, so the regression was some point after that. I'll see if I can narrow it down.

llvm-beanz commented 7 years ago

Had the install action nested in the wrong conditional. Fix landed in r290180.

llvmbot commented 7 years ago

I confirm that this fixes installation of bin/ files on NetBSD with LLDB rev. 289997.

llvmbot commented 7 years ago

I can confirm that it fixes the issue for me.

llvmbot commented 7 years ago

Thanks for looking into this. I've noticed this as well on Linux, and I'll test your patch later today.

0e6f8740-1d2a-4afc-85fd-df25c3a603fd commented 7 years ago

0001-https-llvm.org-bugs-show_bug.cgi-id-31433

0e6f8740-1d2a-4afc-85fd-df25c3a603fd commented 7 years ago

It looks like this is fallout from:

commit 4fc6d2008a27197000060061746e65c8280827e7 Author: Chris Bieneman beanz@apple.com Date: Thu Dec 15 22:01:17 2016 +0000

[CMake] Refactor LLDB libraries and tools to be components

In LLVM's CMake we have a convention that components have both a build and an install target. Making LLDB follow this convention will allow LLDB to take advantage of the LLVM_DISTRIBUTION_COMPONENTS build option from LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@289879 91177308-0d34-0410-b5e6-96231b3b80d8

With that change, GENERATE_INSTALL is only honored in add_lldb_executable if LLDB_BUILD_FRAMEWORK is set.