summaryrefslogtreecommitdiffstats
path: root/lldb/cmake/modules
Commit message (Collapse)AuthorAgeFilesLines
...
* [CMake] Initial support for LLDB.frameworkChris Bieneman2016-09-212-4/+31
| | | | | | | | | | | | | | | | | | | Summary: This patch adds a CMake option LLDB_BUILD_FRAMEWORK, which builds libLLDB as a macOS framework instead of as a *nix shared library. With this patch any LLDB executable that has the INCLUDE_IN_FRAMEWORK option set will be built into the Framework's resources directory, and a symlink to the exeuctable will be placed under the build directory's bin folder. Creating the symlinks allows users to run commands from the build directory without altering the workflow. The framework generated by this patch passes the LLDB test suite, but has not been tested beyond that. It is not expected to be fully ready to ship, but it is a first step. With this patch binaries that are placed inside the framework aren't being properly installed. Fixing that would increase the patch size significantly, so I'd like to do that in a follow-up. Reviewers: zturner, tfiala Subscribers: beanz, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D24749 llvm-svn: 282110
* Add cmake option to choose whether to use the builtin demanglerPavel Labath2016-08-261-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously the builting demangler was on for platforms that explicitly set a flag by modifying Mangled.cpp (windows, freebsd). The Xcode build always used builtin demangler by passing a compiler flag. This adds a cmake flag (defaulting to ON) to configure the demangling library used at build time. The flag is only available on non-windows platforms as there the system demangler is not present (in the form we're trying to use it, at least). The impact of this change is: - linux: switches to the builtin demangler - freebsd, windows: NFC (I hope) - netbsd: switches to the builtin demangler - osx cmake build: switches to the builtin demangler (matching the XCode build) The main motivation for this is the cross-platform case, where it should bring more consistency by removing the dependency on the host demangler (which can be completely unrelated to the debug target). Reviewers: zturner, emaste, krytarowski Subscribers: emaste, clayborg, lldb-commits Differential Revision: https://reviews.llvm.org/D23830 llvm-svn: 279808
* Revert "[lldb][cmake] Remove libclang as an lldbBase dependency (NFCI)"Vedant Kumar2016-08-191-1/+4
| | | | | | | | | | | | | This reverts commit r279296. Including LLDBDependencies breaks the netbsd lldb bot because it exposes LLDB_USED_LIBS, which causes lldb_link_common_libs to run to completion in unintended sites, which results in a malformed call to target_link_libraries. http://lab.llvm.org:8011/builders/lldb-amd64-ninja-netbsd7/builds/5989 Thanks to Chris Bieneman for figuring this out! llvm-svn: 279322
* [lldb][cmake] Remove libclang as an lldbBase dependency (NFCI)Vedant Kumar2016-08-191-4/+1
| | | | | | | | | | | | | | | | It's pulling in all kinds of things it doesn't need (e.g, clang-tidy!). Eliminating this dependency removes 1056 dependencies from the 'CommandObjectFrame.cpp.o' target and 454 dependencies from the 'lldb' target. On my machine, this shaves 7 minutes off of a clean build of lldb. Thanks to Zachary Turner for pointing out some issues with an earlier version of this patch! Differential Revision: https://reviews.llvm.org/D22987 llvm-svn: 279296
* Remove cmake legacy codePavel Labath2016-08-172-13/+3
| | | | | | | | | | | | Summary: Cmake 2.8 support is gone and not coming back. We can remove a bit of legacy code now. Reviewers: zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D23554 llvm-svn: 278924
* Fix LLDBConfig.cmake to enable python enabled build for all 64 bit lldb targetsOmair Javaid2016-07-261-6/+0
| | | | | | Differential revision: https://reviews.llvm.org/D22771 llvm-svn: 276814
* Fixes for standalone build:Eugene Zelenko2016-07-151-0/+2
| | | | | | | | | * include CheckAtomic to set HAVE_CXX_ATOMICS64_WITHOUT_LIB properly (introduced in r274121) * hint Clang CMake files for LLVM CMake files location (inctroduced in ~ r274176) Differential revision: https://reviews.llvm.org/D22322 llvm-svn: 275641
* [cmake] Remove the LLDB versions of the exception-controlling variablesPavel Labath2016-05-261-22/+0
| | | | | | | | | | | | | | | Summary: One can still use the LLVM variables to control this: LLVM_ENABLE_EH, LLVM_ENABLE_RTTI. It's not clear to me why one would want to control these at lldb level and it's generally not even a good idea to compile parts of the same binary with different values of these flags. Reviewers: zturner, tfiala Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20673 llvm-svn: 270863
* [cmake] Add a big warning about a libstdc++ issuePavel Labath2016-05-261-0/+24
| | | | | | | | | | | | | | | | | | | | | | | Summary: Recent increase in the usage of std::weak_ptr has caused us to rediscover an issue in libstdc++ versions prior to 4.9 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59656>, which make this class unusable without exceptions in the presence of multiple threads. It's virtualy impossible to work around this issue without implementing our own shared_ptr/weak_ptr substitutes, which does not seem like a good idea. Therefore, I am adding a big CMake warning which warns you about this issue if you're attempting a to do a build which is suceptible to this problem and suggests possible alternatives. Right now, nothing spectacular will happen if you ignore this warning (all the crashes I have seen occur during process shutdown), but there's no guarantee the situation will not change in the future. Reviewers: tberghammer, tfiala, nitesh.jain, omjavaid, emaste, krytarowski Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20671 llvm-svn: 270854
* Fix standalone LLDB build, when LLVM/Clang were built with ↵Eugene Zelenko2016-05-181-1/+19
| | | | | | | | | | LLVM_INSTALL_TOOLCHAIN_ONLY=ON. Fix standalone build with CMake 2.8.12.2. Differential revision: http://reviews.llvm.org/D20344 llvm-svn: 269996
* Add CMake bits necessary for standalone buildKamil Rytarowski2016-05-121-49/+64
| | | | | | | | | | | | Summary: Developed on NetBSD with pkgsrc. Reviewers: zturner, labath Subscribers: jevinskie, zturner, tfiala, Eugene.Zelenko, artagnon, joerg, lldb-commits Differential Revision: http://reviews.llvm.org/D15067 llvm-svn: 269332
* Fix NetBSD build with CMake 3.5.2Kamil Rytarowski2016-05-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Building HEAD of LLDB fails in linking against DebugInfoPDB. It also prints the following warning: ``` CMake Warning (dev) in source/Plugins/SymbolFile/PDB/CMakeLists.txt: Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link interface. Run "cmake --help-policy CMP0022" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Target "lldbPluginSymbolFilePDB" has an INTERFACE_LINK_LIBRARIES property. This should be preferred as the source of the link interface for this library but because CMP0022 is not set CMake is ignoring the property and using the link implementation as the link interface instead. INTERFACE_LINK_LIBRARIES: LLVMDebugInfoPDB Link implementation: (empty) ``` CMP0022 was introduced in CMake-2.8.11, bump minimal required version from 2.8 to 3.0 to gain more useful features like libexecinfo(3) detection on NetBSD. Reviewers: emaste, zturner, labath Subscribers: zturner, lldb-commits, joerg Differential Revision: http://reviews.llvm.org/D19685 llvm-svn: 268191
* Unicode support on Win32.Zachary Turner2016-03-221-0/+5
| | | | | | | | | | | | | Win32 API calls that are Unicode aware require wide character strings, but LLDB uses UTF8 everywhere. This patch does conversions wherever necessary when passing strings into and out of Win32 API calls. Patch by Cameron Differential Revision: http://reviews.llvm.org/D17107 Reviewed By: zturner, amccarth llvm-svn: 264074
* Add support for reading line tables from PDB files.Zachary Turner2016-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | PDB is Microsoft's debug information format, and although we cannot yet generate it, we still must be able to consume it. Reason for this is that debug information for system libraries (e.g. kernel32, C Runtime Library, etc) only have debug info in PDB format, so in order to be able to support debugging of system code, we must support it. Currently this code should compile on every platform, but on non-Windows platforms the PDB plugin will return 0 capabilities, meaning that for now PDB is only supported on Windows. This may change in the future, but the API is designed in such a way that this will require few (if any) changes on the LLDB side. In the future we can just flip a switch and everything will work. This patch only adds support for line tables. It does not return information about functions, types, global variables, or anything else. This functionality will be added in a followup patch. Differential Revision: http://reviews.llvm.org/D17363 Reviewed by: Greg Clayton llvm-svn: 262528
* Fix the search path for CMake filesNiels Ole Salscheider2016-02-041-4/+4
| | | | | | | This allows to find the LLVM's CMake files after moving them in r259821. llvm-svn: 259845
* Fix linking with LLVM_LINK_LLVM_DYLIB=ONPavel Labath2016-01-271-2/+2
| | | | | | | | | | | | | | | Linking with LLVM shared libraries currently produces linker errors. This works around the issue (pr24953) by disabling linking with llvm so for lldb libraries. Patch by Evangelos Foutras. Reviewers: zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D16293 llvm-svn: 258921
* Patch cmake to allow detection of python 2.7.9+Aidan Dodds2015-12-171-2/+2
| | | | | | | | | | Some distributions of python have their version defined as follows in patchlevel.h (note the '+'): #define PY_VERSION "2.7.9+" The '+' char needs to be stripped by the cmake regex so that LLDBs python lib detection is successful. Differential Revision: http://reviews.llvm.org/D15566 llvm-svn: 255893
* Use library discovery for curses and panelBruce Mitchener2015-11-151-1/+16
| | | | | | | | | | | | | | | | | | | Summary: This approach is tunable with custom paths for curses library. It also detects whether there are requirements met. I make use of it on NetBSD. Patch by Kamil Rytarowski. Thanks! Reviewers: clayborg Subscribers: brucem, joerg, lldb-commits Differential Revision: http://reviews.llvm.org/D14529 llvm-svn: 253151
* LLDBStandalone: Report nice errors on missing varsRamkumar Ramachandra2015-11-101-7/+17
| | | | | | Differential Revision: http://reviews.llvm.org/D13819 llvm-svn: 252624
* Add more NetBSD platform glue for lldbBruce Mitchener2015-11-071-1/+2
| | | | | | | | | | | | | | | | | | Summary: These changes are still incomplete, but we are almost there. Changes: - CMake and gmake code - SWIG code - minor code additions Reviewers: emaste, joerg Subscribers: youri, akat1, brucem, lldb-commits, joerg Differential Revision: http://reviews.llvm.org/D14042 llvm-svn: 252403
* Correctly include LLVM_EXTERNAL_CLANG_SOURCE_DIR.Chaoren Lin2015-10-291-1/+5
| | | | | | | | | | Reviewers: sas, ovyalov Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14166 llvm-svn: 251589
* Avoid using `..` in paths for include dirs.Stephane Sezer2015-10-281-1/+1
| | | | | | | | | | | | | | | Summary: This breaks when using a symlink from llvm/tools/lldb to the lldb source tree, instead of cloning directly as a child. With this change, we can build properly, even when using links. Reviewers: dawn, brucem, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14089 llvm-svn: 251530
* Disable the strict-aliasing warnings produced by gccTamas Berghammer2015-10-231-0/+6
| | | | | | | | | | | | | GCC produce a lot of strict-aliasing warning for the LLDB codebase what makes reading the compile output very difficult. This change disable these warnings to reduce the noise as we already ignore them. We should consider re-enabling the warning if we fix all (or most) strict-aliasing violation first. Differential revision: http://reviews.llvm.org/D13981 llvm-svn: 251107
* Disable libxml2 on Windows for now.Zachary Turner2015-10-191-2/+5
| | | | | | | | | | | | | | Newer versions of CMake include a "smarter" FindLibxml2 package. In theory this is a good thing, but on Windows it's now smart enough to find the version that comes with Gnuwin32, which doesn't appear to be a valid libxml2 distribution. Or at the very least, LLDB currently uses some header files from libxml2 that are not part of this distribution. Nobody on Windows is using any of this functionality right now anyway, so just disable it. llvm-svn: 250709
* cmake: provide flag that enables 'log enable --stack' to provide useful ↵Todd Fiala2015-10-142-0/+25
| | | | | | | | | | | | | | | | | | | | file/function info on POSIX systems Adding the following flag to a cmake line: -DLLDB_EXPORT_ALL_SYMBOLS=TRUE will cause all symbols to be exported from liblldb. This enables the llvm backtrace mechanism to see and report backtrace symbols properly when using (lldb) log enable --stack ... Prior to this change, only the SB API symbols would show up on Linux and other systems that use a public-symbols-based backtrace lookup mechanism. log enable --stack ... is a very handy, quick way to understand the flow of how some log lines are getting hit within lldb without having to hook up a top-level debugger over your current debug session. llvm-svn: 250299
* Have CMake translate LLDB_PYTHON_HOME to forward slashes.Zachary Turner2015-10-091-1/+2
| | | | | | | Using backslashes causes the compiler to interpret them as escape sequences. llvm-svn: 249885
* Make CMake display more readable paths to Python binaries on WindowsBruce Mitchener2015-10-081-3/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously CMake would display messages like these: ``` -- LLDB Found PythonExecutable: $<$<CONFIG:Debug>:C:/Projects/Python-2.7.9-bin/x64/python_d.exe>$<$<NOT:$<CONFIG:Debug>>:C:/Projects/Python-2.7.9-bin/x64/python.exe> -- LLDB Found PythonLibs: $<$<CONFIG:Debug>:C:/Projects/Python-2.7.9-bin/x64/libs/python27_d.lib>$<$<NOT:$<CONFIG:Debug>>:C:/Projects/Python-2.7.9-bin/x64/libs/python27.lib> -- LLDB Found PythonDLL: $<$<CONFIG:Debug>:C:/Projects/Python-2.7.9-bin/x64/python27_d.dll>$<$<NOT:$<CONFIG:Debug>>:C:/Projects/Python-2.7.9-bin/x64/python27.dll> ``` This patch makes the messages look like this: ``` -- LLDB Found PythonExecutable: C:/Projects/Python-2.7.9-bin/x64/python.exe and C:/Projects/Python-2.7.9-bin/x64/python_d.exe -- LLDB Found PythonLibs: C:/Projects/Python-2.7.9-bin/x64/libs/python27.lib and C:/Projects/Python-2.7.9-bin/x64/libs/python27_d.lib -- LLDB Found PythonDLL: C:/Projects/Python-2.7.9-bin/x64/python27.dll and C:/Projects/Python-2.7.9-bin/x64/python27_d.dll ``` I've also added checks to ensure the messages are actually accurate, as in check that the files actually exist before claiming they've been found. If any of the files are missing Python integration will be disabled for the build. Patch by Vadim Macagon. Thanks! Reviewers: brucem, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13520 llvm-svn: 249671
* Teach CMake to find versions of Python != 2.7Zachary Turner2015-10-062-56/+90
| | | | llvm-svn: 249466
* Use the correct Python lib for each build configuration generated by the ↵Bruce Mitchener2015-10-011-9/+33
| | | | | | | | | | | | | | | | | | | | | Visual Studio CMake generator Summary: Previously `CMAKE_BUILD_TYPE` was used to determine whether to link in `python27.lib` or `python27_d.lib`, unfortunately this only works reliably when using a CMake generator that generates a single build configuration (e.g. Ninja). The Visual Studio CMake generator generates four build configurations at once (`Debug`, `Release`, `RelWithDebInfo`, `MinSizeRel`), so if `CMAKE_BUILD_TYPE` is set to `Debug` all four build configurations end up linking in `python27_d.lib`, this is clearly undesirable. To ensure that the correct Python lib is used for each build configuration the value of `PYTHON_LIBRARY` is now determined using generator expressions that evaluate to either the debug or release Python lib. The values of `PYTHON_EXECUTABLE` and `PYTHON_DLL` are now likewise determined using generator expressions. Note that these changes only apply to the Windows build. Patch by Vadim Macagon. Thanks! Reviewers: zturner, brucem Subscribers: zturner, lldb-commits Differential Revision: http://reviews.llvm.org/D13234 llvm-svn: 248991
* [cmake] Build lldb-server on Darwin, set dep on FreeBSD.Bruce Mitchener2015-09-171-2/+3
| | | | | | | | | | | | | | | | | | Summary: This switches the decision as to whether or not to lldb-server should be built to check the same flag that was added that controls whether or not it is added as a dependency to the 'lldb' target. It also sets that flag on FreeBSD to maintain parity with the existing build configuration / situation on FreeBSD. Reviewers: labath, emaste, tfiala Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12925 llvm-svn: 247913
* cmake fixes for lldb target.Todd Fiala2015-09-161-0/+17
| | | | | | | | | | | ninja lldb now does the following: * forces the python post-build step to fire, which sets up the python lldb module properly. * on Darwin and Linux, requires the lldb-server target to be built. * on Darwin, requires the debugserver target to be built. See http://reviews.llvm.org/D12899 for details. llvm-svn: 247810
* [cmake] Remove LLDB_ENABLE_PYTHON_SCRIPTS_SWIG_API_GENERATION.Bruce Mitchener2015-09-081-2/+0
| | | | | | | | | | | | | | | Summary: This should be a mandatory build process going forward, if Python is enabled. The longer term desire is to remove the old shell scripts entirely. Reviewers: zturner, clayborg, labath Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12667 llvm-svn: 246979
* Use -Wno-vla-extension globally.Bruce Mitchener2015-09-011-0/+6
| | | | | | | | | | | | | | | Summary: This was previously only established within debugserver, but there is a use of the VLA extension in source/Host/macosx/Symbols.cpp, so ignore this warning globally. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12515 llvm-svn: 246605
* Standalone cmake build improvements (bug #23889)Pavel Labath2015-07-171-0/+1
| | | | | | patch by Eugene Zelenko. llvm-svn: 242529
* Fix liblldb linking on RHEL 6 (bug #24140)Pavel Labath2015-07-172-20/+20
| | | | | | Patch by Eugene Zelenko. llvm-svn: 242525
* cmake no longer needs to deal with -std=c++11 checks.Bruce Mitchener2015-07-071-26/+0
| | | | | | | | | | | | | | | | LLVM requires and handles this now and has the correct compiler version checks. This block of code for cmake in LLDB is no longer needed. Summary: cmake no longer needs to deal with -std=c++11 checks. Reviewers: labath Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10994 llvm-svn: 241590
* Enclose CLANG_USED_LIBS in --start/end-group when linking liblldb (bug #24044)Pavel Labath2015-07-071-1/+7
| | | | | | Patch by Eugene Zelenko. llvm-svn: 241576
* LLDB standalone build: check if Clang was built independently from LLVMPavel Labath2015-07-071-1/+3
| | | | | | | | | | This is fix for bug 23704: LLDB standalone build always include ClangConfig.cmake even if Clang was built with LLVM (ClangConfig.cmake doesn't exist). Patch by: Eugene Zelenko llvm-svn: 241575
* Remove DOS line endings from LLDBStandalone.cmakeEd Maste2015-07-031-87/+87
| | | | llvm-svn: 241361
* Add Support for LLVM_INSTALL_TOOLCHAIN_ONLY (bug #23784)Pavel Labath2015-06-293-15/+21
| | | | | | | | | Support for LLVM_INSTALL_TOOLCHAIN_ONLY is modeled on same functionality from LLVM and Clang CMake files. Patch by: Eugene Zelenko llvm-svn: 240935
* [linux] Use cmake to detect support process_vm_readv (bug #23918)Pavel Labath2015-06-291-0/+24
| | | | | | | | | | | | | | | | | | Summary: Some old linux versions do not have process_vm_readv function defined. Even older versions do not have even the __NR_process_vm_readv syscall number. We use cmake to detect these situations and fallback appropriately: in the first case, we can issue the syscall manually, while it the latter case, we need to drop fast memory read support completely. Test Plan: linux test suite passes Reviewers: ovyalov, Eugene.Zelenko Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D10727 llvm-svn: 240927
* [lldb] Enable building with Cmake/BUILD_SHARED_LIBSAndrew Wilkins2015-06-042-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Several changes to fix CMake builds of LLDB with the BUILD_SHARED_LIBS setting on. - Force all internal libraries to be built STATIC. - Add additional library dependencies (pthread, dl, runtimedyld). - modify finalisation of SWIG wrapper to symlink the "lib" dir into python/site-packages, so _lldb.so's RPATH resolves. Test Plan: Verified one test case with "dotest.py". Reviewers: sylvestre.ledru, zturner Reviewed By: zturner Subscribers: zturner, ted, tberghammer, emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D10157 llvm-svn: 239007
* Fix line endings.Zachary Turner2015-05-131-213/+213
| | | | | | | I must have committed these with windows line endings a few months ago when I did this work. llvm-svn: 237283
* Adds lldb support for querying the register mapping from gdbserver remote ↵Colin Riley2015-04-161-19/+29
| | | | | | | | targets using qXfer:features:read packet. Only enabled if libxml2 enabled in build. Differential Revision: http://reviews.llvm.org/D8999 llvm-svn: 235109
* Making linking against Python simpler on Windows.Zachary Turner2015-04-101-18/+37
| | | | | | | | | | | | | | | | | | | | | | | | | This patch deprecates the three Python CMake variables in favor of a single variable PYTHON_HOME which points to the root of a python installation. Since building Python doesn't output the files in a structure that is compatible with the PYTHONHOME environment variable, we also provide a script install_custom_python.py which will copy the output of a custom python build to the correct directory structure. The supported workflow after this patch will be to build python once for each configuration and architecture {Debug,Release} x {x86,x64} and then run the script. Then run CMake specifying -DPYTHON_HOME=<path> The first time you do this will probably require you to delete your CMake cache. The old workflow is still supported during a transitionary period, but a warning is printed at CMake time, and this will eventually be removed. Differential Revision: http://reviews.llvm.org/D8979 llvm-svn: 234660
* Fix linking of unit tests via CMake on Windows.Zachary Turner2015-03-181-78/+95
| | | | | | | A previous attempt to make the unit tests link properly on Linux broke it for Windows. This patch fixes it for both platforms. llvm-svn: 232648
* [CMake] Make the unittests link against everything...Zachary Turner2015-03-141-0/+1
| | | | | | | | | | | | | | | | Sigh. There's really not a good alternative until we decouple python from lldb better. The only way the build works right now is by having every executable link against every LLDB library. This causes implicit transitive link dependencies on the union of everything that LLDB brings in. Which means that if all we want is one header file from interpreter, we have to bring in everything, including everything that everything depends on, which means python. There's outstanding efforts to address this, but it's not yet complete. So until then, this is all we can do. llvm-svn: 232287
* Create a CMake build for the gtest unit tests.Zachary Turner2015-03-131-1/+1
| | | | llvm-svn: 232210
* [CMake] Refactor LLDB main CMake file.Zachary Turner2015-03-023-0/+375
The existing state of affairs was getting a little unwieldy. All of LLDB's utility functions and initial configuration was in the root CMake file. I split this up into 3 separate files and moved them to relevant subfolders under cmake/modules. Also, I deleted the add_lldb_definitions() function. It seemed to be somewhat useless and did not serve any real purpose that I was able to figure out. llvm-svn: 231010
OpenPOWER on IntegriCloud