summaryrefslogtreecommitdiffstats
path: root/llvm/cmake/modules
Commit message (Collapse)AuthorAgeFilesLines
...
* Support Solaris unused sections' gc link syntax.Rafael Espindola2015-06-221-0/+3
| | | | | | | | | It is not clear if this would work or not with LLVM_NO_DEAD_STRIP binaries, so be conservative for now. Patch by Xan López. llvm-svn: 240287
* Do not pass optimization flags to Solaris' linker.Rafael Espindola2015-06-221-1/+1
| | | | | | | | It is not supported. Patch by Xan López. llvm-svn: 240276
* Use right syntax to pass version script to Solaris' ld.Rafael Espindola2015-06-221-2/+7
| | | | | | Patch by Xan Lopez! llvm-svn: 240275
* CMake: Stop using LLVM's custom parse_arguments (delete implementation). NFCFilipe Cabecinhas2015-06-191-80/+0
| | | | | | | | | | | | | | | | Summary: Finally, delete LLVM's parse_arguments() definition. Second part of D10531. This is dependent on http://reviews.llvm.org/D10529 Reviewers: pcc, beanz, chapuni Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10531 llvm-svn: 240122
* CMake: Stop using LLVM's custom parse_arguments. NFCFilipe Cabecinhas2015-06-191-8/+7
| | | | | | | | | | | | | | | | | | Summary: Use CMake's cmake_parse_arguments() instead. It's called in a slightly different way, but supports all our use cases. It's in CMake 2.8.8, which is our minimum supported version. CMake 3.0 doc (roughly the same. No direct link to 2.8.8 doc): http://www.cmake.org/cmake/help/v3.0/module/CMakeParseArguments.html?highlight=cmake_parse_arguments Reviewers: pcc, beanz, chapuni Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10531 llvm-svn: 240121
* Silence resource compiler using /nologo flag.Peter Collingbourne2015-06-181-0/+2
| | | | llvm-svn: 239983
* Repair cmake libatomic check.James Y Knight2015-06-161-6/+36
| | | | | | | | | | | | | | The cmake check for whether libatomic could be used had been unconditionally setting the result to false. Which was somewhat fortunate, because the prerequisite check for whether it was *needed* was always claiming it was, even if it was not. However, this made platforms where libatomic is actually necessary fail to link. Differential Revision: http://reviews.llvm.org/D10453 llvm-svn: 239819
* [CMake] Try to fix r239612, not to miss ↵NAKAMURA Takumi2015-06-141-3/+5
| | | | | | | | | | resources/windows_version_resource.rc in clang build. - Who defines ${LLVM_SOURCE_DIR} ? - Would windows_version_resource.rc be available in an *installed* llvm tree? I suggest it may be installed in ${PREFIX}/share. llvm-svn: 239703
* In MSVC builds embed a VERSIONINFO resource in our exe and DLL files.Greg Bedwell2015-06-121-0/+82
| | | | | | | | This reinstates my commits r238740/r238741 which I reverted due to a failure in the clang-cl selfhost tests on Windows. I've now fixed the issue in clang-cl that caused the failure so hopefully all should be well now. llvm-svn: 239612
* [cmake] [OCaml] Make ocamldoc targets depend on output filesPeter Zotov2015-06-071-1/+1
| | | | | | | | | | | | OCaml doc builds fail without .cmi files, and .cmi files are collected in ocaml_outputs. Therefore, make doc targets depend on ocaml_outputs as well. Fixes: https://llvm.org/bugs/show_bug.cgi?id=23777 Patch by Michał Górny <mgorny@gentoo.org> llvm-svn: 239259
* [CMake] Revert commits r238740/r238741 for embedding Windows version info.Greg Bedwell2015-06-011-82/+0
| | | | | | | The clang Windows bots are showing mysterious failures. Reverting until I can figure out what's going on. llvm-svn: 238744
* remove the use of the LOCATION CMake variable from r238740.Greg Bedwell2015-06-011-4/+0
| | | | | | | It caused the following failure: "Policy CMP0026 is not set: Disallow use of the LOCATION target property." llvm-svn: 238741
* In MSVC builds embed a VERSIONINFO resource in our exe and DLL files.Greg Bedwell2015-06-011-0/+86
| | | | | | | | | | This embeds Windows version information into our executables and DLLs. The most visible place to view this data is in the details tab of the file properties window in Windows explorer. Differential Revision: http://reviews.llvm.org/D7828 llvm-svn: 238740
* [CMake] Bug 23468 - LLVM_OPTIMIZED_TABLEGEN does not work with Visual StudioChris Bieneman2015-05-291-1/+5
| | | | | | | | | | | | | | Summary: Multi-configuration builds put their binaries into ${CMAKE_BINARY_DIR}/Release/bin/. The table-gen cross-compilation support needs to take that into account. Reviewers: yaron.keren Reviewed By: yaron.keren Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10102 llvm-svn: 238592
* Try to fix the build with MSVC 2015 by disabling sized deallocationReid Kleckner2015-05-191-0/+5
| | | | | | | | | | | I can't actually test this properly because uninstalling MSVC 2015 CTP 6 and reinstalling the 2015 RC takes hours. I can only verify that this doesn't mess up MSVC 2013 and 2015 CTP 6 builds, which is what I've done. Should fix PR23513. llvm-svn: 237743
* Use cat and not type Under MSYS, same as Cygwin.Yaron Keren2015-05-191-1/+1
| | | | | | | | type means something else under the MSYS shell. Patch by Tzafrir Poupko! llvm-svn: 237692
* cmake: Use -fno-sanitize-recover=all - the old spelling is deprecatedJustin Bogner2015-05-141-2/+2
| | | | llvm-svn: 237334
* 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] 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
* 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
* 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
OpenPOWER on IntegriCloud