Commit Graph

463 Commits

Author SHA1 Message Date
Rafael Espindola
04132a6c5c Reverts commit r190808 and r190556.
The use of these features in clang has been reverted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191785 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-01 17:40:47 +00:00
Jordan Rose
26a6348612 [CMake] Hack GetSVN.cmake to handle unusual terminals.
I got a report of a hang in git's helper functions trying to figure out
how to display results of "git svn info" when run inside ninja, even though
the result is immediately piped to grep. This seems to avoid that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190808 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-16 21:38:01 +00:00
Alexey Samsonov
112f7a637b Fixup for r190409: add dep on LZMA only if CMake is cross-compiling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190591 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-12 08:26:53 +00:00
Jordan Rose
6c32111544 [CMake] Update GetSVN.cmake to use LLVM version control helper scripts.
This allows the logic to work with Git, and also uses the variable names
to match what Clang is actually looking for.

This changes the interface of GetSVN.cmake. Clang change to follow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190556 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-11 22:46:41 +00:00
NAKAMURA Takumi
b77a9c1281 config-ix.cmake: Tweak stray endif(...) to suppress a warning in CMake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190502 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-11 09:42:03 +00:00
Hans Wennborg
4f5cfba4d5 cmake: Install llvm-tblgen again
It was removed in r189130, but it turns out this makes life hard for
folks packaging LLVM and Clang and building the latter based on the
LLVM package.

Note that this only adds back the LLVM tblgen, and it's obviously
not included when LLVM_INSTALL_TOOLCHAIN_ONLY is set.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190419 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-10 18:35:14 +00:00
Renato Golin
15bb8e39f6 Adding LZMA as dep for XML2 on 2.8.0 or higher
LibXML2 config doesn't specify lzma as a dependency, which breaks
cross-compilation builds using new linkers (ld 2.21 or higher).

There is a bug on libxml2 to fix that, but since it's going to take
a while for things to go round and back, so we should have a harmless
addition of the library until then.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190409 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-10 14:24:17 +00:00
Alexey Samsonov
b775f2f39c [CMake] Add -O1 in debug builds with LLVM_USE_SANITIZER
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189747 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-02 09:15:01 +00:00
Michael Gottesman
4cff093bd6 [doxygen] Use correct variable names for external variable configuration and make EXTRA_SEARCH_MAPPINGS a "dumb" variable.
I do not think the massaging that I was doing for EXTRA_SEARCH_MAPPINGS was
truly necessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189522 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-28 21:55:26 +00:00
Michael Gottesman
1800b662a0 [doxygen] Added support for doxygen external search.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189507 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-28 20:28:35 +00:00
Michael Gottesman
b7cb635907 [cmake] Created an aggregate doxygen target for generating doxygen documentation for llvm/all subprojects. Renamed llvm's doxygen generation command to doxygen-llvm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189506 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-28 20:28:32 +00:00
Roman Divacky
6d89ebaf6a Translate ENABLE_CLANG_{ARCMT,REWRITER,STATIC_ANALYZER} when generating
lit.site.cfg.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189394 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-27 19:25:01 +00:00
Alexey Samsonov
19a5472504 [cmake] Check for realpath availability in CMake
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189249 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-26 18:11:25 +00:00
Douglas Gregor
b51439594a CMake Xcode builds: symlink tblgen targets out to bin/.
Xcode always puts executable targets in the directory
bin/<Config>. When building separate LLVM and Clang projects for
Xcode, this prevents the CMake-configured project for Clang from
finding llvm-tblgen. Add a symlink so that tblgen executables are
always available in bin/ (regardless of the configuration LLVM is
built with).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189220 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-26 14:43:19 +00:00
Michael Gottesman
5b83d0c092 [autotools->cmake] Enable generation of doxygen documentation via cmake.
I am going to add in a subsequent patch support for generating the llvm
manpage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189164 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-24 07:25:21 +00:00
Hans Wennborg
2982c08884 CMake: Add LLVM_INSTALL_TOOLCHAIN_ONLY option.
Differential Revision: http://llvm-reviews.chandlerc.com/D1428

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189155 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-24 00:20:36 +00:00
Hans Wennborg
b7f81d372a CMake: don't install tablegen
Since it's an llvm-internal tool, we shouldn't install it.

(This depends on Clang r189127 and lld r189128.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189130 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-23 18:28:10 +00:00
Argyrios Kyrtzidis
d6dbd6b883 [CMake] Automatically pick up subdirectories in llvm/tools as 'external projects' if they contain a 'CMakeLists.txt' file.
Allow CMake to pick up external projects in llvm/tools without the need to modify the "llvm/tools/CMakeLists.txt" file.
This makes it easier to work with projects that live in other repositories, without needing to specify each one in "llvm/tools/CMakeLists.txt".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188921 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-21 19:13:44 +00:00
Reid Kleckner
f1070a0b86 Suppress an annoying CMake warning in ChooseMSVCCRT.cmake
Warning was:
  Argument not separated from preceding token by whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188701 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-19 20:25:26 +00:00
Joerg Sonnenberger
a915b410df Recognize NetBSD's terminfo implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188606 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-17 11:06:00 +00:00
Aaron Ballman
7f92c7b52c Re-disabling C4291 warnings for MSVC because AttributeList.h requires it. This was accidentally removed in r187279.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188530 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-16 03:06:38 +00:00
Hans Wennborg
da44b4f68b CMake: polish the Windows packaging rules
This tweaks the CMake rules for building an installation package on Windows:
 - Sets license file (otherwise nsis shows an ugly default)
 - Adds LLVM logo
 - Shows "do you want to add this to the system path" dialog.

Differential Revision: http://llvm-reviews.chandlerc.com/D1414

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188509 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-15 23:44:31 +00:00
NAKAMURA Takumi
e1bae5fb81 [CMake] add_llvm_library: Specify explicit suffix .imp to import library to avoid a warning between profile_rt-static and profile_rt-shared with lib/profile_rt.lib.
FIXME: It seems MS version of profile_rt.dll doesn't contain any export symbols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188351 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-14 03:34:49 +00:00
Chandler Carruth
3729d7d62b Remove all checking for the various terminfo headers (term.h and
curses.h). Finding these headers is next to impossible. For example, on
Debian systems libtinfo-dev provides the terminfo reading library we
want, but *not* term.h. For the header, you have to use libncurses-dev.
And libncursesw-dev provides a *different* term.h in a different
location!

These headers aren't worth it. We want two functions the signatures of
which are clearly spec'ed in sys-v and other documentation. Just declare
them ourselves and call them. This should fix some debian builders and
provide better support for "minimal" debian systems that do want color
autodetection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188165 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-12 10:40:11 +00:00
Chandler Carruth
8d8bdff6d7 Target a minimal terminfo library rather than necessarily a full curses
library for color support detection. This still will use a curses
library if that is all we have available on the system. This change
tries to use a smaller subset of the curses library, specifically the
subset that is on some systems split off into a separate library. For
example, if you install ncurses configured --with-tinfo, a 'libtinfo' is
install that provides just the terminfo querying functionality. That
library is now used instead of curses when it is available.

This happens to fix a build error on systems with that library because
when we tried to link ncurses into the binary, we didn't pull tinfo in
as well. =]

It should also provide an easy path for supporting the NetBSD
libterminfo library, but as I don't have access to a NetBSD system I'm
leaving adding that support to those folks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188160 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-12 09:49:17 +00:00
Chandler Carruth
e32032d812 Add three missing CMake variables that need to make it to the
LLVMConfig.cmake file that is (I think) used in the stand-alone Clang
build, and causing link errors there w.r.t. curses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187950 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 01:15:37 +00:00
Chandler Carruth
f7364d5833 Add support for linking against a curses library when available and
using it to detect whether or not a terminal supports colors. This
replaces a particularly egregious hack that merely compared the TERM
environment variable to "dumb". That doesn't really translate to
a reasonable experience for users that have actually ensured their
terminal's capabilities are accurately reflected.

This makes testing a terminal for color support somewhat more expensive,
but it is called very rarely anyways. The important fast path when the
output is being piped somewhere is already in place.

The global lock may seem excessive, but the spec for calling into curses
is *terrible*. The whole library is terrible, and I spent quite a bit of
time looking for a better way of doing this before convincing myself
that this was the fundamentally correct way to behave. The damage of the
curses library is very narrowly confined, and we continue to use raw
escape codes for actually manipulating the colors which is a much sane
system than directly using curses here (IMO).

If this causes trouble for folks, please let me know. I've tested it on
Linux and will watch the bots carefully. I've also worked to account for
the variances of curses interfaces that I could finde documentation for,
but that may not have been sufficient.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187874 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 08:47:36 +00:00
Reid Kleckner
3e53241fea Check for _strtoi64 in the cmake build if strtoll is missing
Previously this check was guarded by MSVC, which doesn't distinguish
between the compiler and the headers/library.  This enables clang to
compile more of LLVM on Windows with Microsoft headers.

Remove some unused macros while I'm here: error_t and LTDL stuff.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187839 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 00:29:15 +00:00
Aaron Ballman
f659939990 Replacing /GR with /GR- instead of applying both options to the project. This should reduce some build bot warnings (D9025: "overriding '/GR' with '/GR-'").
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187836 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 23:34:04 +00:00
Simon Atanasyan
df263de386 Pass -G argument to cmake with the same generator's name as used for the
initial cmake invocation.

Patch reviewed by Reid Kleckner.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187591 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-01 18:04:07 +00:00
Eric Christopher
b9db9cd6a9 Make sure that -gsplit-dwarf isn't passed to the linker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187456 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-30 22:34:30 +00:00
Eric Christopher
6aebd5facb Add capability for building with -gsplit-dwarf to the cmake build.
In limited testing this seems to work. Caveat emptor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187452 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-30 21:44:10 +00:00
Aaron Ballman
cc6933bd31 Re-application of 187310. Re-enabling warning C4275 for MSVC 11 and up, but not MSVC 10 since it is still required there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187354 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-29 13:02:08 +00:00
Aaron Ballman
7f817029d5 Partial revert of 187310; it seems MSVC 10 still spits out this warning, but MSVC 11 does not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187331 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-28 18:04:26 +00:00
Aaron Ballman
9df33cbbab Re-enabling some more MSVC warnings; all of these compile cleanly with no further changes required.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187310 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-27 20:20:28 +00:00
Aaron Ballman
fb49c513ac Re-enabling a warning in MSVC mode now that r187292 fixed the only instance of the warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187293 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-27 03:35:44 +00:00
Aaron Ballman
332af10901 Re-enabling some more MSVC warnings; all of these compile cleanly with no further changes required.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187279 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-27 00:13:11 +00:00
Aaron Ballman
252d41691a Re-enabling the C4065 warning for MSVC builds as it no longer fires due to tablegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187252 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-26 22:03:03 +00:00
Reid Kleckner
65985348c5 Remove dead or useless header checks from cmake and autoconf
On Windows, this improves clean cmake configuration time on my
workstation from 1m58s to 1m32s, which is pretty significant.  There's
probably more that can be done here, but this is the low hanging fruit.

Eric volunteered to regenerate ./configure for me.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187209 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-26 16:54:23 +00:00
Duncan Sands
a009d53c4d Tweak the cmake interaction between CMAKE_BUILD_TYPE and LLVM_ENABLE_ASSERTIONS.
The issue is that CMAKE_BUILD_TYPE=RelWithDebInfo LLVM_ENABLE_ASSERTIONS=ON was
not building with assertions enabled.  (I was unable to find what in the LLVM
source tree was adding -DNDEBUG to the build line in this case, so decided that
it must be cmake itself that was adding it - this may depend on the cmake
version).  The fix treats any mode that is not Debug as being the same as
Release for this purpose (previously it was being assumed that cmake would only
add -DNDEBUG for Release and not for RelWithDebInfo or MinSizeRel).  If other
versions of cmake don't add -DNDEBUG for RelWithDebInfo then that's OK: with
this change you just get a useless but harmless -UNDEBUG or -DNDEBUG.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186499 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-17 09:34:51 +00:00
Matt Arsenault
e1e7310749 Find xdot or xdot.py.
Ubuntu installs this as xdot, so finding xdot.py would fail.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185860 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-08 20:24:54 +00:00
Matt Arsenault
cffecb4f2b Allow llvm_find_program to find alternate names
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185859 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-08 20:24:49 +00:00
Eric Christopher
c589a5f284 Reapply r185601 with a fix for the cmake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185605 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-04 01:10:38 +00:00
Eric Christopher
2333a31df5 Temporarily revert 185601 as it caused cmake build regressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185603 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-04 00:51:26 +00:00
Eric Christopher
d1280c194b Add support for futimens for platforms that don't support futimes.
Patch by pashev.igor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185601 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-04 00:47:09 +00:00
Andy Gibbs
84bb3a2af2 Support using "host" as a target in LLVM_TARGETS_TO_BUILD when using cmake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184923 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-26 07:57:53 +00:00
Rafael Espindola
d132ce7a75 Revert "Cmake: add compiler option in a more idiomatic way"
This reverts commit 183995.

It broke the bots:
http://bb.pgr.jp/builders/cmake-clang-x86_64-linux/builds/9730/steps/build_clang/logs/stdio

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183997 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 19:41:05 +00:00
Arnaud A. de Grandmaison
4ebf543b93 Cmake: add compiler option in a more idiomatic way
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183995 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 19:26:57 +00:00
Rafael Espindola
ba30d60ebb Don't define LTDL_SHLIBPATH_VAR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183771 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-11 19:04:13 +00:00
Arnaud A. de Grandmaison
745825f582 Add colored diagnostics when building LLVM with cmake + ninja + clang
When invoked from Ninja, clang does not detect that it can use colors : see https://github.com/martine/ninja/issues/174

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182878 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-29 20:41:35 +00:00