BUILD_SHARED_LIBS=TRUE currently isn't working for Linux x86_64
This patch fixes the link errors and also some runtime errors
Test Plan:
CC=clang CXX=clang++ cmake -GNinja -DBUILD_SHARED_LIBS=TRUE -DCMAKE_LINKER=ld.gold -DCMAKE_BUILD_TYPE=Debug ../../llvm
ninja
ninja check-lldb
llvm-svn: 226039
variable (now provided both by the normal parent LLVM CMake files and by
the LLVMConfig.cmake file used by the standalone build).
This allows LLDB to build into and install into correctly suffixed
libdirs. This is especially significant for LLDB because the python
extension building done by CMake directly uses multilib suffixes when
the host OS does, and the host OS will not always look back and forth
between them. As a consequence, before LLVM, Clang, and LLDB (and every
other subproject) had support for using LLVM_LIBDIR_SUFFIX, you couldn't
build or install LLDB on a multilib system with its python extensions
enabled. With this patch (on top of all the others I have submitted
throughout the project), I'm finally able to build and install LLDB on
my system with Python support enabled. I'm also able to actually run the
LLDB test suite, etc. Now, a *huge* number of the tests still fail on my
Linux system, but hey, actually running them and them testing the
debugger is a huge step forward. =D
llvm-svn: 224930
the same way the LLVM CMake build does, notably using the proper CMake
module and specifically requesting an older Python version. LLDB relies
pretty heavily on not using Python 3 at this point, and without this
patch it ends up trying to use Python 3 which ends quite badly. =] With
this, I'm able to build LLDB in its standalone mode successfully on
Linux when I have both Python 2.7 and Python 3.3 installed.
llvm-svn: 224929
As a first step in addressing Bug #21921 this patch prefers
the python-based SWIG generation by default rather than the
shell-based SWIG generation any time python is enabled
(e.g. LLDB_DISABLE_PYTHON is 0).
Additionally, this patch changes the default value of
LLDB_DISABLE_PYTHON from 1 to 0 on Windows.
Anyone not using the CMake build is unaffected by this patch.
llvm-svn: 224543
This allows me to generate a Visual Studio solution that builds LLDB if
you have standalone builds of LLVM and Clang lying around.
Unfortunately, you have to pass *four* CMake variables in, but it means
you don't have to take the extra step of installing Clang and LLVM to
some package prefix.
Hopefully this will generate a more usable XCode project too.
llvm-svn: 221413
This patch fixes a number of issues with embedded Python on
Windows. In particular:
1) The script that builds the python modules was normalizing the
case of python filenames during copies. The module name is
the filename, and is case-sensitive, so this was breaking code.
2) Changes the build to not attempt to link against python27.lib
(e.g. the release library) when linking against msvcrt debug
library. Doing a debug build of LLDB with embedded python
support now requires you to provide your own self-compiled
debug version of python.
3) Don't import termios when initializing the interpreter. This
is part of a larger effort to remove the dependency on termios
since it is not available on Windows. This particular instance
was unnecessary and unused.
Reviewed by: Todd Fiala
Differential Revision: http://reviews.llvm.org/D4441
llvm-svn: 212785
Teach add_lldb_library to correctly use the CMake 2.8.12
PUBLIC/PRIVATE/INTERFACE keywords. LLDB's CMake configuration would
inconsistently apply these keywords; this was previously a warning in
CMake 2.x but became an error in CMake 3.
llvm-svn: 212482
This change removes the ScriptInterpreter::TerminateInterpreter() call which
ended up endlessly calling itself as things currently stand. It also cleans
up some other Windows-related cmake changes.
See http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20140630/011544.html
for more details.
Change by Zachary Turner
llvm-svn: 212320
Currently Windows disables Python builds by default. This
change ensures we don't process the scripts dir when we're
on Windows unless we're explicitly enabling python, which
prevents a build error.
Change by Deepak Panickal
llvm-svn: 212319
- Ported the SWIG wrapper shell scripts to Python so that they would work on Windows too along with other platforms
- Updated CMake handling to fix SWIG errors and manage sym-linking on Windows to liblldb.dll
- More build fixes for Windows
The pending issues are that two Python modules, termios and pexpect are not available on Windows.
These are currently required for the Python command interpreter to be used from within LLDB.
llvm-svn: 212111
python bindings.
For example, this prevents errors on systems that disable python because
the system python isn't available. Without this, we still try to install
things and get install errors when that doesn't work.
llvm-svn: 211899
Change r210035 broke the Darwin cmake build. The
initial change was intended to stop the --start-group/--end-group
linker flags from being passed to non-gcc/clang-looking compilers,
stopping MSVC from warning on linking. That change, however,
caused MacOSX cmake-based builds to start using the --start-group/
--end-group flags, even though the MacOSX linker doesn't support
them. That broke the MacOSX clang build.
The fix keeps the newer check for a gcc-compatible compiler, but
specifically excludes MacOSX.
llvm-svn: 211123
Disables exception handling in LLDB, using appropriate compiler
flags depending on the platform. This is consistent with the build
of LLVM, should improve performance, and also removes a substantial number
of warnings from the Windows build.
See http://reviews.llvm.org/D3929 for more details.
Change by Zachary Turner
llvm-svn: 209752
This updates the target_link_libraries invocation when building with CMake
2.8.12 or newer. The newer version of CMake warns when keyword and plain
signatures are used for target_link_libraries. This addresses that difference
while maintaining compatibility with the older releases by defining a macro for
the keyword that is defined based on the current version of CMake.
Patch originally by chapuni!
llvm-svn: 206850
A redefinition of append_if in CompilerRTUtils causes the append_if to fail.
Manually append the values to the flags.
Thanks to Kuba Ober for pointing this out!
llvm-svn: 204311
libxml2's include path was unconditionally set to /usr/include/libxml2. This
would work previously, however, Mavericks removed the /usr/include directory.
Since LLDB already requires clang, which via LLVM's build infrastructure
searches for libxml2, we have a proper include path for libxml2. If
LIBXML2_FOUND is set, do not touch the libxml2 search path. Instead, allow the
clang's definition to propagate throughout the LLVM build. Otherwise, switch to
find_package(LibXml2) as clang does. This will ensure that the correct path is
used for libxml2 irrespective of the platform.
Furthermore, treat libxml2 as a system provided library. It is not part of the
LLVM source base so it is of little value to enable all warnings on its headers.
This unifies the treatment of libxml2 across clang and LLDB.
llvm-svn: 203955
Check if the compiler actually supports the flags that are being added.
Previously, the compiler flags would be used improperly push the flags to the
compiler. Particularly, on Darwin, the option would be pushed to the compiler
even if it does not support it.
llvm-svn: 203532
The many many benefits include:
1 - Input/Output/Error streams are now handled as real streams not a push style input
2 - auto completion in python embedded interpreter
3 - multi-line input for "script" and "expression" commands now allow you to edit previous/next lines using up and down arrow keys and this makes multi-line input actually a viable thing to use
4 - it is now possible to use curses to drive LLDB (please try the "gui" command)
We will need to deal with and fix any buildbot failures and tests and arise now that input/output and error are correctly hooked up in all cases.
llvm-svn: 200263
- [ninja|make] lldb-cpp-doc builds the C++ API reference docs
- [ninja|make] lldb-python-doc builds the python API reference docs
- updated build page on website to include instructions to build docs
Tested on Linux/Mac OS X
llvm-svn: 182752
- now, the output binary is called 'lldb-3.4' instead of 'lldb'
- a symlink 'lldb' -> 'lldb-3.4' is also created
- this fixes one of the problems preventing CMake from building Debian packages
llvm-svn: 182148
- conditionally build mac-specific plugins only on mac (PluginObjectFileMachO, PluginDynamicLoaderDrawinKernel and PluginDynamicLoaderMacOSXDYLD)
- clean up warnings by ignoring deprecated declarations (auto_ptr for example)
llvm-svn: 179694
- missing definitions were causing different definitions of type 'off_t', resulting in linker errors
- fix is to define _LARGEFILE_SOURCE and _FILE_OFFSET_BITS=64
llvm-svn: 176595
- resolved circular dependency issue by making liblldb depend directly on LLDBWrapPython.cpp
- removed use of '..' for relative directories -- ninja doesn't like this
- fixed build-order problem
llvm-svn: 176517