summaryrefslogtreecommitdiffstats
path: root/llvm/cmake
Commit message (Collapse)AuthorAgeFilesLines
...
* Try to unbreak Clang build to export LLVM_ABI_BREAKING_CHECKS, fixup for ↵NAKAMURA Takumi2015-04-012-0/+9
| | | | | | | r233310. FIXME: Should ENABLE_ABI_BREAKING_CHECKS be tri-state, "ON/OFF/blank"? llvm-svn: 233801
* [CMake] Cache LLVM_ABI_BREAKING_CHECKS in LLVMConfig.cmake.Sanjoy Das2015-04-011-0/+2
| | | | | | Not having this breaks clang builds that use an already-built LLVM. llvm-svn: 233784
* [CMake] Removing duplicates from the list of test suites to generate targets ↵Chris Bieneman2015-03-271-0/+5
| | | | | | | | for. Not doing this causes some headaches for users migrating from autoconf to CMake. llvm-svn: 233428
* CMake: enable installing utilsDerek Schuff2015-03-271-0/+12
| | | | | | | | | | | | | | | | | | | | | | | Added a new boolean CMake flag, LLVM_INSTALL_UTILS. When set, the 'install' target will include in the bin directory the utils binaries - e.g. FileCheck. This mirrors the autoconfig behavior. Test Plan: Locally verified that utils binaries are copied when flag is set, and not copied when flag is not set. Reviewers: jfb, dschuff, beanz Reviewed By: beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8587 Patch by Mircea Trofin llvm-svn: 233385
* [ADT][CMake][AutoConf] Fail-fast iterators for DenseMapSanjoy Das2015-03-261-0/+14
| | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is an attempt at making `DenseMapIterator`s "fail-fast". Fail-fast iterators that have been invalidated due to insertion into the host `DenseMap` deterministically trip an assert (in debug mode) on access, instead of non-deterministically hitting memory corruption issues. Enabling fail-fast iterators breaks the LLVM C++ ABI, so they are predicated on `LLVM_ENABLE_ABI_BREAKING_CHECKS`. `LLVM_ENABLE_ABI_BREAKING_CHECKS` by default flips with `LLVM_ENABLE_ASSERTS`, but can be clamped to ON or OFF using the CMake / autoconf build system. Reviewers: chandlerc, dexonsmith, rnk, zturner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8351 llvm-svn: 233310
* Disabling warnings for MSVC build to enable /W4 use.Andrew Kaylor2015-03-241-0/+16
| | | | | | Differential Revision: http://reviews.llvm.org/D8572 llvm-svn: 233133
* Re-land: Generate targets for each lit suite.Chris Bieneman2015-03-231-0/+22
| | | | | | | | | | | | | | | | | | | | | Summary: This change makes CMake scan for lit suites and generate a target for each lit test suite. The targets follow the format check-<project>-<suite path>. For example: check-llvm-unit - Runs the LLVM unit tests check-llvm-codegen-arm - Runs the ARM codeine tests Note: These targets are not generated during multi-configuration generators (i.e. Xcode and Visual Studio) because target clutter impacts UI usability. * Also fixed a minor issue that Duncan pointed out to me I was passing the suite to lit twice Reviewers: chandlerc Subscribers: aemerson, llvm-commits Differential Revision: http://reviews.llvm.org/D8380 llvm-svn: 233009
* Raising minimum required CMake version to 2.8.12.2.Chris Bieneman2015-03-231-2/+2
| | | | | | This commit is in reference to the llvm-dev thread: http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-March/083672.html llvm-svn: 233008
* test: Make a start on a test suite for libLTO.Peter Collingbourne2015-03-191-0/+4
| | | | | | | | | | This works in a similar way to the gold plugin tests. We search for a compatible linker on $PATH and use it to run tests against our just-built libLTO. To start with, test the just added opt level functionality. Differential Revision: http://reviews.llvm.org/D8472 llvm-svn: 232785
* Fixing dependencies for native tablegen.Chris Bieneman2015-03-191-4/+2
| | | | | | | | | | | The dependencies for cross-built tablegen were a bit confused. This fixes that. The following dependencies are now enforced: (1) Tablegen tasks depend on the native tablegen (2) Native tablegen depends on the cross-compiled tablegen Although the native tablegen doesn't actually require the cross tablegen, having this dependency forces the native tablegen to rebuild whenever the cross tablegen changes. llvm-svn: 232730
* [CMake] Don't pass in MSVC warning flags as definitions.Greg Bedwell2015-03-191-2/+9
| | | | | | | | | | | NFC currently but required as a prerequisite for using the Microsoft resource compiler in conjunction with CMake's ninja generator, which knows how to filter flags appropriately, but not definitions. Differential Revision: http://reviews.llvm.org/D8188 llvm-svn: 232727
* Revert "Generate targets for each lit suite."Chris Bieneman2015-03-181-23/+0
| | | | | | This change broke Polly. I'll track down the failure when I have a chance and re-apply the change. llvm-svn: 232676
* Generate targets for each lit suite.Chris Bieneman2015-03-181-0/+23
| | | | | | | | | | | | | | | | | | | Summary: This change makes CMake scan for lit suites and generate a target for each lit test suite. The targets follow the format check-<project>-<suite path>. For example: check-llvm-unit - Runs the LLVM unit tests check-llvm-codegen-arm - Runs the ARM codeine tests Note: These targets are not generated during multi-configuration generators (i.e. Xcode and Visual Studio) because target clutter impacts UI usability. Reviewers: chandlerc Subscribers: aemerson, llvm-commits Differential Revision: http://reviews.llvm.org/D8380 llvm-svn: 232671
* CMake: Disable ENABLE_EXPORTS for executables with MSVCReid Kleckner2015-03-181-0/+6
| | | | | | | | | | | | | | The MSVC linker won't produce a .lib file for an executable that doesn't export anything, and LLVM doesn't maintain dllexport annotations or .def files listing all C++ symbols. It also doesn't support exporting all symbols, like binutils ld. CMake 3.2 changed the Ninja generator to list both the .exe and .lib files as outputs of executable build targets. Ninja would always re-link executables with ENABLE_EXPORTS because the .lib output file was not present, and therefore the target was out of date. llvm-svn: 232662
* Refactoring CMake CrossCompile module.Chris Bieneman2015-03-122-34/+56
| | | | | | | | | * put most of the cross-compiling support into a function llvm_create_cross_target_internal. * when CrossCompile is included it still generates a NATIVE target. * llvm_create_cross_target function takes a target_name which should match a toolchain. * llvm_create_cross_target can now be used to target more than one cross-compilation target. llvm-svn: 232067
* Doing some cleanup to the iOS toolchain.Chris Bieneman2015-03-121-9/+23
| | | | | | | * There is no reason to require SDKROOT as an environment variable because we can derive it from xcrun * Setting CMAKE_RANLIB makes our static archives usable llvm-svn: 232053
* Revert "[CMake] Don't pass in MSVC warning flags as definitions"Greg Bedwell2015-03-111-11/+4
| | | | | | | reverting while I investigate why it broke the sanitizer-windows build. This reverts commit r231924. llvm-svn: 231925
* [CMake] Don't pass in MSVC warning flags as definitionsGreg Bedwell2015-03-111-4/+11
| | | | | | | | | | | NFC currently but required as a prerequisite for using the Microsoft resource compiler in conjunction with CMake's ninja generator, which knows how to filter flags appropriately, but not definitions. Differential Revision: http://reviews.llvm.org/D8188 llvm-svn: 231924
* Add new LLVM_OPTIMIZED_TABLEGEN build setting which configures, builds and ↵Chris Bieneman2015-03-101-1/+1
| | | | | | | | | | | | | | | | uses a release tablegen build when LLVM is configured with assertions enabled. Summary: This change leverages the cross-compiling functionality in the build system to build a release tablegen executable for use during the build. Reviewers: resistor, rnk Reviewed By: rnk Subscribers: rnk, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D7349 llvm-svn: 231842
* Drop the hacks used for partial C99 math libraries.Benjamin Kramer2015-03-091-15/+0
| | | | | | All supported platforms have half-way decent C99 support. llvm-svn: 231679
* Teach the LLVM CMake build how to explicitly use libc++abi when usingChandler Carruth2015-03-071-10/+16
| | | | | | | | | | | libc++. This lets me almost self-host on Linux with libc++ and libc++abi very simply. Currently, MCJIT and OrcJIT are failing due to uncaught exceptions, and the Go binding tests are failing to build due to not linking in the correct C++ standard library. llvm-svn: 231560
* [sanitizer/coverage] Add AFL-style coverage counters (search heuristic for ↵Kostya Serebryany2015-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | fuzzing). Introduce -mllvm -sanitizer-coverage-8bit-counters=1 which adds imprecise thread-unfriendly 8-bit coverage counters. The run-time library maps these 8-bit counters to 8-bit bitsets in the same way AFL (http://lcamtuf.coredump.cx/afl/technical_details.txt) does: counter values are divided into 8 ranges and based on the counter value one of the bits in the bitset is set. The AFL ranges are used here: 1, 2, 3, 4-7, 8-15, 16-31, 32-127, 128+. These counters provide a search heuristic for single-threaded coverage-guided fuzzers, we do not expect them to be useful for other purposes. Depending on the value of -fsanitize-coverage=[123] flag, these counters will be added to the function entry blocks (=1), every basic block (=2), or every edge (=3). Use these counters as an optional search heuristic in the Fuzzer library. Add a test where this heuristic is critical. llvm-svn: 231166
* cmake: Use MSVC atomics with clang-clReid Kleckner2015-03-021-0/+1
| | | | llvm-svn: 231022
* Making the SO version major.minor instead of just major because ABI and API ↵Chris Bieneman2015-03-021-1/+1
| | | | | | change between minor versions. llvm-svn: 230981
* Minor follow-ups to r229720 suggested on llvmdevReid Kleckner2015-02-271-1/+1
| | | | | | "svn" patch by Sedat Dilek plus trimming whitespace added in r229720. llvm-svn: 230773
* [CMake] Fix the clang-cl self host build.Zachary Turner2015-02-252-1/+6
| | | | | | | | | | | | | | This allows clang-cl to self-host cleanly with no magic setup steps required. After this patch, all you have to do is set CC=CXX=clang-cl and run cmake -G Ninja. These changes only exist to support C++ features which are unsupported in clang-cl, so regardless of whether the user specifies they want to use them, we still have to disable them. llvm-svn: 230539
* build: check if atomic routines are implicitly providedSaleem Abdulrasool2015-02-251-3/+7
| | | | | | | | | | It is possible for the atomic routines to be provided by the compiler without requiring any additional libraries. Check if that is the case before checking for a library. Patch by Matt Glazar! llvm-svn: 230452
* Revert "Raising minimum required CMake version to 2.8.12.2."Tobias Grosser2015-02-241-2/+2
| | | | | | | | | | | This reverts commit r230062. Debian stable (wheezy) ships still with cmake 2.8.9. The commit broke my LLVM/Polly buildbot, to my knowledge our only Linux+cmake buildbot. llvm-svn: 230343
* Revert "Revert "Raising minimum required CMake version to 2.8.12.2.""Chad Rosier2015-02-231-2/+2
| | | | | | This reverts commit r230240, which was an accidental commit. llvm-svn: 230246
* Revert "Raising minimum required CMake version to 2.8.12.2."Chad Rosier2015-02-231-2/+2
| | | | | | This reverts commit 247aed4710e8befde76da42b27313661dea7cf66. llvm-svn: 230240
* cmake: Don't do the libstdc++ version check when clang simulates MSVCReid Kleckner2015-02-231-5/+9
| | | | | | | | | | | | | If we're using clang-cl, that's a pretty good indication that we're going to use MSVC's STL. This simplifies the clang-cl ninja self-host configuration down to: CC=clang-cl CXX=clang-cl cmake .. -GNinja Modified version of zturner's patch: Differential Revision: http://reviews.llvm.org/D7824 llvm-svn: 230239
* Remove log statements from config scripts.Zachary Turner2015-02-221-2/+0
| | | | | | The bots seem to be happy now. llvm-svn: 230164
* Really fix the build this time.Zachary Turner2015-02-221-0/+2
| | | | | | | I was setting the python variable to "@HAVE_DIA_SDK@", which will always be a string, and will always evaluate to True. llvm-svn: 230163
* [llvm-pdbdump] Resubmit "Add some tests for llvm-pdbdump".Zachary Turner2015-02-221-0/+2
| | | | | | | | | | | | | NOTE: This patch intentionally breaks the build. It attempts to resubmit r230083, but with some debug logging in the CMake and lit config files to determine why certain bots do not correctly disable the DIA tests when DIA is not available. After a sufficient number of bots fail, this patch will either be reverted or, if the cause of the failure becomes obvious, a fix submitted with the log statements removed. llvm-svn: 230161
* Raising minimum required CMake version to 2.8.12.2.Chris Bieneman2015-02-201-2/+2
| | | | llvm-svn: 230062
* [Support/Timer] Make GetMallocUsage() aware of jemalloc.Davide Italiano2015-02-191-0/+1
| | | | | | | Differential Revision: D7657 Reviewed by: shankarke, majnemer llvm-svn: 229824
* CMake: Fix add_lit_target for the case where a test suite has zero target ↵Peter Collingbourne2015-02-181-2/+4
| | | | | | | | | dependencies. This can happen with a standalone project containing a test suite with no internal dependencies. llvm-svn: 229753
* Adding install targets for individual LLVM tools and libraries.Chris Bieneman2015-02-181-2/+20
| | | | | | | | | | | | | | | | | Summary: * add_llvm_tool and add_llvm_library now add install-${name} targets to install specific components * added installhdrs target to install just the LLVM headers * The above changes only apply for single-configuration generators (Ninja, Makefiles...), not for multi-configuration generators (Visual Studio, Xcode...) Reviewers: pete Reviewed By: pete Subscribers: pete, llvm-commits Differential Revision: http://reviews.llvm.org/D7619 llvm-svn: 229727
* Enable standard so versioning for libLLVM.Chris Bieneman2015-02-181-0/+5
| | | | | | | | | | | | | | | | | Summary: This resolves Bugzilla bug 15493. Reviewers: chapuni, pete Reviewed By: pete Subscribers: pete, llvm-commits Differential Revision: http://reviews.llvm.org/D6157 Conflicts: cmake/modules/AddLLVM.cmake llvm-svn: 229720
* Downgrade build system error message to a warningFilipe Cabecinhas2015-02-181-2/+5
| | | | | | | Instead of requiring MSVC 2013 U4, we simply warn users, since some might not bt able to immediately upgrade. llvm-svn: 229598
* We require MSVC 2013 Update 4 due to previous versions miscompiling ASTMatchersFilipe Cabecinhas2015-02-171-2/+2
| | | | | | | | | | Previous versions of MSVC 2013 would miscompile ASTMatchers (and/or their tests). Bump up the requirement and make sure we know about the minor revision. Minimum required version found by Michael Edwards! llvm-svn: 229584
* Update the docs to require at least MSVC 2013.Benjamin Kramer2015-02-151-2/+2
| | | | llvm-svn: 229323
* Reapply r229185(cbieneman) -- Raising minimum required Visual Studio version ↵NAKAMURA Takumi2015-02-151-6/+0
| | | | | | | | to 2013. This is based on the discussions on: [LLVMdev] [RFC] Raising LLVM minimum required MSVC version to 2013 for trunk llvm-svn: 229320
* [gold] Consolidate the gold plugin options and actually search forChandler Carruth2015-02-141-0/+6
| | | | | | | | | | | | | | | | a gold binary explicitly. Substitute this binary into the tests rather than just directly executing the 'ld' binary. This should allow folks to inject a cross compiling gold binary, or in my case to use a gold binary built and installed somewhere other than /usr/bin/ld. It should also allow the tests to find 'ld.gold' so that things work even if gold isn't the default on the system. I've only stubbed out support in the makefile to preserve the existing behavior with none of the fancy logic. If someone else wants to add logic here, they're welcome to do so. llvm-svn: 229251
* Revert r229185, "Raising minimum required Visual Studio version to 2013."NAKAMURA Takumi2015-02-141-0/+6
| | | | | | All builders are not ready yet. llvm-svn: 229199
* Raising minimum required Visual Studio version to 2013.Chris Bieneman2015-02-131-6/+0
| | | | | | This is based on the discussions on: [LLVMdev] [RFC] Raising LLVM minimum required MSVC version to 2013 for trunk llvm-svn: 229185
* Teach llvm_add_library() to find include dirs.Zachary Turner2015-02-101-10/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since header files are not compilation units, CMake does not require you to specify them in the CMakeLists.txt file. As a result, unless a header file is explicitly added, CMake won't know about it, and when generating IDE-based projects, CMake won't put the header files into the IDE project. LLVM currently tries to deal with this in two ways: 1) It looks for all .h files that are in the project directory, and adds those. 2) llvm_add_library() understands the ADDITIONAL_HEADERS argument, which allows one to list an arbitrary list of headers. This patch takes things one step further. It adds the ability for llvm_add_library() to take an ADDITIONAL_HEADER_DIRS argument, which will specify a list of folders which CMake will glob for header files. Furthermore, it will glob not only for .h files, but also for .inc files. Included in this CL is an update to one of the existing users of ADDITIONAL_HEADERS to use this new argument instead, to serve as an illustration of how this cleans up the CMake. The big advantage of this new approach is that until now, there was no way for the IDE projects to locate the header files that are in the include tree. In other words, if you are in, for example, lib/DebugInfo/DWARF, the corresponding includes for this project will be located under include/llvm/DebugInfo/DWARF. Now, in the CMakeLists.txt for lib/DebugInfo/DWARF, you can simply write: ADDITIONAL_HEADER_DIRS ../../include/llvm/DebugInfo/DWARF as an argument to llvm_add_library(), and all header files will get added to the IDE project. Differential Revision: http://reviews.llvm.org/D7460 Reviewed By: Chris Bieneman llvm-svn: 228670
* Define HAVE_DIA_SDK on Windows when DIA is present.Zachary Turner2015-02-101-0/+16
| | | | | | | | | | | This allows all CMake projects, as well as C++ code, to detect if and when DIA SDK is available for use so that we can enable the DIA-based PDB reader implementation. Differential Revision: http://reviews.llvm.org/D7457 Reviewed By: Chandler Carruth llvm-svn: 228669
* Handle LLVM_USE_SANITIZER=Address;Undefined (and the other way around)Filipe Cabecinhas2015-02-041-0/+5
| | | | | | | | | | | | | | | | Summary: Handle LLVM_USE_SANITIZER=Address;Undefined to enable ASan and UBSan If UBSan is compatible with more of the other sanitizers, maybe we should deal with this in a better way where we allow combining UBSan with any of the other sanitizers. Reviewers: samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7024 llvm-svn: 228219
* [CMake] add_llvm_library: don't use .imp suffix for import libraries on ↵Hans Wennborg2015-02-031-5/+0
| | | | | | | | | | | | | | | | | Windows (PR22334) This was added in r188351 to fix a naming conflict between the profile_rt-static and profile_rt-shared who both ended up in lib/profile_rt.lib. The change also affected other libraries (like libclang), and users are reporting that they find it surprising that there's no longer a libclang.lib. Since the profile_rt naming conflict doesn't seem to exist any more, I think we can remove this. Differential Revision: http://reviews.llvm.org/D7391 llvm-svn: 228049
OpenPOWER on IntegriCloud