summaryrefslogtreecommitdiffstats
path: root/llvm/cmake
Commit message (Collapse)AuthorAgeFilesLines
...
* Add targets to cmake for specific target components.Pete Cooper2015-04-201-0/+35
| | | | | | | | | | | | This adds the following targets to cmake. These can be used to build and link only specific parts of a backend, instead of having to link the whole backend. - AllTargetsAsmPrinters, AllTargetsAsmParsers, AllTargetsDescs, AllTargetsDisassemblers, AllTargetsInfos A typical use for these is instead of linking ${LLVM_TARGETS_TO_BUILD}. This commit changes llvm-mc to show how to use the new targets. Reviewed by Chris Bieneman. llvm-svn: 235324
* Cleanup based on rnk's feedback.Chris Bieneman2015-04-161-12/+8
| | | | llvm-svn: 235125
* Fixing windows bots.Chris Bieneman2015-04-161-10/+12
| | | | | | Third time's the try. llvm-svn: 235123
* Better fix to the windows conditional.Chris Bieneman2015-04-161-1/+1
| | | | llvm-svn: 235121
* Fix Windows bots.Chris Bieneman2015-04-161-1/+6
| | | | | | Turns out Windows is special. All library installs are RUNTIME. llvm-svn: 235120
* Fixing a mis-use of the CMake install command.Chris Bieneman2015-04-161-6/+16
| | | | | | | | | | | | | | | | | | | | | The CMake install command is defined as: install(TARGETS targets... [EXPORT <export-name>] [[ARCHIVE|LIBRARY|RUNTIME|FRAMEWORK|BUNDLE| PRIVATE_HEADER|PUBLIC_HEADER|RESOURCE] [DESTINATION <dir>] [INCLUDES DESTINATION [<dir> ...]] [PERMISSIONS permissions...] [CONFIGURATIONS [Debug|Release|...]] [COMPONENT <component>] [OPTIONAL] [NAMELINK_ONLY|NAMELINK_SKIP] ] [...]) This means it can only take one parameter from the set of RUNTIME, LIBRARY, or ARCHIVE. If you set more than one of these it seems to gobble up the extra arguments and ignore the COMPONENT argument. This adds a check to only set LIBRARY or ARCHIVE based on whether or not the library being built is shared. llvm-svn: 235113
* [msvc] Strip /W[0-4] before appending /W4Zachary Turner2015-04-141-0/+7
| | | | | | | | | | | | | | Certain versions of CMake specify /W3 as part of CMAKE_CXX_FLAGS by default, before you do anything. Appending /W4 to the end of this and using the Ninja generator results in cl : Command line warning D9025 : overriding '/W3' with '/W4'. It is not possible to suppress this since it is a command line warning and not a compiler warning, so we must fix the command line to contain only one value for /Wn. llvm-svn: 234907
* [CMake] Uniquify LLVM_ABI_BREAKING_CHECKS. It reverts r233784, "[CMake] ↵NAKAMURA Takumi2015-04-131-2/+0
| | | | | | Cache in LLVMConfig.cmake." llvm-svn: 234720
* Disable all link optimizations in a debug build.Rafael Espindola2015-04-061-25/+28
| | | | | | | This taking linking clang on my machine with gold from 16.980257914 to 15.933037649 seconds. llvm-svn: 234161
* Don't pass -O3 to the linker in debug builds.Rafael Espindola2015-04-061-2/+4
| | | | | | | This takes linking clang in a debug build with gold form 19.518925697 to 16.406388685 seconds. llvm-svn: 234160
* Don't use -ffunction-sections -fdata-sections on debug builds.Rafael Espindola2015-04-061-1/+2
| | | | | | | | | | | | | | | Unfortunately, on ELF there is not used attribute on the .o files, so there is no easy way to keep the dump function alive. If we are not gcing, we may as well produce non gcable files and avoid the cost. Linking a debug clang now takes 18.856225992 seconds, before it took 21.206897447. I will try avoiding --gc-sections -O3 on a followup patch. llvm-svn: 234159
* 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
OpenPOWER on IntegriCloud