summaryrefslogtreecommitdiffstats
path: root/llvm/cmake
Commit message (Collapse)AuthorAgeFilesLines
...
* [cmake] Pass -O3 when linking.Rafael Espindola2014-11-021-4/+11
| | | | | | Gold and bfd ld enable misc optimizations. lld ignores the option for now. llvm-svn: 221097
* Suppress MSVC's equivalent of -Wshadow warningsReid Kleckner2014-10-311-0/+4
| | | | | | | | | | | | | | | | | | | IMO we need to clean up some of these, but the member variable one (C4458) has false positives on static methods. It is currently firing on Twine, which has a static method like: struct Twine { uintptr_t LHS, RHS; static void staticMethod() { // warning C4458: declaration of 'LHS' hides class member uintptr_t LHS; ... } }; We should fix up clang's -Wshadow and clean it up, and then we can re-enable some of these MSVC warnings. llvm-svn: 221012
* EXPORTED_SYMBOL_FILE using mingw and cmakeChris Bieneman2014-10-301-13/+15
| | | | | | | | | | | | | | | | Summary: This is a fix for the command line syntax error while building LTO when using MinGW. Patch By: jsroemer Reviewers: rnk Reviewed By: rnk Subscribers: rnk, beanz, llvm-commits Differential Revision: http://reviews.llvm.org/D5476 llvm-svn: 220935
* Re-commit r220667.Rui Ueyama2014-10-271-1/+7
| | | | | | C++ source given to check_cxx_source_compile should have define "main". llvm-svn: 220669
* Revert "Include stddef.h before including cxxabi.h" to un-break buildbotRui Ueyama2014-10-271-6/+1
| | | | | | This reverts commit r220665. llvm-svn: 220667
* Include stddef.h before including cxxabi.hRui Ueyama2014-10-271-1/+6
| | | | | | | | | | On FreeBSD 10.0, size_t needs to be defined before including cxxabi.h. Currenty HAVE_CXXABI_H is not defined on FreeBSD because of that reason. This patch teaches cmake and configure how to include it. http://reviews.llvm.org/D5940 llvm-svn: 220665
* Add llvm-go tool.Peter Collingbourne2014-10-231-8/+12
| | | | | | | | | | | | This tool lets us build LLVM components within the tree by setting up a $GOPATH that resembles a tree fetched in the normal way with "go get". It is intended that components such as the Go frontend will be built in-tree using this tool. Differential Revision: http://reviews.llvm.org/D5902 llvm-svn: 220462
* Do not add -gsplit-dwarf to LLVM_DEFINITIONS.Peter Collingbourne2014-10-221-1/+1
| | | | | | | | | | This would cause the flag to appear in the output of "llvm-config --cppflags", which should contain only preprocessor flags. The -gsplit-dwarf flag in particular can cause problems with certain downstream users such as cgo. Differential Revision: http://reviews.llvm.org/D5895 llvm-svn: 220410
* Teach lit to filter the host LDFLAGS down from the build system and intoChandler Carruth2014-10-211-0/+1
| | | | | | | | | | the CGO build environment. This lets things like -rpath propagate down to the C++ code that is built along side the Go bindings when testing them. Patch by Peter Collingbourne, and verified that it works by me. llvm-svn: 220252
* Explain why we don't always use --gc-sections.Rafael Espindola2014-10-201-0/+4
| | | | llvm-svn: 220237
* Revert r220174, "Always use -Wl,-gc-sections on our build."NAKAMURA Takumi2014-10-201-9/+6
| | | | | | | | | | | | | | | | | | It dropped required functions for plugins with gnu ld 2.20 and 2.21. Failing Tests (1): LLVM :: Feature/load_module.ll Hello: bin/opt: symbol lookup error: lib/LLVMHello.so: undefined symbol: _ZN4llvm11raw_ostream13write_escapedENS_9StringRefEb Failing Tests (1): Clang :: Frontend/plugins.c error: unable to load plugin 'lib/PrintFunctionNames.so': 'lib/PrintFunctionNames.so: undefined symbol: _ZN5clang15PluginASTAction6anchorEv' I think we should inspect linker's version or behavior to introduce --gc-sections for --export-dynamic. llvm-svn: 220198
* Always use -Wl,-gc-sections on our build.Rafael Espindola2014-10-191-6/+9
| | | | | | | Both bfd ld and gold correctly handle --export-dynamic, so gc-sections is safe even for binaries that support plugins. llvm-svn: 220174
* Disable ccache for go tests.Peter Collingbourne2014-10-171-2/+2
| | | | | | Should fix llvm-clang-lld-x86_64-debian-fast bot. llvm-svn: 220071
* Initial version of Go bindings.Peter Collingbourne2014-10-162-0/+18
| | | | | | | | | | | | This code is based on the existing LLVM Go bindings project hosted at: https://github.com/go-llvm/llvm Note that all contributors to the gollvm project have agreed to relicense their changes under the LLVM license and submit them to the LLVM project. Differential Revision: http://reviews.llvm.org/D5684 llvm-svn: 219976
* Re-land r219354: Use llvm-symbolizer to symbolize LLVM/Clang crash dumps.Alexey Samsonov2014-10-101-0/+1
| | | | | | | | | | | | In fact, symbolization is now expected to work only on Linux and FreeBSD/NetBSD, where we have dl_iterate_phdr and can learn the main executable name without argv0 (it will be possible on BSD systems after http://reviews.llvm.org/D5693 lands). #ifdef-out the code for all the rest Unix systems. Reviewed in http://reviews.llvm.org/D5610 llvm-svn: 219534
* Revert r219354. It seems to break some buildbots.Alexey Samsonov2014-10-081-1/+0
| | | | llvm-svn: 219355
* Use llvm-symbolizer to symbolize LLVM/Clang crash dumps.Alexey Samsonov2014-10-081-0/+1
| | | | | | | | | | | | | | | | This change modifies fatal signal handler used in LLVM tools. Now it attempts to find llvm-symbolizer binary and communicates with it in order to turn instruction addresses into function/file/line info entries. This should significantly improve stack traces readability in Debug builds. This feature only works on selected platforms (including Darwin and Linux). If the symbolization fails for some reason, signal handler will fallback to the original behavior. Reviewed in http://reviews.llvm.org/D5610 llvm-svn: 219354
* Add LLVM_ENABLE_MODULES flag to CMake to enable building with C++ modules.Richard Smith2014-09-262-0/+31
| | | | llvm-svn: 218551
* Fix CMake warning CMP0054: don't quote a variable name that is intended to beRichard Smith2014-09-261-1/+1
| | | | | | expanded; future versions of cmake may not expand the variable in this case. llvm-svn: 218543
* Fix misinterpretation of CMake rule found by a CMake warning (related to ↵Richard Smith2014-09-261-2/+2
| | | | | | | | | | | | | | | | | | CMP0054). lldb sets the variable SHARED_LIBRARY to 1, which breaks this conditional, because older versions of CMake interpret if ("${t}" STREQUAL "SHARED_LIBRARY") as meaning if ("${t}" STREQUAL "1") in this case. Change the conditional so it does the right thing with both old and new CMakes. llvm-svn: 218542
* Add CMake check for libatomic.Evgeniy Stepanov2014-09-122-3/+5
| | | | llvm-svn: 217666
* Don't attempt to run llvm-config in cmake/modules/Makefile when doingDan Liew2014-09-101-0/+3
| | | | | | | | ``make clean`` because it won't be available. This is an attempt to unbreak buildbots broken by r217484. llvm-svn: 217490
* Attempt to fix PR20884Dan Liew2014-09-101-2/+12
| | | | | | | | | | | | | | | | This fixes the generation of broken LLVMExports.cmake file by the Autoconf/Makefile build system when --enable-shared is passed to configure. When --enable_shared is passed the Makefile.rules does not set the LLVMConfigLibs variable which cmake/modules/Makefile previously relied on. Now it runs the llvm-config command itself to get the library names. This still isn't perfect because the generated LLVM targets refer to the static libraries and not the shared library but that is much larger problem to fix. llvm-svn: 217484
* [CMake] Add -fno-sanitize=function to UBSan bootstrapAlexey Samsonov2014-09-051-1/+1
| | | | llvm-svn: 217217
* Enabling LLVM & Clang to be cross-compiled using CMake from a single ↵Chris Bieneman2014-09-033-34/+85
| | | | | | | | configuration command line The basic idea is similar to the existing cross compilation support. A directory must be configured to build host versions of tablegen tools and llvm-config. This directory can be user provided (and configured), or it can be created during the build. During a build the native build directory will be configured and built to supply the tablegen tools used during the build. A user could also explicitly provide the tablegen executables to run on the CMake command line. llvm-svn: 217105
* cmake: Don't reject unknown cpp files that start with .Matt Arsenault2014-09-021-4/+9
| | | | | | | | Some editors create hidden file backups in the same directory as the file, and it's annoying when cmake errors on them. llvm-svn: 216941
* Introduce -DLLVM_USE_SANITIZER=Undefined CMake option to build UBSan-ified ↵Alexey Samsonov2014-08-291-0/+4
| | | | | | | | | version of LLVM/Clang. I've fixed most of the simple bugs and currently "check-llvm" test suite has 26 failures, and "check-clang" suite has 5 failures. llvm-svn: 216701
* cmake: actually test -WcommentDylan Noblesmith2014-08-231-1/+1
| | | | | | | | | | | | | | | | | | | This test was testing nothing, as only -Werror was ever being added to the compiler flags. You can see the final nitty-gritty compiler invocation in CMakeFiles/CMakeOutput.log (for successful tests) and CMakeFiles/CMakeError.log (for failed tests). Before: Building C object CMakeFiles/cmTryCompileExec3385359576.dir/src.c.o /usr/bin/clang -fPIC -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -DC_WCOMMENT_ALLOWS_LINE_WRAP -Werror -o CMakeFiles/cmTryCompileExec3385359576.dir/src.c.o -c /home/nobled/code/llvm-b9/CMakeFiles/CMakeTmp/src.c After: Building C object CMakeFiles/cmTryCompileExec3385359576.dir/src.c.o /usr/bin/clang -fPIC -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -DC_WCOMMENT_ALLOWS_LINE_WRAP -Werror -Wcomment -o CMakeFiles/cmTryCompileExec3385359576.dir/src.c.o -c /home/nobled/code/llvm-b9/CMakeFiles/CMakeTmp/src.c llvm-svn: 216328
* cmake: disable -Wnon-virtual-dtor when it gives false positivesDylan Noblesmith2014-08-231-2/+14
| | | | | | | | | clang has only been smart enough not to trigger -Wnon-virtual-dtor warnings on final classes since r208449 (in clang 3.5). Building with older versions is extremely noisy, so disable the warning on those compilers. llvm-svn: 216327
* Disabling an MSVC warning ('var' : definition from the for loop is ignored; ↵Aaron Ballman2014-08-181-0/+1
| | | | | | the definition from the enclosing scope is used) which will trigger false positives more than true positives. llvm-svn: 215895
* Make message about building sphinx documentation with CMake moreDan Liew2014-08-141-1/+1
| | | | | | informative by stating where the output is going. llvm-svn: 215635
* Add SPHINX_WARNINGS_AS_ERRORS CMake option to allow warnings to not beDan Liew2014-08-142-1/+10
| | | | | | | treated as errors (which is still the default). This is useful when working on documentation that has existing errors. llvm-svn: 215634
* Fix for #20408 - CMake LLVM_ENABLE_FFI=ON build fails on reconfigureJosh Klontz2014-08-081-2/+2
| | | | llvm-svn: 215207
* Emit a warning if llvm_map_components_to_libraries() is used noting that itsDan Liew2014-07-281-1/+3
| | | | | | | | | | use is deprecated in favour of llvm_map_components_to_libnames() Although message(DEPRECATION "msg") would probably be a better fit this does nothing if CMAKE_ERROR_DEPRECATED and CMAKE_WARNING_DEPRECATED are both off, which is the default. llvm-svn: 214078
* Add LLVM_TOOLS_BINARY_DIR variable to LLVMConfig.cmake so clientsDan Liew2014-07-223-1/+4
| | | | | | | | | of LLVM using CMake can easily find the tools directory. LLVM_BUILD_TOOLS_BINARY_DIR was removed because it is now superfluous. llvm-svn: 213674
* Export LLVM_ENABLE_RTTI and LLVM_ENABLE_EH in LLVMConfig.cmake soDan Liew2014-07-222-0/+18
| | | | | | | clients of LLVM know if RTTI and/or EH were enabled in the build of LLVM they are trying to link against. llvm-svn: 213664
* Added LLVM_ENABLE_RTTI and LLVM_ENABLE_EH options that allow RTTI and EHDan Liew2014-07-222-3/+17
| | | | | | | | to globally be controlled. Individual targets (e.g. ExceptionDemo) can still override this by using LLVM_REQUIRE_RTTI and LLVM_REQUIRE_EH if they need to be compiled with RTTI or exception handling respectively. llvm-svn: 213663
* Export LLVM_ENABLE_ASSERTIONS in LLVMConfig.cmake so clients knowDan Liew2014-07-213-1/+9
| | | | | | | if the version of LLVM they are trying to use was built with or without assertions. llvm-svn: 213532
* CMake: avoid a reconfigure loop from r213091Alp Toker2014-07-151-2/+1
| | | | | | | Removing the native CMakeCache.txt causes the target to get re-run needlessly on some systems. We'll want another solution for that part of the fix. llvm-svn: 213099
* CMake: fix cross-compilation with external source directoriesAlp Toker2014-07-151-1/+11
| | | | | | | | This adds support for building native artifacts when cross-compiling using the popular side-by-side source directory layout (no symlinks, no nested repositories). llvm-svn: 213091
* Revert "Revert "Move clang feature flags settings out of LLVM core and into ↵Alp Toker2014-07-141-16/+0
| | | | | | | | | | cfe"" It turns out this commit was fine. The problem was in the legacy build system (fixed r213010). This reverts commit r213005. llvm-svn: 213015
* Revert "Move clang feature flags settings out of LLVM core and into cfe"Alp Toker2014-07-141-0/+16
| | | | | | | | | This broke one of the builds, presumably side-by-side modular CMake. Investigating. This reverts commit r212998. llvm-svn: 213005
* 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
OpenPOWER on IntegriCloud