summaryrefslogtreecommitdiffstats
path: root/llvm/cmake
Commit message (Collapse)AuthorAgeFilesLines
...
* Allow the CMake option 'LLVM_ABI_BREAKING_CHECKS' to be undefined.Eric Fiselier2015-05-121-0/+3
| | | | | | | When building libc++abi in a standalone configuration the CMake option 'LLVM_ABI_BREAKING_CHECKS` will not be defined. llvm-svn: 237204
* [lib/Fuzzer] use -fsanitize-coverage=trace-cmp when building LLVM with ↵Kostya Serebryany2015-05-081-1/+1
| | | | | | LLVM_USE_SANITIZE_COVERAGE; in lib/Fuzzer try to reload the corpus to pick up new units from other processes llvm-svn: 236906
* Update CMake flags, LibFuzzer comments and docs for new -fsanitize-coverage= ↵Alexey Samsonov2015-05-071-1/+1
| | | | | | flags. llvm-svn: 236797
* [CMake] Also search for prefixed versions of ld.goldNiels Ole Salscheider2015-05-011-1/+1
| | | | llvm-svn: 236312
* Allow building the gold plugin even if the gold binary is not found.Rafael Espindola2015-04-271-4/+2
| | | | | | | | The gold binary is not required to build the plugin. All that is needed is for LLVM_BINUTILS_INCDIR to point to the directory containing plugin-api.h. llvm-svn: 235918
* [CMake] Fix for PR 23328: LLVM_OPTIMIZED_TABLEGEN brokenChris Bieneman2015-04-241-3/+4
| | | | | | | | | | | | In CMake dependencies can be filenames or targets, and targets can't be filenames. The Ninja generator handles filename dependencies because it generates targets for every output file from a command. For example: add_custom_command(OUTPUT foo.txt COMMAND touch foo.txt) With the Ninja generator this generates a target foo.txt, but with the Makefile generator it doesn't. This is probably because Ninja explicitly requires these hard dependency ties, and Make just behaves oddly in general. To fix this we need to make the tablegen actions depend on a target rather than a filename. llvm-svn: 235732
* [cmake] Quote the path to the target exports file, fixes PR23313Reid Kleckner2015-04-221-1/+1
| | | | llvm-svn: 235519
* Silence MSVC build alignment warningsAndrew Kaylor2015-04-211-1/+9
| | | | llvm-svn: 235450
* 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
OpenPOWER on IntegriCloud