summaryrefslogtreecommitdiffstats
path: root/lldb/cmake/modules
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* 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-272-24/+36
| | | | | | | | 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
* [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-081-29/+0
| | | | | | | | | | | | | | | | | 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-271-0/+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
* [cmake] Make lldb build with the android ndk toolchain filePavel Labath2017-01-171-11/+6
| | | | | | | | | | | | | | | | | Summary: The NDK cmake toolchain file defines CMAKE_SYSTEM_NAME=Android, so switch the build to use that. I have also updated the in-tree toolchain file to do that (instead of defining __ANDROID_NDK__), so it can still be used to build. After migrating the last bits of non-toolchainy bits out of the in-tree toolchain, I intend to delete it. Reviewers: tberghammer, danalbert Subscribers: srhines, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D28775 llvm-svn: 292212
* [cmake] Obtain LLVM_CMAKE_PATH from llvm-configMichal Gorny2017-01-091-2/+3
| | | | | | | Use the new --cmakedir option to obtain LLVM_CMAKE_PATH straight from llvm-config instead of reconstructing it locally. llvm-svn: 291500
* [CMake] Fix install rules for tools included in the frameworkChris Bieneman2017-01-041-1/+1
| | | | | | The logic for install rules was wrong for tools included in the framework if the framework build is disabled. llvm-svn: 290934
* [CMake] Support distribution install for LLDB.frameworkChris Bieneman2016-12-211-1/+11
| | | | | | | | This patch adds the last bit of support to get LLVM_DISTRIBUTION_COMPONENTS working with libLLDB when built as a framework. This patch adds dummy install targets for binaries built into the framework's Resources directory, and makes the framework's install target depend on all the binaries that get installed with the framework. llvm-svn: 290273
* [CMake] [PR31433] Fix LLDB tool installationChris Bieneman2016-12-201-13/+13
| | | | | | This resolves PR 31433. llvm-svn: 290180
* Support of lldb on Kfreebsd Sylvestre Ledru2016-12-171-0/+2
| | | | | | | | | | | | | | Summary: Patch by Pino Toscano. Reported in http://bugs.debian.org/835665 Reviewers: tfiala, emaste Subscribers: beanz, mgorny, emaste, krytarowski, brucem, tberghammer, danalbert, srhines, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D23977 llvm-svn: 290044
* [CMake] Refactor LLDB libraries and tools to be componentsChris Bieneman2016-12-152-8/+37
| | | | | | 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. llvm-svn: 289879
* Fix build for mingw.Hafiz Abid Qadeer2016-12-152-2/+2
| | | | | | | | | | | | Summary: I was building lldb using cross mingw-w64 toolchain on Linux and observed some issues. This is first patch in the series to fix that build. It mostly corrects the case of include files and adjusts some #ifdefs from _MSC_VER to _WIN32 and vice versa. I built lldb on windows with VS after applying this patch to make sure it does not break the build there. Reviewers: zturner, labath, abidh Subscribers: ki.stfu, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D27759 llvm-svn: 289821
* [CMake] Use add_llvm_tool_symlink's OUTPUT_DIR optionChris Bieneman2016-12-051-1/+2
| | | | | | This is updating to take r288632 into account. llvm-svn: 288633
* [CMake] NFC. Updating CMake dependency specificationsChris Bieneman2016-11-181-2/+4
| | | | | | This patch updates a bunch of places where add_dependencies was being explicitly called to add dependencies on intrinsics_gen to instead use the DEPENDS named parameter. This cleanup is needed for a patch I'm working on to add a dependency debugging mode to the build system. llvm-svn: 287408
* Fixing the Xcode build that I broke in r286479Chris Bieneman2016-11-101-1/+1
| | | | | | Since Xcode can't seem to handle quotes in preprocessor definitions, I've changed the build to assume that the define is unquoted. This should fix the failing Darwin bots. llvm-svn: 286504
* Unify Darwin and Non-Darwin printing of version outputChris Bieneman2016-11-101-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This change unifies and simplifies the code paths between the Darwin and non-Darwin code to print the LLDB version information. It also introduces a new variable in CMake LLDB_VERSION_STRING which can be used to specify custom version information. On Darwin this value is implicitly set based on the resource/LLDB-Info.plist file. With the LLDB_VERSION_STRING variable set to lldb-360.99.0, the -version output is: > ./bin/lldb -version lldb version 4.0.0 (lldb-360.99.0) clang revision 286264 llvm revision 286265 This behavior is unified across all target platforms. Reviewers: lldb-commits Subscribers: mgorny, tfiala Differential Revision: https://reviews.llvm.org/D26478 llvm-svn: 286479
* [cmake] Make dependencies of lldb libraries private, take 2Pavel Labath2016-10-181-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The dependencies of our libraries (only liblldb, really) we marked as public, which caused all their dependencies to be repeated when linking any executables to them. This is a problem because then all the .a files could end up being linked twice, once to liblldb and once again to to the executable linking against liblldb (lldb, lldb-mi). As it turns out, our build actually depends on this behavior: - on windows, lldb does not have getopt, so it pulls it from inside liblldb, even though getopt is not a part of the exported interface of liblldb (maybe some of the bsd variants have this problem as well) - lldb-mi uses llvm, which again is not exported by liblldb This change does not actually fix these problems (that is going to be a hard one), but it does make them explicit by moving this magic from add_lldb_library to the places the executable targets are defined. That way, I can link the additional .a files only on targets that really need it, and the other targets can build cleanly and make sure we don't regress further. It also fixes the LLVM_LINK_LLVM_DYLIB build on linux. Reviewers: zturner, beanz Subscribers: ki.stfu, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D25680 llvm-svn: 284466
* [CMake] Fixing a small hack in add_lldb_libraryChris Bieneman2016-09-221-1/+4
| | | | | | | | This code was adding an explicit dependency on libclang because lldb needs clang headers, changing this to instead depend on the clang tablegen targets means we don't have to depend on building the clang bits in libclang that lldb doesn't need. Note this is still a bit of a hack because we're adding the dependency to all lldb libraries, instead of just the ones that need it. llvm-svn: 282196
OpenPOWER on IntegriCloud