summaryrefslogtreecommitdiffstats
path: root/lldb/cmake
Commit message (Collapse)AuthorAgeFilesLines
...
* Stop building liblldb with CMake's framework functionalityAlex Langford2018-07-273-16/+32
| | | | | | | | | | | | Summary: CMake has a bug in its ninja generator that prevents you from installing targets that are built with framework support. Therefore, I want to not rely on CMake's framework support. See https://gitlab.kitware.com/cmake/cmake/issues/18216 Differential Revision: https://reviews.llvm.org/D49888 llvm-svn: 338154
* Add back lldb-framework-headers targetAlex Langford2018-07-261-0/+3
| | | | | | | | | | In r338058 we removed the target `lldb-framework-headers`, which mean lldb-framework no longer depended on `framework_headers`, so they never actually got generated. This is a partial revert of r338058: I added back the lldb-framework-headers target, but the framework-header-fix.sh script still runs on the copied headers. llvm-svn: 338074
* Make framework-header-fix process copied headersAlex Langford2018-07-261-9/+5
| | | | | | | | | | | | | | | Summary: Previously the framework-header-fix script would change the sources before they were copied, leading to unnecessary rebuilds on repeat `ninja lldb` invocations. This runs the script on the headers after they're copied into the produced LLDB.framework, meaning it doesn't affect any files being built. Patch by Keith Smiley <keithbsmiley@gmail.com>! Differential Revision: https://reviews.llvm.org/D49779 llvm-svn: 338058
* Use LLVM's new ItaniumPartialDemangler in LLDBStefan Granitz2018-07-251-9/+0
| | | | | | | | | | | | | | | Summary: Replace the existing combination of FastDemangle and the fallback to llvm::itaniumDemangle() with LLVM's new ItaniumPartialDemangler. It slightly reduces complexity and slightly improves performance, but doesn't introduce conceptual changes. This patch is preparing for more fundamental improvements on LLDB's demangling approach. Reviewers: friss, jingham, erik.pilkington, labath, clayborg, mgorny, davide, JDevlieghere Reviewed By: JDevlieghere Subscribers: teemperor, JDevlieghere, labath, clayborg, davide, lldb-commits, mgorny, erik.pilkington Differential Revision: https://reviews.llvm.org/D49612 llvm-svn: 337931
* Invert dependency between lldb-framework and lldb-suiteAlex Langford2018-07-171-2/+2
| | | | | | | | | | | | | | | | | Summary: Currently, if you build lldb-framework the entire framework doesn't actually build. In order to build the entire framework, you need to actually build lldb-suite. This abstraction doesn't feel quite right because lldb-framework truly does depend on lldb-suite (liblldb + related tools). In this change I want to invert their dependency. This will mean that lldb and finish_swig will depend on lldb-framework in a framework build, and lldb-suite otherwise. Instead of adding conditional logic everywhere to handle this, I introduce LLDB_SUITE_TARGET to handle it. Differential Revision: https://reviews.llvm.org/D49406 llvm-svn: 337311
* [CMake] Give lldb tools functional install targets when building LLDB.frameworkAlex Langford2018-07-161-14/+6
| | | | | | | | | | | | | | | | | Summary: This change makes the install targets for lldb tools functional when building for the framework. I am currently working on the install rules for lldb-framework and this will let me make `install-lldb-framework` rely on `install-lldb-argdumper` for instance. This is especially important for `install-lldb-framework-stripped`. It is much better for `install-lldb-framework-stripped` to rely on `install-lldb-argdumper-stripped` than to copy and strip lldb-argdumper manually. Differential Revision: https://reviews.llvm.org/D49038 llvm-svn: 337202
* [CMake] Simplify a few framework build rulesAlex Langford2018-07-051-2/+2
| | | | llvm-svn: 336395
* Fix up Info.plist when building LLDB.framework with CMakeAlex Langford2018-06-191-0/+1
| | | | | | | | | | | | Summary: We weren't using the Info.plist template in resources previously. When using that template, some of the key's values weren't being populated because some variables were not being defined. In one case, CMake didn't like the substring expansion syntax of CFBundleIdentifier so I got rid of that. Differential Revision: https://reviews.llvm.org/D47792 llvm-svn: 335014
* Introduce lldb-framework CMake target and centralize its logicAlex Langford2018-06-182-9/+56
| | | | | | | | | | | | | Summary: In this patch I aim to do the following: 1) Create an lldb-framework target that acts as the target that handles generating LLDB.framework. Previously, liblldb acted as the target for generating the framework in addition to generating the actual lldb library. This made the target feel overloaded. 2) Centralize framework generation as much as it makes sense to do so. 3) Create a target lldb-suite, which depends on every tool and library that makes liblldb fully functional. One result of having this target is it makes tracking dependencies much clearer. Differential Revision: https://reviews.llvm.org/D48060 llvm-svn: 334968
* [cmake] Detect presence of wide-char libedit at build timePavel Labath2018-06-111-0/+19
| | | | | | | | | | | | | | | | | Summary: Instead of hardcoding a list of platforms where libedit is known to have wide char support we detect this in cmake. The main motivation for this is attempting to improve compatibility with different versions of libedit, as the interface of non-wide-char functions varies slightly between versions. Reviewers: krytarowski, uweigand, jankratochvil, timshen, beanz Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D47625 llvm-svn: 334393
* Check for process_vm_readv using CheckSymbolExistsAlex Langford2018-06-071-8/+2
| | | | | | | | | Instead of checking if code compiles, I think it is a better to check if the symbol exists. This is simpler and should do the same thing. Differential Revision: https://reviews.llvm.org/D47897 llvm-svn: 334219
* Fix typo in CMake commentsAlex Langford2018-05-251-2/+2
| | | | llvm-svn: 333299
* build: use cmake to find the libedit contentSaleem Abdulrasool2018-05-221-0/+62
| | | | | | | | Use proper cmake techniques to detect where the libedit package resides. This allows for the use of libedit from an alternative location which is needed for supporting cross-compilation. llvm-svn: 333041
* [cmake] Fix standalone+LLVM_LINK_LLVM_DYLIB builds (pr36687)Pavel Labath2018-03-141-5/+9
| | | | | | | | | | | | | | | | | | | | Summary: To make this build work, I needed to add detection code for the pthread library. This is necessary, because we have direct calls to these libraries (instead of going through llvm) and in the standalone build we cannot rely on llvm to detect these for us. In a standalone non-dylib build this was accidentaly working because these libraries were pulled in as an interface dependency of the .a files, but in a dylib build these are no longer part of the link interface, and so we need to add them explicitly. Reviewers: krytarowski, zturner Subscribers: lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D44379 llvm-svn: 327490
* Install lldb's SB headers (pr36630)Pavel Labath2018-03-081-6/+10
| | | | | | | | | | | These were removed in r309021 in what looks like an accidentally committed change. This brings them back. I also rename the header component to lldb-headers (instead of lldb_headers) to match the llvm style and add a special install-lldb-headers target, which installs just the headers. llvm-svn: 327016
* LLDBStandalone.cmake: set path to llvm-lit inside of llvm build dirAdrian Prantl2018-03-051-0/+1
| | | | llvm-svn: 326754
* [lldb] Set component when invoking add_llvm_install_targetsPetr Hosek2017-12-131-2/+4
| | | | | | | | | This is needed to ensure that the distribution and install-distribution targets work properly. Differential Revision: https://reviews.llvm.org/D41144 llvm-svn: 320537
* [lldb] Switch to add_llvm_install_targetsShoaib Meenai2017-12-121-10/+6
| | | | | | | | | | | This adds the install-*-stripped targets to LLDB, which are required for the install-distribution-stripped option. We also need to create some install-*-stripped targets manually, which are modeled after their corresponding install-* targets. Differential Revision: https://reviews.llvm.org/D41099 llvm-svn: 320443
* Disable warnings related to anonymous types in the ObjC pluginVedant Kumar2017-12-072-1/+12
| | | | | | | | | | | This part of lldb make use of anonymous structs and unions. The usage is idiomatic and doesn't deserve a warning. Logic in the NSDictionary and NSSet plugins use anonymous structs in a manner consistent with the relevant Apple frameworks. Differential Revision: https://reviews.llvm.org/D40757 llvm-svn: 320071
* [CMake] Use PRIVATE in target_link_libraries for executablesShoaib Meenai2017-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently use target_link_libraries without an explicit scope specifier (INTERFACE, PRIVATE or PUBLIC) when linking executables. Dependencies added in this way apply to both the target and its dependencies, i.e. they become part of the executable's link interface and are transitive. Transitive dependencies generally don't make sense for executables, since you wouldn't normally be linking against an executable. This also causes issues for generating install export files when using LLVM_DISTRIBUTION_COMPONENTS. For example, clang has a lot of LLVM library dependencies, which are currently added as interface dependencies. If clang is in the distribution components but the LLVM libraries it depends on aren't (which is a perfectly legitimate use case if the LLVM libraries are being built static and there are therefore no run-time dependencies on them), CMake will complain about the LLVM libraries not being in export set when attempting to generate the install export file for clang. This is reasonable behavior on CMake's part, and the right thing is for LLVM's build system to explicitly use PRIVATE dependencies for executables. Unfortunately, CMake doesn't allow you to mix and match the keyword and non-keyword target_link_libraries signatures for a single target; i.e., if a single call to target_link_libraries for a particular target uses one of the INTERFACE, PRIVATE, or PUBLIC keywords, all other calls must also be updated to use those keywords. This means we must do this change in a single shot. I also fully expect to have missed some instances; I tested by enabling all the projects in the monorepo (except dragonegg), and configuring both with and without shared libraries, on both Darwin and Linux, but I'm planning to rely on the buildbots for other configurations (since it should be pretty easy to fix those). Even after this change, we still have a lot of target_link_libraries calls that don't specify a scope keyword, mostly for shared libraries. I'm thinking about addressing those in a follow-up, but that's a separate change IMO. Differential Revision: https://reviews.llvm.org/D40823 llvm-svn: 319840
* Fix LLVM_LINK_LLVM_DYLIB build (pr35053)Pavel Labath2017-10-311-52/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: r316368 broke this build when it introduced a reference to a pthread function to the Utility module. This caused cmake to generate an incorrect link line (wrong order of libs) because it did not see the dependency from Utility to the system libraries. Instead these libraries were being manually added to each final target. This changes moves the dependency management from the individual targets to the lldbUtility module, which is consistent with how llvm does it. The final targets will pick up these libraries as they will be a part of the link interface of the module. Technically, some of these dependencies could go into the host module, as that's where most of the os-specific code is, but I did not try to investigate which ones. Reviewers: zturner, sylvestre.ledru Subscribers: lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D39246 llvm-svn: 316997
* Check availability of accept4 in C++ instad of C code.Eugene Zemtsov2017-09-161-1/+1
| | | | llvm-svn: 313437
* More precise c library feature detection for Android.Eugene Zemtsov2017-09-161-0/+1
| | | | llvm-svn: 313436
* [CMake] Add checks for libcompressionChris Bieneman2017-07-281-0/+3
| | | | | | This enables libcompression when available in the CMake build system. llvm-svn: 309395
* [CMake] Adapt to clang r309390Chris Bieneman2017-07-281-4/+1
| | | | | | This removes the configuration order dependence between LLDB and Clang. llvm-svn: 309392
* [CMake] Update Framework construction for iOSChris Bieneman2017-07-251-2/+6
| | | | | | On iOS frameworks don't have versions or resources, they are flatter bundles. This updates the LLDB framework build to accommodate the flatter bundles. llvm-svn: 309025
* [CMake] NFC. Cleanup unnecessary CMake policyChris Bieneman2017-07-251-4/+0
| | | | | | This is just setting to the default behavior, so it does nothing. llvm-svn: 309022
* [CMake] Cleanup unnecessary definitionChris Bieneman2017-07-251-4/+4
| | | | | | This is only used in one file, and we already set it correctly on that file, so we don't need to set this everywhere. llvm-svn: 309021
* [CMake] A few fixups to support building LLDB for iOSChris Bieneman2017-07-181-12/+22
| | | | | | These changes enable proper configuration of LLDB targeting iOS. llvm-svn: 308378
* [CMake] [NFC] Remove out of date and redundant version requirementChris Bieneman2017-07-181-1/+0
| | | | | | Since we set the minimum required version elsewhere to be higher this actually has meaningful good impact. llvm-svn: 308376
* cmake: Put PROCESS_VM_READV detection results into Config.hPavel Labath2017-06-022-22/+9
| | | | | | | | | | Reviewers: beanz, eugene Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D33771 llvm-svn: 304544
* cmake: Enable process_vm_readv detection on androidPavel Labath2017-06-011-22/+20
| | | | | | | Only android and linux can have this function as far as I am aware, but it seems cleaner to enable this code for all platforms. llvm-svn: 304405
* [CMake] Abstract Config.h generation for XcodeChris Bieneman2017-04-273-24/+50
| | | | | | | | This patch abstracts the generation of Config.h and creates a dummy project entry point to allow generation of LLDB's Config header without performing a full CMake configuration. This will enable the Xcode project to generate LLDB's Config header. llvm-svn: 301553
* Re-landing IPv6 support for LLDB HostChris Bieneman2017-04-261-1/+8
| | | | | | | | | | | | | | | | | | | | | | This support was landed in r300579, and reverted in r300669 due to failures on the bots. The failures were caused by sockets not being properly closed, and this updated version of the patches should resolve that. Summary from the original change: This patch adds IPv6 support to LLDB/Host's TCP socket implementation. Supporting IPv6 involved a few significant changes to the implementation of the socket layers, and I have performed some significant code cleanup along the way. This patch changes the Socket constructors for all types of sockets to not create sockets until first use. This is required for IPv6 support because the socket type will vary based on the address you are connecting to. This also has the benefit of removing code that could have errors from the Socket subclass constructors (which seems like a win to me). The patch also slightly changes the API and behaviors of the Listen/Accept pattern. Previously both Listen and Accept calls took an address specified as a string. Now only listen does. This change was made because the Listen call can result in opening more than one socket. In order to support listening for both IPv4 and IPv6 connections we need to open one AF_INET socket and one AF_INET6 socket. During the listen call we construct a map of file descriptors to addrin structures which represent the allowable incoming connection address. This map removes the need for taking an address into the Accept call. This does have a change in functionality. Previously you could Listen for connections based on one address, and Accept connections from a different address. This is no longer supported. I could not find anywhere in LLDB where we actually used the APIs in that way. The new API does still support AnyAddr for allowing incoming connections from any address. The Listen implementation is implemented using kqueue on FreeBSD and Darwin, WSAPoll on Windows and poll(2) everywhere else. https://reviews.llvm.org/D31823 llvm-svn: 301492
* Remove the home-grown android toolchain file and all references to itPavel Labath2017-04-251-155/+0
| | | | | | | | | | | | | | | Summary: The toolchain file has been deprecated in favor of the "official" toolchain file present in the Android NDK. Also update the web build instructions to reflect this. Reviewers: eugene Subscribers: srhines, mgorny, dgross, tberghammer, lldb-commits Differential Revision: https://reviews.llvm.org/D32441 llvm-svn: 301306
* [LLDB][MIPS] Move it into HandleLLVMOptions.cmake.Nitesh Jain2017-04-241-6/+0
| | | | | | | The revison https://reviews.llvm.org/D32125 will fixed the off_t for GNU specific 32 bit platform. This fixed the difference in definition of off_t in LLDB and LLVM Subscribers: jaydeep, bhushan, lldb-commits, slthakur, llvm-commits, krytarowski, emaste, zturner llvm-svn: 301172
* Resurrect LLDB Standalone build on NetBSDKamil Rytarowski2017-04-201-0/+2
| | | | | | | | | Include CheckIncludeFile for check_include_file() in CMake. Detect <sys/event.h> in CMake. This header is available on NetBSD. llvm-svn: 300853
* Revert yesterdays IPv6 patchesPavel Labath2017-04-191-3/+0
| | | | | | | | | | | | | The break the linux bots (and probably any other machine which would run the test suite in a massively parallel way). The problem is that it can happen that we only successfully create an IPv6 listening socket (because the relevant IPv4 port is used by another process) and then the connecting side attempts to connect to the IPv4 port and fails. It's not very obvious how to fix this problem, so I am reverting this until we come up with a solution. llvm-svn: 300669
* [CMake] Add configure check for sys/event.hChris Bieneman2017-04-191-0/+1
| | | | | | This enables the kqueue path in MainLoop for Darwin and BSD. llvm-svn: 300654
* [CMake] Adding configure-time check for sigactionChris Bieneman2017-04-181-0/+1
| | | | | | Hopefully this will fix the netbsd bot that I broke... llvm-svn: 300590
* Update LLDB Host to support IPv6 over TCPChris Bieneman2017-04-181-0/+1
| | | | | | | | | | | | | | | | | | | | | Summary: This patch adds IPv6 support to LLDB/Host's TCP socket implementation. Supporting IPv6 involved a few significant changes to the implementation of the socket layers, and I have performed some significant code cleanup along the way. This patch changes the Socket constructors for all types of sockets to not create sockets until first use. This is required for IPv6 support because the socket type will vary based on the address you are connecting to. This also has the benefit of removing code that could have errors from the Socket subclass constructors (which seems like a win to me). The patch also slightly changes the API and behaviors of the Listen/Accept pattern. Previously both Listen and Accept calls took an address specified as a string. Now only listen does. This change was made because the Listen call can result in opening more than one socket. In order to support listening for both IPv4 and IPv6 connections we need to open one AF_INET socket and one AF_INET6 socket. During the listen call we construct a map of file descriptors to addrin structures which represent the allowable incoming connection address. This map removes the need for taking an address into the Accept call. This does have a change in functionality. Previously you could Listen for connections based on one address, and Accept connections from a different address. This is no longer supported. I could not find anywhere in LLDB where we actually used the APIs in that way. The new API does still support AnyAddr for allowing incoming connections from any address. The Listen implementation is implemented using kqueue on FreeBSD and Darwin, WSAPoll on Windows and poll(2) everywhere else. Reviewers: zturner, clayborg Subscribers: jasonmolenda, labath, lldb-commits, emaste Differential Revision: https://reviews.llvm.org/D31823 llvm-svn: 300579
* [CMake] Support generating Config.hChris Bieneman2017-04-141-1/+27
| | | | | | | | | | | | | | | | | | | Summary: This patch removes the hand maintained config files in favor of auto-generating the config file. We will still need to maintain the defines for the Xcode builds on Mac, but all CMake builds use the generated header instead. This will enable finer grained platform support tests and enable supporting LLDB on more platforms with less manual maintenance. I have only tested this patch on Darwin, and any help testing it out on other platforms would be greatly appreciated. I've probably messed something up somewhere. Reviewers: labath, zturner Reviewed By: labath Subscribers: krytarowski, emaste, srhines, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D31969 llvm-svn: 300372
* CMake requires normalized paths when appending.Zachary Turner2017-03-171-0/+1
| | | | | | | Patch by Hugh Bellamy Differential Revision: https://reviews.llvm.org/D30927 llvm-svn: 298100
* [CMake] Final dependency cleanup patch!Chris Bieneman2017-02-082-193/+2
| | | | | | | | | | | | | | | | | Summary: This patch removes the over-specified dependencies from LLDBDependencies and instead relies on the dependencies as expressed in each library and tool. This also removes the library looping in favor of allowing CMake to do its thing. I've tested this patch on Darwin, and found no issues, but since linker semantics vary by system I'll also work on testing it on other platforms too. Help testing would be greatly appreciated. Reviewers: labath, zturner Subscribers: danalbert, srhines, mgorny, jgosnell, lldb-commits Differential Revision: https://reviews.llvm.org/D29352 llvm-svn: 294515
* Install six.py conditionallyKamil Rytarowski2017-02-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | Summary: The current version of LLDB installs six.py into global python library directory. This approach produces conflicts downstream with distribution's py-six copy. Introduce new configure option LLDB_USE_SYSTEM_SIX (disabled by default). Once specified as TRUE, six.py won't be installed to Python's directory. Add new option in finishSwigWrapperClasses.py, namely --useSystemSix. Sponsored by <The NetBSD Foundation> Reviewers: mgorny, emaste, clayborg, joerg, labath Reviewed By: labath Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D29405 llvm-svn: 294071
* [CMake] Add explicit dependencies to pluginsChris Bieneman2017-01-311-1/+5
| | | | | | | | | | | | | | | | | Summary: This patch does two things. First it updates all the ABI plugins with accurate dependencies, and second it adds a tracking mechanism for add_lldb_library to denote plugin libraries, allowing us to build up a list of all the configured plugins. This list of generated plugins will be used during generating liblldb so that we can link all the plugins into the library. If this patch looks good I will update all the other plugins in subsequent patches. Reviewers: labath, zturner Subscribers: nemanjai, mgorny, lldb-commits, jgosnell Differential Revision: https://reviews.llvm.org/D29348 llvm-svn: 293696
* [CMake] Add LINK_LIBS and LINK_COMPONENTS optionsChris Bieneman2017-01-311-17/+24
| | | | | | | | This patch adds CMake options to add_lldb_library and add_lldb_executable for specifying LLVM components and direct library links. This patch is NFC, but it is a small separable bit of a series of much larger patches that I'll be landing over the next day or two. llvm-svn: 293647
* Address post-commit review remarksPavel Labath2017-01-271-1/+1
| | | | | | | Tamas pointed out that the macro name I used in r293282 was too vague. Rename it to better reflect what it is used for. llvm-svn: 293287
* Fix android-i386 build broken by previous commitPavel Labath2017-01-271-1/+2
| | | | | | | | | I foolishly thought I could simplify the condition to cover all android targets. I was wrong - i386 headers don't define __NR_accept. Revert back to enabling the workaround on arm an mips only. llvm-svn: 293282
* Refactor the android accept hackPavel Labath2017-01-272-8/+4
| | | | | | | | This moves the accept hack from the android toolchain file into LLDBConfig.cmake. This allows successful lldb android compilation without relying on our custom toolchain file. llvm-svn: 293281
OpenPOWER on IntegriCloud