summaryrefslogtreecommitdiffstats
path: root/llvm/cmake
Commit message (Collapse)AuthorAgeFilesLines
...
* Move clang feature flags settings out of LLVM core and into cfeAlp Toker2014-07-141-16/+0
| | | | | | | clang r212997 incorporated these settings into its own build system. They no longer need to be set from LLVM. llvm-svn: 212998
* [CMake][Win32.DLL] Let llvm_add_library(SHARED) link dependent libraries as ↵NAKAMURA Takumi2014-07-141-0/+7
| | | | | | | | | | | | | | PRIVATE. For example, c-index-test.exe requires just libclang.dll (its import library). When libraries in libclang were not PRIVATE but PUBLIC, c-index-test required libraries transitive by libclang. Note, on mingw with BUILD_SHARED_LIBS, library dependencies would become more strict. In principle, required libraries should be "required in its source file". This will help to detect missing dependencies. llvm-svn: 212934
* [CMake] LINK_COMPONENTS: Add also corresponding MCTargetDesc and TargetInfo ↵NAKAMURA Takumi2014-07-141-0/+9
| | | | | | as well, when target names or "nativecodegen" are specified. llvm-svn: 212921
* [CMake] Enable loadable modules, aka plugins, with BUILD_SHARED_LIBS on cygming.NAKAMURA Takumi2014-07-131-2/+5
| | | | | | Loadable modules could be enabled without BUILD_SHARED_LIBS with tweaks in future. llvm-svn: 212907
* [CMake] Introduce moddir for MODULE -- corresponding to ↵NAKAMURA Takumi2014-07-131-3/+18
| | | | | | | | | | LIBRARY_OUTPUT_DIRECTORY. On Win32.DLL, it points not lib but bin. LIBRARY_OUTPUT_DIRECTORY affects add_library(MODULE), especially Win32.DLL. llvm-svn: 212903
* [CMake] add_llvm_library: Add "RUNTIME DESTINATION bin" to install(). It ↵NAKAMURA Takumi2014-07-111-0/+1
| | | | | | affects add_library(SHARED) for Win32.DLL. llvm-svn: 212818
* Prospective -fsanitize=memory build fix following r212586Alp Toker2014-07-091-3/+3
| | | | | | | | | | | This -f group flag appears to influence linker flags, breaking the usual rules and causing CMake's link invocation to fail during feature detection due to missing link dependencies (msan_*). Let's forcibly add it for now to get things the way they were before feature detection started working. llvm-svn: 212590
* CMake: make __DATE__, __TIME__ etc. macro usage an errorAlp Toker2014-07-091-0/+3
| | | | | | | | | | | | | | | | When LLVM_ENABLE_TIMESTAMPS has been disabled we can prevent the preprocessor from embedding dates, times and file timestamps. There are a few motivations for this: 1) Validate the recent CMake feature detection bugfix from LLVM r212586 with a flag that's not actually available everywhere. 2) Dogfood clang's new -Wdate-time warning from r210511 when bootstrapping. 3) Encourage reproducible builds. llvm-svn: 212587
* CMake: fix compiler feature detectionAlp Toker2014-07-091-36/+27
| | | | | | | | | | | | | | | | | | | | add_flag_if_supported() and add_flag_or_print_warning() were effectively no-ops, just returning the value of the first result (usually '-fno-omit-frame-pointer') for all subsequent checks for different flags. Due to the way CMake caches feature detection results, we need to provide symbolic variable names which will persist the cached results. This commit fixes feature detection using these two macros. The feature checks now run and get stored correctly, and the correct output can be observed in configure logs: -- Performing Test C_SUPPORTS_FPIC -- Performing Test C_SUPPORTS_FPIC - Success -- Performing Test CXX_SUPPORTS_FPIC -- Performing Test CXX_SUPPORTS_FPIC - Success llvm-svn: 212586
* [CMake] Introduce LLVM_ENABLE_PLUGINS as an internal option. ↵NAKAMURA Takumi2014-07-042-8/+17
| | | | | | | | | | | BUILD_SHARED_LIBS may not control enable/disable plugins. FIXME: Make this configurable. FIXME: "ENABLE_SHARED" doesn't make sense, since it is used just for plugins. We may rename it. I introduced config.enable_shared in r120273. llvm-svn: 212315
* [CMake] Introduce LLVM_SHLIB_OUTPUT_INTDIR.NAKAMURA Takumi2014-07-041-1/+1
| | | | | | For now, its user is configure_lit_site_cfg(). llvm-svn: 212314
* [CMake] Fix set_output_directory to do nothing if *_OUTPUT_INTDIR was not given.NAKAMURA Takumi2014-07-041-0/+5
| | | | llvm-svn: 212313
* cmake: Don't do anything for LLVM_ENABLE_ASSERTIONS=OFFReid Kleckner2014-06-271-6/+0
| | | | | | | | | | | | | | | | | 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! llvm-svn: 211919
* Remove clang-specific libxml2 check from CMakeAlp Toker2014-06-061-19/+0
| | | | | | | | | | | 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). llvm-svn: 210309
* GraphWriter: detect graph viewer programs at runtimeAlp Toker2014-06-021-9/+3
| | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 210001
* AArch64/ARM64: move ARM64 into AArch64's placeTim Northover2014-05-241-1/+1
| | | | | | | | | | | | | | | 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. llvm-svn: 209577
* Use llvm-lit if LLVM source tree is unavailable.Greg Fitzgerald2014-05-211-5/+6
| | | | llvm-svn: 209308
* cmake: Remove -D NDEBUG from CFLAGS as well as CXXFLAGSReid Kleckner2014-05-191-7/+10
| | | | | | This silences ~7 warnings on .c files in the LLVM build. llvm-svn: 209163
* Disable -Wcomment when building with GCC.Evgeniy Stepanov2014-05-061-0/+11
| | | | | | | | GCC version of -Wcomment is not compatible with ascii art graph diagrams. Reverts r207629. llvm-svn: 208073
* Teach add_sphinx_target() to respect the LLVM_INSTALL_TOOLCHAIN_ONLY CMakeDan Liew2014-04-281-9/+11
| | | | | | option. llvm-svn: 207450
* If building with LLVM_ENABLE_DOXYGEN and using CMake thenDan Liew2014-04-281-1/+1
| | | | | | | | 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. llvm-svn: 207404
* Added Sphinx documentation generation to CMake build system.Reid Kleckner2014-04-183-0/+89
| | | | | | | | | | | | | | | | | | | | | 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>! llvm-svn: 206655
* Teach LLVMConfigVersion.cmake to behave as find_package() expects.Eric Christopher2014-04-162-1/+16
| | | | | | Patch by Brad King llvm-svn: 206426
* Add support for a patch version to the cmake system.Eric Christopher2014-04-162-0/+2
| | | | | | Patch by Brad King llvm-svn: 206425
* AddLLVM: Mute the prefix "lib" in SHARED on win32.NAKAMURA Takumi2014-04-101-0/+5
| | | | | | | - LLVMSupport.dll - libLLVMSupport.dll.a llvm-svn: 205969
* Add support for building LLVM on FreeBSD 9.2Viktor Kutuzov2014-04-091-0/+5
| | | | llvm-svn: 205847
* ARM64: initial backend importTim Northover2014-03-291-0/+2
| | | | | | | | | | | | 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. llvm-svn: 205090
* Win installer: provide a pretty iconHans Wennborg2014-03-271-0/+0
| | | | llvm-svn: 204960
* Remove cmake module support for Visual C++ 2010 (MSVC10)Yaron Keren2014-03-251-15/+3
| | | | | | but keep the MSVC11 (Visual C++ 2012) support. llvm-svn: 204706
* Disable Visual C++ warning 4722 about aborting a destructor,Yaron Keren2014-03-251-1/+2
| | | | | | it has no value for us. llvm-svn: 204704
* [CMake][cygming] Disable --out-implib from executables.NAKAMURA Takumi2014-03-161-0/+9
| | | | | | It doesn't make sense even with --export-all-symbols. llvm-svn: 204017
* [CMake] Put -Werror to CMAKE_CXX_FLAGS instead of using add_llvm_definitions()Alexey Samsonov2014-03-131-3/+1
| | | | | | | | 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 llvm-svn: 203792
* [CMake] Enable a bunch of Xcode build settings that correspond to warnings ↵Ted Kremenek2014-03-131-0/+23
| | | | | | | | | | | | | | | | 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. llvm-svn: 203760
* Use -std=gnu++11 on cygwin and mingw.Rafael Espindola2014-03-121-1/+7
| | | | | | | | | Without this common features like off_t and strdup are missing. This should bring back those bots. Configure bits by Meador Inge. llvm-svn: 203701
* [CMake] add_llvm_target(): No need to include TABLEGEN_OUTPUT in source list.NAKAMURA Takumi2014-03-041-1/+1
| | | | llvm-svn: 202862
* [C++11] Switch the CMake option from LLVM_ENABLE_CXX11 (default on) toChandler Carruth2014-03-011-3/+10
| | | | | | | | 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... llvm-svn: 202567
* With rpaths being set correctly, SHLIBPATH_VAR is not needed anymore.Rafael Espindola2014-02-281-10/+0
| | | | llvm-svn: 202510
* [CMake] llvm_add_library(SHARED|STATIC): Fix broken OUTPUT_NAME for *_static.NAKAMURA Takumi2014-02-281-1/+1
| | | | llvm-svn: 202454
* [CMake] Work around to use target_link_libraries(PUBLIC) in ↵NAKAMURA Takumi2014-02-261-0/+7
| | | | | | | BUILD_SHARED_LIBS mode. FIXME: It may be PRIVATE since SO knows its dependent libs. llvm-svn: 202261
* [CMake] Move LLVMBUILD_LIB_DEPS stuff from add_llvm_library (and ↵NAKAMURA Takumi2014-02-261-13/+30
| | | | | | LLVm-Config) to llvm_add_library to centralize target_link_libraries. llvm-svn: 202260
* [CMake] Use target_link_libraries(INTERFACE|PRIVATE) on CMake-2.8.12 to ↵NAKAMURA Takumi2014-02-262-3/+16
| | | | | | | | | | | | | | | | | | 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. llvm-svn: 202241
* TableGen.cmake: Functionalize and reformat.NAKAMURA Takumi2014-02-231-16/+17
| | | | llvm-svn: 201972
* Simplify linking to system librariesNAKAMURA Takumi2014-02-233-47/+7
| | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 201969
* Prune debug message in AddLLVM.cmake.NAKAMURA Takumi2014-02-221-1/+0
| | | | llvm-svn: 201932
* [CMake] llvm_add_library: Add dependencies also to objlibs as workaround of ↵NAKAMURA Takumi2014-02-211-0/+13
| | | | | | | | CMake issue 14747. http://www.cmake.org/Bug/view.php?id=14747 llvm-svn: 201855
* [CMake] Introduce "llvm_add_library(SHARED STATIC)" to build both shared lib ↵NAKAMURA Takumi2014-02-211-2/+36
| | | | | | | | | | | | | | 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. llvm-svn: 201854
* Teach LLVM-Config to use logical target names (2/2)NAKAMURA Takumi2014-02-214-8/+11
| | | | | | | | | | | | | 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. llvm-svn: 201853
* Teach LLVM-Config to use logical target names (1/2)NAKAMURA Takumi2014-02-211-15/+7
| | | | | | | | | | | 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. llvm-svn: 201852
* [CMake] Move intrinsics_gen to lib/Target out of add_public_tablegen_target.NAKAMURA Takumi2014-02-201-1/+1
| | | | | | add_public_tablegen_target is used somewhere. llvm-svn: 201787
* Unconditionally include msan_interface.h when building with MSan.Evgeniy Stepanov2014-02-201-1/+0
| | | | | | | Any version of Clang that does not provide this header is way too old to bootstrap with MSan. llvm-svn: 201776
OpenPOWER on IntegriCloud