summaryrefslogtreecommitdiff
path: root/cmake
Commit message (Collapse)AuthorAge
* cmake: Don't do anything for LLVM_ENABLE_ASSERTIONS=OFFReid Kleckner2014-06-27
| | | | | | | | | | | | | | | | | By default, CMake will set NDEBUG in Rel* builds and leave it off in debug builds, so we shouldn't need to do anything ourselves. Before this change, it was possible to a Debug build without assertions (aka Debug-Asserts in the autoconf system) by configuring with -DLLVM_ENABLE_ASSERTIONS=OFF, but this configuration isn't very useful. You can still get the same effect by explicitly adding -DNDEBUG to CFLAGS. Differential Revision: http://reviews.llvm.org/D4257 Patch by Janusz Sobczak! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211919 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove clang-specific libxml2 check from CMakeAlp Toker2014-06-06
| | | | | | | | | | | clang's own CMake setup handles this as of r210308. The CMAKE_CROSSCOMPILING special-case will no longer be hard-coded. This was clearly site-specific to someone's local configuration and should be passed in at configure time if needed with e.g. -DLIBXML2_LIBRARIES=... (the libxml2 target I tried here doesn't even support liblzma so it's *way* off). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210309 91177308-0d34-0410-b5e6-96231b3b80d8
* GraphWriter: detect graph viewer programs at runtimeAlp Toker2014-06-02
| | | | | | | | | | | | | | | | | | | | | | Replace the crufty build-time configure checks for program paths with equivalent runtime logic. This lets users install graphing tools as needed without having to reconfigure and rebuild LLVM, while eliminating a long chain of inappropriate compile dependencies that included GUI programs and the windowing system. Additional features: * Support the OS X 'open' command to view graphs generated by any of the Graphviz utilities. This is an alternative to the Graphviz OS X UI which is no longer available on Mountain Lion. * Produce informative log output upon failure to indicate which programs can be installed to view graphs. Ping me if this doesn't work for your particular environment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210001 91177308-0d34-0410-b5e6-96231b3b80d8
* AArch64/ARM64: move ARM64 into AArch64's placeTim Northover2014-05-24
| | | | | | | | | | | | | | | This commit starts with a "git mv ARM64 AArch64" and continues out from there, renaming the C++ classes, intrinsics, and other target-local objects for consistency. "ARM64" test directories are also moved, and tests that began their life in ARM64 use an arm64 triple, those from AArch64 use an aarch64 triple. Both should be equivalent though. This finishes the AArch64 merge, and everyone should feel free to continue committing as normal now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209577 91177308-0d34-0410-b5e6-96231b3b80d8
* Use llvm-lit if LLVM source tree is unavailable.Greg Fitzgerald2014-05-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209308 91177308-0d34-0410-b5e6-96231b3b80d8
* cmake: Remove -D NDEBUG from CFLAGS as well as CXXFLAGSReid Kleckner2014-05-19
| | | | | | This silences ~7 warnings on .c files in the LLVM build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209163 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable -Wcomment when building with GCC.Evgeniy Stepanov2014-05-06
| | | | | | | | | | GCC version of -Wcomment is not compatible with ascii art graph diagrams. Reverts r207629. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208073 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach add_sphinx_target() to respect the LLVM_INSTALL_TOOLCHAIN_ONLY CMakeDan Liew2014-04-28
| | | | | | option. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207450 91177308-0d34-0410-b5e6-96231b3b80d8
* If building with LLVM_ENABLE_DOXYGEN and using CMake thenDan Liew2014-04-28
| | | | | | | | abort while configuring if doxygen could not be found. This is desirable because if the build is going to fail then it should fail as early as possible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207404 91177308-0d34-0410-b5e6-96231b3b80d8
* Added Sphinx documentation generation to CMake build system.Reid Kleckner2014-04-18
| | | | | | | | | | | | | | | | | | | | | The option LLVM_ENABLE_SPHINX option enables the "docs-llvm-html", "docs-llvm-man" targets but does not build them by default. The following CMake options have been added that control what targets are made available SPHINX_OUTPUT_HTML SPHINX_OUTPUT_MAN If LLVM_BUILD_DOCS is enabled then the enabled docs-llvm-* targets will be built by default and if ``make install`` is run then docs-llvm-html and docs-llvm-man will be installed (tested on Linux only). The add_sphinx_target function is in its own file so it can be included by other projects that use Sphinx for their documentation. Patch by Daniel Liew <daniel.liew@imperial.ac.uk>! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206655 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach LLVMConfigVersion.cmake to behave as find_package() expects.Eric Christopher2014-04-16
| | | | | | Patch by Brad King git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206426 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for a patch version to the cmake system.Eric Christopher2014-04-16
| | | | | | Patch by Brad King git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206425 91177308-0d34-0410-b5e6-96231b3b80d8
* AddLLVM: Mute the prefix "lib" in SHARED on win32.NAKAMURA Takumi2014-04-10
| | | | | | | - LLVMSupport.dll - libLLVMSupport.dll.a git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205969 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for building LLVM on FreeBSD 9.2Viktor Kutuzov2014-04-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205847 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM64: initial backend importTim Northover2014-03-29
| | | | | | | | | | | | This adds a second implementation of the AArch64 architecture to LLVM, accessible in parallel via the "arm64" triple. The plan over the coming weeks & months is to merge the two into a single backend, during which time thorough code review should naturally occur. Everything will be easier with the target in-tree though, hence this commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205090 91177308-0d34-0410-b5e6-96231b3b80d8
* Win installer: provide a pretty iconHans Wennborg2014-03-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204960 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove cmake module support for Visual C++ 2010 (MSVC10)Yaron Keren2014-03-25
| | | | | | | | but keep the MSVC11 (Visual C++ 2012) support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204706 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable Visual C++ warning 4722 about aborting a destructor,Yaron Keren2014-03-25
| | | | | | | | it has no value for us. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204704 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake][cygming] Disable --out-implib from executables.NAKAMURA Takumi2014-03-16
| | | | | | It doesn't make sense even with --export-all-symbols. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204017 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Put -Werror to CMAKE_CXX_FLAGS instead of using add_llvm_definitions()Alexey Samsonov2014-03-13
| | | | | | | | | add_definitions shouldn't really be used for compiler flags, and the variable LLVM_DEFINITIONS is not appropriately used at the moment, e.g. it's not exported to LLVMConfig.cmake git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203792 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Enable a bunch of Xcode build settings that correspond to warnings ↵Ted Kremenek2014-03-13
| | | | | | | | | | | | | | | | that are for the most part enabled by default either by Clang or -Wall. I personally build with these settings enabled all the time, and it is clearer to see the actual warning flags (e.g., -Wuninitialized) get passed by Xcode rather than seeing -Wno-uninitialized followed by -Wall (the latter canceling out the former) and figuring out what is going on. Xcode will ignore build settings it doesn't understand, so this will work on possibly older versions of Xcode that don't support all of these settings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203760 91177308-0d34-0410-b5e6-96231b3b80d8
* Use -std=gnu++11 on cygwin and mingw.Rafael Espindola2014-03-12
| | | | | | | | | Without this common features like off_t and strdup are missing. This should bring back those bots. Configure bits by Meador Inge. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203701 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] add_llvm_target(): No need to include TABLEGEN_OUTPUT in source list.NAKAMURA Takumi2014-03-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202862 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Switch the CMake option from LLVM_ENABLE_CXX11 (default on) toChandler Carruth2014-03-01
| | | | | | | | LLVM_ENABLE_CXX1Y (default *off*). =D C++98 is dead. Long live C++11. I don't exactly recommend using C++1y just yet though... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202567 91177308-0d34-0410-b5e6-96231b3b80d8
* With rpaths being set correctly, SHLIBPATH_VAR is not needed anymore.Rafael Espindola2014-02-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202510 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] llvm_add_library(SHARED|STATIC): Fix broken OUTPUT_NAME for *_static.NAKAMURA Takumi2014-02-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202454 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Work around to use target_link_libraries(PUBLIC) in ↵NAKAMURA Takumi2014-02-26
| | | | | | | | BUILD_SHARED_LIBS mode. FIXME: It may be PRIVATE since SO knows its dependent libs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202261 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Move LLVMBUILD_LIB_DEPS stuff from add_llvm_library (and ↵NAKAMURA Takumi2014-02-26
| | | | | | LLVm-Config) to llvm_add_library to centralize target_link_libraries. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202260 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Use target_link_libraries(INTERFACE|PRIVATE) on CMake-2.8.12 to ↵NAKAMURA Takumi2014-02-26
| | | | | | | | | | | | | | | | | | | increase opportunity for parallel build. target_link_libraries(INTERFACE) doesn't bring inter-target dependencies in add_library, although final targets have dependencies to whole dependent libraries. It makes most libraries can be built in parallel. target_link_libraries(PRIVATE) is used to shaared library. Each dependent library is linked to the target.so, and its user will not see its grandchildren. For example, - libclang.so has sufficient libclang*.a(s). - c-index-test requires just only libclang.so. FIXME: lld is tweaked minimally. Adding INTERFACE in each library would be better thing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202241 91177308-0d34-0410-b5e6-96231b3b80d8
* TableGen.cmake: Functionalize and reformat.NAKAMURA Takumi2014-02-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201972 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify linking to system librariesNAKAMURA Takumi2014-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | The LLVMSupport library implementation consolidates all dependencies on system libraries. Move the logic gathering system libraries out of 'cmake/modules/LLVM-Config.cmake' and into 'lib/Support/CMakeLists.txt'. Use the target_link_libraries() command there to tell CMake about the link dependencies of the LLVMSupport implementation. CMake will automatically propagate this to all targets that link LLVMSupport directly or indirectly. We still need to build knowledge of system library dependencies into 'llvm-config'. Store the list of libraries needed in a property on LLVMSupport and teach 'tools/llvm-config/CMakeLists.txt' to retrieve it from there. Drop all calls to 'link_system_libs' and 'get_system_libs' from our CMake code. Replace their implementations with a warning that explains the calls are no longer necessary. Also drop from 'LLVMConfig.cmake' the HAVE_* and related variables that were published there only to allow 'get_system_libs' to run outside our build process. Contributed by Brad King. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201969 91177308-0d34-0410-b5e6-96231b3b80d8
* Prune debug message in AddLLVM.cmake.NAKAMURA Takumi2014-02-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201932 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] llvm_add_library: Add dependencies also to objlibs as workaround of ↵NAKAMURA Takumi2014-02-21
| | | | | | | | CMake issue 14747. http://www.cmake.org/Bug/view.php?id=14747 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201855 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Introduce "llvm_add_library(SHARED STATIC)" to build both shared lib ↵NAKAMURA Takumi2014-02-21
| | | | | | | | | | | | | | and static lib simulataneously. llvm_add_library(foo SHARED STATIC DEPENDS <dependent targets...> LINK_LIBS <required libraries...> ) It generates both foo (foo.so) and foo_static(foo.a) and both of them depend on DEPENDS and LINK_LIBS. Then, also obj.foo is generated. obj.foo depends on DEPENDS, but doesn't depend on LINK_LIBS. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201854 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach LLVM-Config to use logical target names (2/2)NAKAMURA Takumi2014-02-21
| | | | | | | | | | | | | The module still needs to collect the list of all available libraries in order to satisfy the 'all' component. Provide this in the package configuration file, 'LLVMConfig.cmake', as a LLVM_AVAILABLE_LIBS variable. (A variable is scoped better than a global property.) Since this won't be set for our own build, fall back to looking up the LLVM_LIBS property to get the value when it is not set. Contributed by Brad King. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201853 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach LLVM-Config to use logical target names (1/2)NAKAMURA Takumi2014-02-21
| | | | | | | | | | | LLVM library names are now available as logical CMake targets both to our own build and to application CMake code. Replace use of 'list(FIND)' with a simple 'if(TARGET)' to determine whether a library is available. Contributed by Brad King. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201852 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Move intrinsics_gen to lib/Target out of add_public_tablegen_target.NAKAMURA Takumi2014-02-20
| | | | | | add_public_tablegen_target is used somewhere. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201787 91177308-0d34-0410-b5e6-96231b3b80d8
* Unconditionally include msan_interface.h when building with MSan.Evgeniy Stepanov2014-02-20
| | | | | | | | Any version of Clang that does not provide this header is way too old to bootstrap with MSan. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201776 91177308-0d34-0410-b5e6-96231b3b80d8
* Build PIE binaries when cross-compiling to Android.Evgeniy Stepanov2014-02-19
| | | | | | | This change also removes CMAKE_LINK_FLAGS setting that seems to be ignored by cmake. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201654 91177308-0d34-0410-b5e6-96231b3b80d8
* LLVMExports.cmake: Add System libs $(LIBS) to LLVMSupport, corresponding to ↵NAKAMURA Takumi2014-02-16
| | | | | | r201077. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201489 91177308-0d34-0410-b5e6-96231b3b80d8
* LLVMExports.cmake: Exclude gtest since they are not installed.NAKAMURA Takumi2014-02-16
| | | | | | FIXME: gtest might be included if external project could refer to the build tree. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201488 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Let llvm_add_library(MODULE) check capability of loadable module.NAKAMURA Takumi2014-02-13
| | | | | | | On unsupported platforms, llvm_add_library(MODULE) doesn't create any targets. Caller may be responsible to check and add extra target properties. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201320 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Move the target property PREFIX from add_llvm_loadable_module() to ↵NAKAMURA Takumi2014-02-13
| | | | | | llvm_add_library(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201318 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] llvm_add_library(MODULE) may use CMAKE_MODULE_LINKER_FLAGS instead ↵NAKAMURA Takumi2014-02-13
| | | | | | | | of target property LINK_FLAGS. I mis-dropped Darwin's link flags (in clang side) since r201073. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201317 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] LLVM_PLUGIN_EXT: Use CMAKE_SHARED_LIBRARY_SUFFIX rather than ↵NAKAMURA Takumi2014-02-13
| | | | | | | | | CMAKE_SHARED_MODULE_SUFFIX in llvm tree. FIXME: llvm/test may be aware of LLVM_PLUGIN_EXT, like as clang/test does. FIXME: CMAKE_*_SUFFIX may be set in HandleLLVMOptions if those variables could be writable, rather than to set one as target properties. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201316 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] llvm_add_library: Add handling of the parameter ADDITIONAL_HEADERS ↵NAKAMURA Takumi2014-02-13
| | | | | | | | | | | to pass through to process_source. I was insightless then about unknown optional parameters. (Consider that LINK_LIBS foo bar ADDITIONAL_HEADERS qux quux) Suggested by Michael Kruse. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201283 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach tablegen() macro to check needed variablesNAKAMURA Takumi2014-02-12
| | | | | | | | | | | This macro depends on several variables to be set in the calling context. Check them and report an error if they are not set. Without this, custom commands may be silently specified that will fail at build time. Patch by Brad King. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201229 91177308-0d34-0410-b5e6-96231b3b80d8
* cmake: Do not export targets when installing toolchain onlyReid Kleckner2014-02-10
| | | | | | Patch by Brad King! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201111 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] LLVMSupport should be responsible to provide system_libs.NAKAMURA Takumi2014-02-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201077 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Introduce llvm_add_library().NAKAMURA Takumi2014-02-10
| | | | | | | | | | | | | | | | | | | | | | | - MODULE;SHARED;STATIC STATIC by default w/o BUILD_SHARED_LIBS. SHARED by default w/ BUILD_SHARED_LIBS. - OUTPUT_NAME name Corresponds to OUTPUT_NAME in target properties. - DEPENDS targets... Same semantics as add_dependencies(). - LINK_COMPONENTS components... Same as the variable LLVM_LINK_COMPONENTS. - LINK_LIBS lib_targets... Same semantics as target_link_libraries(). - ADDITIONAL_HEADERS (implemented in LLVMProcessSources) May specify header files for IDE generators. I suggest llvm_add_library() may be used for inter-project add_library stuff and also suggest add_***_library() may be used project-specific. Please be patient that llvm_add_library might be ambiguous against add_llvm_library. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201072 91177308-0d34-0410-b5e6-96231b3b80d8