summaryrefslogtreecommitdiffstats
path: root/llvm/cmake
Commit message (Collapse)AuthorAgeFilesLines
...
* [cmake] Allow EH usage with clang-clReid Kleckner2016-03-301-3/+3
| | | | llvm-svn: 264880
* cmake: include what you useSaleem Abdulrasool2016-03-081-0/+2
| | | | | | | | Add a missing include. This is important in the case HandleLLVMOptions is included prior to the missing CheckCXXSourceCompiles or CheckCXXCompilerFlag which includes CheckCXXSourceCompiles. llvm-svn: 262949
* [CMake] Refactor add_llvm_implicit_projects to be reusableChris Bieneman2016-03-081-3/+7
| | | | | | This adds llvm_add_implicit_projects which takes a project name and is wrapped by add_llvm_implicit_projects. llvm-svn: 262948
* Revert r130657, "Windows/DynamicLibrary.inc: Clean up ELM_Callback. We may ↵NAKAMURA Takumi2016-03-071-15/+0
| | | | | | | | check the decl instead of the versions of individual libraries." We may assume the type of 1st argument as PCSTR in PENUMLOADED_MODULES_CALLBACK. PSTR was in the ancient mingw32. llvm-svn: 262810
* [cmake] Check the compiler version firstReid Kleckner2016-03-023-43/+52
| | | | | | | | | | | | | | | Otherwise users get messages from CheckAtomic about missing libatomic instead of a sensible message that says "use GCC 4.7 or newer". I structured the change along the lines of HandleLLVMStdlib.cmake, so that the standalone build of Clang still gets the compiler version check. Reviewers: beanz Differential Revision: http://reviews.llvm.org/D17789 llvm-svn: 262491
* Refactor duplicated code for linking with pthread.Rafael Espindola2016-03-011-0/+4
| | | | llvm-svn: 262344
* [CMAKE] Update build on recent HaikuRenato Golin2016-02-262-1/+4
| | | | | | | | | This patch updates cmake build scripts to build on Haiku. It adds Haiku x86_64 to config.guess. Please consider reviewing. Pathc by Jérôme Duval. llvm-svn: 262038
* cmake: Simplify the iOS.cmake toolchainJustin Bogner2016-02-121-40/+15
| | | | | | | | | | | | | | | - Remove a comment that was clearly copy pasted from Android.cmake and isn't relevant. - Remove the toolchain's sensitivity to the environment. It's less error prone to just allow users to set CMAKE_OSX_SYSROOT if they want to use a custom SDK. - Stop explicitly setting -mios-version-min to the default value. It just adds needless complexity. This makes building the native tablegen work for me even when SDKROOT is set in the environment (or passed in as -DCMAKE_OSX_SYSROOT). llvm-svn: 260763
* Avoid linking LLVM component libraries with libLLVMAndrew Wilkins2016-02-122-19/+28
| | | | | | | | | | | Patch by Jack Howarth. When linking to libLLVM, don't also link to the component libraries that constitute libLLVM. Differential Revision: http://reviews.llvm.org/D16945 llvm-svn: 260641
* Disable MSVC 2015's warning about zero extending after ~ and othersReid Kleckner2016-02-101-1/+2
| | | | | | | | | Very often in LLVM we have APIs that take a bitwidth and a uint64_t that we pass immediates such as ~0U to. Consider APInt, Constant, and MachineInstrBuilder::addImm. Fixing all uses of these APIs to manually extend their arguments to uint64_t doesn't seem worth it. llvm-svn: 260416
* Revert "Turn on LLVM_ENABLE_PLUGINS by default on Windows"Reid Kleckner2016-02-101-1/+1
| | | | | | This reverts r260262, it broke some LLVM tests (bugpoint). llvm-svn: 260339
* Turn on LLVM_ENABLE_PLUGINS by default on WindowsEhsan Akhgari2016-02-091-1/+1
| | | | | | | | | | Reviewers: rnk Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16760 llvm-svn: 260262
* cmake: Use "set" instead of "option" for LLVM_ENABLE_LTOJustin Bogner2016-02-081-1/+1
| | | | | | | | | Apparently option is for bools and cmake-gui will display this strangely with option. Pointed out by edward-san - thanks! llvm-svn: 260154
* cmake: Accept "thin" or "full" as arguments to -DLLVM_ENABLE_LTOJustin Bogner2016-02-081-6/+12
| | | | | | | Mehdi suggested in a review of r259766 that it's also useful to easily set the type of LTO. Augment the cmake variable to support that. llvm-svn: 260143
* Install cmake files to lib/cmake/llvmNiels Ole Salscheider2016-02-041-1/+1
| | | | | | | | | | | This is the right location for platform-specific files. On some distributions (e. g. Exherbo), a package can be installed for several architectures in parallel, but the architecture-independent files are shared. Therefore, we must not install architecture-dependent files (like the CMake config and export files) to share/. llvm-svn: 259821
* cmake: Add a flag to enable LTOJustin Bogner2016-02-041-0/+7
| | | | | | | This adds -DLLVM_ENABLE_LTO, rather than forcing people to manually add -flto to the various _FLAGS variables. llvm-svn: 259766
* Remove autoconf supportChris Bieneman2016-01-264-163/+1530
| | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "I felt a great disturbance in the [build system], as if millions of [makefiles] suddenly cried out in terror and were suddenly silenced. I fear something [amazing] has happened." - Obi Wan Kenobi Reviewers: chandlerc, grosbach, bob.wilson, tstellarAMD, echristo, whitequark Subscribers: chfast, simoncook, emaste, jholewinski, tberghammer, jfb, danalbert, srhines, arsenm, dschuff, jyknight, dsanders, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D16471 llvm-svn: 258861
* Reapplying r256836 with a fix for MSVC 14 support.Aaron Ballman2016-01-251-0/+17
| | | | | | | | Enable more strict standards conformance in MSVC for rvalue casting and string literal type conversion to non-const types. Also enables generation of intrinsics for more functions. Patch by Alexander Riccio llvm-svn: 258687
* [cmake] Disable manifest generation when LLD is the linkerReid Kleckner2016-01-221-4/+8
| | | | | | | Running mt.exe to make the manifest is really slow. Disabling manifest generation doesn't seem to break anything. llvm-svn: 258581
* Strip local symbols when using externalized debug info.Owen Anderson2016-01-221-1/+1
| | | | | | | | | | | When we build LLVM with externalized debug info, all debugging and symbolication related data is extracted into dSYM files prior to stripping. As such, there is no need to preserve local symbols in LLVM binaries after dSYM creation. This shrinks libLLVM.dylib from 58MB to 55MB on my system. llvm-svn: 258566
* tools/llvm-config: improve shared library supportAndrew Wilkins2016-01-201-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is a re-commit of r257003, which was reverted, along with the fixes from http://reviews.llvm.org/D15986. r252532 added support for reporting the monolithic library when LLVM_BUILD_LLVM_DYLIB is used. This would only be done if the individual components were not found, and the dynamic library is found. This diff extends this as follows: - If LLVM_LINK_LLVM_DYLIB is set, then prefer the shared library, even if all component libraries exist. - Two flags, --link-shared and --link-static are introduced to provide explicit guidance. If --link-shared is passed and the shared library does not exist, an error results. Additionally, changed the expected shared library names from (e.g.) LLVM-3.8.0 to LLVM-3.8. The former exists only in an installation (and then only in CMake builds I think?), and not in the build tree; this breaks usage of llvm-config during builds, e.g. by llvm-go. Reviewers: DiamondLovesYou, beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15986 llvm-svn: 258283
* Reenable -Wexpansion-to-defined.Nico Weber2016-01-191-3/+0
| | | | | | | | | I think I fixed all instances of this in the codebase (r258202, 258200, 258190). Also, the suppression didn't have an effect on bots using make anyways, and it looks like many bots still use configure/make bots. llvm-svn: 258210
* Fix bootstrap -Werror builds after clang r258128Nico Weber2016-01-191-0/+3
| | | | llvm-svn: 258181
* [cmake] Fix add_version_info_from_vcs git svn version bug.Geoff Berry2016-01-191-17/+9
| | | | | | | | | | | | | | | | | | | | Summary: add_version_info_from_vcs was setting SVN_REVISION to the last fetched svn revision when using git svn instead of the svn revision corresponding to HEAD. This leads to conflicts with the definition of SVN_REVISION in SVNVersion.inc generated by GetSVN.cmake when HEAD is not the most recently fetched svn revision. Use 'git svn info' to determine SVN_REVISION when git svn is being used instead (as is done in GetSVN.cmake). Reviewers: beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16299 llvm-svn: 258148
* [CMake] Need to install VersionFromVCS.cmake as part of LLVM's CMake modulesChris Bieneman2016-01-151-1/+0
| | | | | | This is required to support clang --version detecting the clang repository information. llvm-svn: 257909
* [autoconf] Install VersionFromVCS.cmake, too. clang/CMakeLists.txt requires it.NAKAMURA Takumi2016-01-151-2/+1
| | | | llvm-svn: 257856
* [CMake] Add support for populating LLVM_REPOSITORY from CMake.Chris Bieneman2016-01-141-0/+16
| | | | | | Autoconf does this in the GetRepositoryPath script, CMake's VersionFromVCS does grab the SVN_REVISION, but doesn't populate the repository URL. llvm-svn: 257826
* Explicitly enable OBJECT library "target".Axel Naumann2016-01-121-2/+4
| | | | | | | | | | | | | With this, one can build a lib from the objects of other libs: set(SOURCES $<TARGET_OBJECTS:obj.clingInterpreter> $<TARGET_OBJECTS:obj.clingMetaProcessor> $<TARGET_OBJECTS:obj.clingUtils> ) Reviewed by Chris Bieneman - thanks! llvm-svn: 257459
* Revert r257003Andrew Wilkins2016-01-121-1/+6
| | | | | | | | This revision breaks llvm-config if you set BUILD_SHARED_LIBS=on in a CMake build. Backing out until the fix is ready to land. llvm-svn: 257457
* tools/llvm-config: improve shared library supportAndrew Wilkins2016-01-071-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: r252532 added support for reporting the monolithic library when LLVM_BUILD_LLVM_DYLIB is used. This would only be done if the individual components were not found, and the dynamic library is found. This diff extends this as follows: - If LLVM_LINK_LLVM_DYLIB is set, then prefer the shared library, even if all component libraries exist. - Two flags, --link-shared and --link-static are introduced to provide explicit guidance. If --link-shared is passed and the shared library does not exist, an error results. Additionally, changed the expected shared library names from (e.g.) LLVM-3.8.0 to LLVM-3.8. The former exists only in an installation (and then only in CMake builds I think?), and not in the build tree; this breaks usage of llvm-config during builds, e.g. by llvm-go. Reviewers: DiamondLovesYou, beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15033 llvm-svn: 257003
* Make WinCOFFObjectWriter.cpp's timestamp writing not use ENABLE_TIMESTAMPSNico Weber2016-01-061-0/+30
| | | | | | | | | | | | | | | | | | | | | LLVM_ENABLE_TIMESTAMPS controls if timestamps are embedded into llvm's binaries. Turning it off is useful for deterministic builds. r246905 made it so that the define suddenly also controls if the binaries that the llvm binaries _create_ embed timestamps or not – but this shouldn't be a configure-time option. r256203/r256204 added a driver option to toggle this on and off, so this patch now passes this driver option in LLVM_ENABLE_TIMESTAMPS builds so that if LLVM_ENABLE_TIMESTAMPS is set, the build of LLVM is deterministic – but the built clang can still write timestamps into other executables when requested. This also allows removing some of the test machinery added in r292012 to work around this problem. See PR24740 for background. http://reviews.llvm.org/D15783 llvm-svn: 256958
* Reverting r256836; it causes a build bot failure: ↵Aaron Ballman2016-01-051-11/+0
| | | | | | http://lab.llvm.org:8011/builders/lldb-x86-win7-msvc/builds/14050/steps/build/logs/stdio llvm-svn: 256837
* Enable more strict standards conformance in MSVC for rvalue casting and ↵Aaron Ballman2016-01-051-0/+11
| | | | | | | | string literal type conversion to non-const types. Also enables generation of intrinsics for more functions. Patch by Alexander Riccio llvm-svn: 256836
* win: Pass /W4 in front of all the -wd flags.Nico Weber2015-12-231-1/+4
| | | | | | | | | | | This should fix many many -Wunused-parameter warnings in self-host builds on Windows after r255382. cl.exe doesn't care about the order of /W4 and /wd flags, but clang-cl currently does (just like -Wno-foo -Wall order matters for clang). We might want to change how clang-cl behaves in the future, but until then this change makes self-host builds much more silent. llvm-svn: 256315
* Revert r254592 (virtual dtor in SCEVPredicate).Andy Gibbs2015-12-171-10/+17
| | | | | | | | Clang has better diagnostics in this case. It is not necessary therefore to change the destructor to avoid what is effectively an invalid warning in gcc. Instead, better handle the warning flags given to the compiler. llvm-svn: 255905
* Install runtime dlls in the INSTALL_DIR/bin directory. NFCSumanth Gundapaneni2015-12-161-2/+4
| | | | | | | | | One of the earlier patches updated the cmake rule to install the runtime dlls in INSTALL_DIR/lib which is not correct. This patch updates the rule to install CMake's RUNTIME in bin directory Differential Revision: http://reviews.llvm.org/D15505 llvm-svn: 255781
* [CMake] Add LLVM_BUILD_INSTRUMENTED option to enable building with ↵Chris Bieneman2015-12-101-0/+8
| | | | | | | | -fprofile-instr-generate This is the first step in supporting PGO data generation via CMake. I've marked the option as advanced and experimental until it is fleshed out further. llvm-svn: 255298
* [CMake] Ignore externalizing debuginfo for unit testsChris Bieneman2015-12-081-3/+5
| | | | | | If you externalize debug info for unit tests the test runner finds the mach-o inside the dsym bundle and tries to execute it as a test. llvm-svn: 255056
* Silence all C4592 warnings with MSVC 2015 Update 1. This warning produces ↵Aaron Ballman2015-12-071-0/+3
| | | | | | | | false positives that Microsoft says will be fixed in Update 2. Until this produces reliable diagnostics, it is safe to disable the diagnostic -- the compiler is not doing anything different than it previously did aside from issuing the diagnostic. (Note, this silences at least one false positive in LLVM with FeatureBitset uses.) llvm-svn: 254915
* [CMake] Fixing botsChris Bieneman2015-12-031-1/+1
| | | | | | CMake calls to set_property with APPEND string need to have a leading space. llvm-svn: 254659
* [CMake] set_target_properties doesn't append link flagsChris Bieneman2015-12-031-3/+3
| | | | | | This fixes a bug introduced in r254627, and another occurance of the same bug in this file. llvm-svn: 254657
* [CMake] Removing an unnecessary layer of variable indirectionChris Bieneman2015-12-031-1/+1
| | | | | | This prevents passthrough variables from having values. llvm-svn: 254641
* [CMake] Add option LLVM_EXTERNALIZE_DEBUGINFOChris Bieneman2015-12-031-0/+27
| | | | | | | | | | | | Summary: This adds support for generating dSYM files and stripping debug info from executables and dylibs. It also supports passing -object_path_lto to the linker to generate dSYMs for LTO builds. Reviewers: bogner, friss Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15133 llvm-svn: 254627
* Fix non-PIC build after 253959Pavel Labath2015-11-241-1/+1
| | | | | | | | CMAKE_EXE_LINKER_FLAGS is a string. Appending a flag using list(APPEND) introduces an extra semicolon which breaks stuff. Change this to append the value in the same way that everyone else seems to be doing. llvm-svn: 253968
* [CMake] When disabling PIC, also pass -fno-pie when linking if it is supported.Chris Bieneman2015-11-241-0/+4
| | | | | | Building clang with -fno-pie generates slightly faster code. In my not-very-rigorous testing I saw about a 4% speed up using the clang test-suite sources. llvm-svn: 253959
* [CMake] export_executable_symbols also needs to add -rdynamic to the linker ↵Chris Bieneman2015-11-241-0/+4
| | | | | | | | flags on Darwin Without -rdynamic LLVM built with LTO fails to pass "check" due to loadable modules failing. llvm-svn: 253944
* NFC. Fixing my consistently incorrect spelling.Chris Bieneman2015-11-231-4/+4
| | | | llvm-svn: 253936
* Unbreak build on OpenBSD by not adding -Wl,-z,defs to linker flags.Yaron Keren2015-11-211-1/+2
| | | | | | | | | | | | This is similar to the fix for FreeBSD in r226862. Without this patch, the build aborts when linkling libLTO.so, complaining about undefined references to assert2, cxa_atexit, etc. Patch by Stefan Kempf! http://reviews.llvm.org/D14236 llvm-svn: 253769
* [CMake] Fix handling of passing through semi-colon separated lists.Chris Bieneman2015-11-201-1/+2
| | | | | | When passing around CMake arguments as lists of arguments any arguments containing lists need to have their semi-colons escaped otherwise CMake will split the arguments in the middle. llvm-svn: 253719
* Don't search for third party libraries while using MSanReid Kleckner2015-11-191-0/+6
| | | | | | | | | | | | On the average user's system, those libraries will not be compiled with MSan. Prior to this change, the LLVM test suite was full of false positives from calls from third party libraries to MSan interceptors like strlen. We can remove this check if MSan ever grows a suppression mechanism similar to TSan's. llvm-svn: 253526
OpenPOWER on IntegriCloud