Commit Graph

434 Commits

Author SHA1 Message Date
Simon Atanasyan cc53ec4c84 Pass -G argument to cmake with the same generator's name as used for the
initial cmake invocation.

Patch reviewed by Reid Kleckner.

llvm-svn: 187591
2013-08-01 18:04:07 +00:00
Eric Christopher 83afc1e43b Make sure that -gsplit-dwarf isn't passed to the linker.
llvm-svn: 187456
2013-07-30 22:34:30 +00:00
Eric Christopher 3987806087 Add capability for building with -gsplit-dwarf to the cmake build.
In limited testing this seems to work. Caveat emptor.

llvm-svn: 187452
2013-07-30 21:44:10 +00:00
Aaron Ballman f5aacd34e4 Re-application of 187310. Re-enabling warning C4275 for MSVC 11 and up, but not MSVC 10 since it is still required there.
llvm-svn: 187354
2013-07-29 13:02:08 +00:00
Aaron Ballman d1594bdaa9 Partial revert of 187310; it seems MSVC 10 still spits out this warning, but MSVC 11 does not.
llvm-svn: 187331
2013-07-28 18:04:26 +00:00
Aaron Ballman 437c9f92bc Re-enabling some more MSVC warnings; all of these compile cleanly with no further changes required.
llvm-svn: 187310
2013-07-27 20:20:28 +00:00
Aaron Ballman 6436940e38 Re-enabling a warning in MSVC mode now that r187292 fixed the only instance of the warning.
llvm-svn: 187293
2013-07-27 03:35:44 +00:00
Aaron Ballman 568cb27833 Re-enabling some more MSVC warnings; all of these compile cleanly with no further changes required.
llvm-svn: 187279
2013-07-27 00:13:11 +00:00
Aaron Ballman dc424e9780 Re-enabling the C4065 warning for MSVC builds as it no longer fires due to tablegen.
llvm-svn: 187252
2013-07-26 22:03:03 +00:00
Reid Kleckner 37f69de11b 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.

llvm-svn: 187209
2013-07-26 16:54:23 +00:00
Duncan Sands 80f122fefb 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.

llvm-svn: 186499
2013-07-17 09:34:51 +00:00
Matt Arsenault fe56cc67c5 Find xdot or xdot.py.
Ubuntu installs this as xdot, so finding xdot.py would fail.

llvm-svn: 185860
2013-07-08 20:24:54 +00:00
Matt Arsenault 9096217280 Allow llvm_find_program to find alternate names
llvm-svn: 185859
2013-07-08 20:24:49 +00:00
Eric Christopher a24dc7fa8c Reapply r185601 with a fix for the cmake build.
llvm-svn: 185605
2013-07-04 01:10:38 +00:00
Eric Christopher 3eb07a0963 Temporarily revert 185601 as it caused cmake build regressions.
llvm-svn: 185603
2013-07-04 00:51:26 +00:00
Eric Christopher aaf58cc3c4 Add support for futimens for platforms that don't support futimes.
Patch by pashev.igor.

llvm-svn: 185601
2013-07-04 00:47:09 +00:00
Andy Gibbs f5dede1beb Support using "host" as a target in LLVM_TARGETS_TO_BUILD when using cmake.
llvm-svn: 184923
2013-06-26 07:57:53 +00:00
Rafael Espindola 6f2564cb36 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

llvm-svn: 183997
2013-06-14 19:41:05 +00:00
Arnaud A. de Grandmaison ba0d5424e1 Cmake: add compiler option in a more idiomatic way
llvm-svn: 183995
2013-06-14 19:26:57 +00:00
Rafael Espindola d45b9f15f9 Don't define LTDL_SHLIBPATH_VAR.
llvm-svn: 183771
2013-06-11 19:04:13 +00:00
Arnaud A. de Grandmaison 916f3ccacf 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

llvm-svn: 182878
2013-05-29 20:41:35 +00:00
Evgeniy Stepanov 0209f29528 Allow overriding the location of C/C++ compilers in Android CMake build.
Patch by Greg Fitzgerald.

llvm-svn: 182831
2013-05-29 07:23:20 +00:00
Ulrich Weigand 1ceebf6ee0 [SystemZ] Add configure bits
This patch wires up the SystemZ target in configure, so that it can now be
built using --enable-targets=systemz.   It is not yet included in the default
build (--enable-targets=all); this will be done by a follow-up patch.

Patch by Richard Sandiford.

llvm-svn: 181208
2013-05-06 16:22:34 +00:00
Tim Northover a958a57081 Build system changes to enable MCJIT on AArch64
These changes just allow AArch64 to take part in the MCJIT world when
built correctly.

llvm-svn: 181130
2013-05-04 20:13:52 +00:00
Tim Northover fee13d1e11 Allow host triple to be correctly overridden in CMake builds
The intended semantics mirror autoconf, where the user is able to
specify a host triple, but if it's left to the build system then
"config.guess" is invoked for the default.

This also renames the LLVM_HOSTTRIPLE define to LLVM_HOST_TRIPLE to
fit in with the style of the surrounding defines.

llvm-svn: 181112
2013-05-04 07:36:23 +00:00
Benjamin Kramer ff2be22b91 CMake: cxxabi.h is only available to C++ compilers, use the right check macro.
llvm-svn: 181019
2013-05-03 14:48:29 +00:00
Joerg Sonnenberger 66241831dc Only use cxxabi.h's demangler, if it is actually available.
llvm-svn: 180684
2013-04-27 22:12:32 +00:00
Alexey Samsonov 068fc8ae6e Use zlib to uncompress debug sections in DWARF parser.
This makes llvm-dwarfdump and llvm-symbolizer understand
debug info sections compressed by ld.gold linker.

llvm-svn: 180088
2013-04-23 10:17:34 +00:00
Alexey Samsonov 2fb337e77a Add basic zlib support to LLVM. This would allow to use compression/uncompression in selected LLVM tools.
llvm-svn: 180083
2013-04-23 08:28:39 +00:00
Sylvestre Ledru cd4cd6ecc5 Remove the executable bit on cmake files
llvm-svn: 179976
2013-04-21 09:04:59 +00:00
Alexey Samsonov e10c151be5 Don't explicitly provide -pie in MSan bootstrap of LLVM, as it's now implied by the driver
llvm-svn: 179367
2013-04-12 07:18:55 +00:00
Reid Kleckner c1c01d5313 [cmake] Avoid rel+asserts warnings when passing -UNDEBUG
MSVC 2012 gives warning D9025, "overriding /D NDEBUG with -UNDEBUG".
Removing the original definition of NDEBUG silences this.

llvm-svn: 178967
2013-04-07 01:45:01 +00:00
Alexey Samsonov 75789a2133 Add CMake option LLVM_USE_SANITIZER={Address,Memory,MemoryWithOrigins} to simplify bootstrap of LLVM/Clang under ASan/MSan
llvm-svn: 177992
2013-03-26 07:49:46 +00:00
Douglas Gregor 96fa0fcff1 Introduce a tiny CMake project to gather Subversion revision information and place it into a header.
llvm-svn: 177938
2013-03-25 23:14:19 +00:00
Duncan Sands 71de6dcb38 Don't use add_llvm_definitions for adding warning flags. It makes it too hard
to have them appear in the right order.  Instead append all warnings explicitly
to the language flags.  This was already the case for many warnings.  Fixes the
issue of -Wno-maybe-uninitialized not being effective because -Wall was being
placed after it rather than before.

llvm-svn: 177866
2013-03-25 13:25:34 +00:00
Joerg Sonnenberger 8a1177f2aa Refine fenv.h handling: check if the desired macros exist, before using
it. NetBSD/ARM and TILE-Gx are examples for platforms that have an
unusable fenv.h and this avoids the need for a blacklist.

llvm-svn: 177865
2013-03-25 13:13:33 +00:00
Alexey Samsonov ffb4ca8bb4 Enable -Wnon-virtual-dtor build warning
llvm-svn: 177385
2013-03-19 10:10:03 +00:00
Eric Christopher 31f4354c75 Turn anonymous type in anonymous union warning back on after cleaning up
issues.

llvm-svn: 177136
2013-03-15 00:43:00 +00:00
Alexey Samsonov 6706578ff1 Simplify CMake rules in HandleLLVMOptions module.
Summary: No functionality change.

Reviewers: Bigcheese

Reviewed By: Bigcheese

CC: llvm-commits

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

llvm-svn: 176973
2013-03-13 20:50:23 +00:00
Jordan Rose 643aa0e0dc CMake: Always include the CheckCXXCompilerFlag in HandleLLVMOptions.cmake.
Previously we relied on it being included by config-ix.cmake.

llvm-svn: 176396
2013-03-02 01:00:40 +00:00
Tim Northover bfe8468502 Use correct host/target CMake variables to define lit variables.
CMake and autotools disagree on what "host" means in a cross-compilation
context. Autotools (and lit) take it to be the machine the binaries being
compiled now will run on. CMake takes it to be the machine actually compiling
the binaries now.

This change makes lit.site-cfg more consistent between autotools and CMake,
allowing lit tests (particularly in ExecutionEngine) to run correctly when
cross-compiled with CMake

llvm-svn: 175179
2013-02-14 16:49:32 +00:00
Jordan Rose cea01ee939 CMake: Use check_symbol_exists instead of check_cxx_symbol_exists.
check_cxx_symbol_exists requires CMake 2.8.6, so even though I
recommended it to Owen it's probably better to stay away for now.
This check is not technically correct because we're checking <math.h>
but then using <cmath> in the actual code, but if we run into problems we
can do the same sort of dance as isinf() and isnan() where we check /both/
headers and then write a wrapper header around them.

llvm-svn: 174773
2013-02-08 23:17:31 +00:00
Owen Anderson 389f7dc7a2 Fix CMake detection of various cmath functions, and XFAIL the test on platforms that are known to be missing them.
llvm-svn: 174564
2013-02-07 00:54:05 +00:00
Owen Anderson 132ae8b955 Conditionalize constant folding of math intrinsics on the availability of an implementation on the host. This is a little bit unfortunate, but until someone decides to implement a full libm for APFloat, we don't have a better way to get this functionality.
llvm-svn: 174561
2013-02-07 00:21:34 +00:00
Edwin Vane a9c5bb3ff3 Turn off uninitialized-use warnings for gcc in cmake build
Added support to the cmake build to turn off uninitialized use warnings
for gcc. This cleans the build up somewhat.

Used logic simpler than found in autoconf by making use of the fact that
although gcc won't complain about unsupported -Wno-* flags it *will*
complain about unsupported -W flags.

Reviewers: gribozavr, doug.gregor, chandlerc
llvm-svn: 174299
2013-02-04 02:32:44 +00:00
Richard Smith 6c26e74781 Add -Wno-nested-anon-types to -pedantic builds of LLVM. This Clang warning
catches uses of an extremely minor and widely-available C++ extension (which
every C++ compiler I could find supports, but EDG and Clang reject in strict
mode).

The diagnosed code pattern looks like this:

struct X {
  union {
    struct {
      int a;
      int b;
    } S;
  };
};

llvm-svn: 174103
2013-01-31 22:19:12 +00:00
Edwin Vane c64108430f Turn off missing field initializer warnings for gcc
gcc produces false positives for empty braces so turning the warning off.
Instead, turning the warning on for clang so proper warnings aren't missed.
    
Reviewers: dblaikie, chandlerc

llvm-svn: 174073
2013-01-31 18:05:54 +00:00
Evgeniy Stepanov 130fdcd225 Annotate BumpPtrAllocator for MemorySanitizer.
This change adds MemorySanitizer annotations to BumpPtrAllocator to
improve report quality.

llvm-svn: 174051
2013-01-31 09:58:59 +00:00
NAKAMURA Takumi c42bdfcc05 [CMake][Lit][unittests] Cleanup in AddLLVM.cmake.
llvm-svn: 173617
2013-01-27 12:46:53 +00:00
NAKAMURA Takumi 61a8f974a7 [CMake][Lit][unittests] Deprecate CMAKE_BUILD_TYPE in each build directory for unittests.
For example,
cur) unittests/ADT/Release/ADTTests
new) unittests/ADT/ADTTests

RUNTIME_BUILD_MODE can be substituted to CMAKE_CFG_INTDIR.

With Make and Ninja, the tree is not built with multiple configurations.
Then, including the build type in target directory doesn't make sense.
See also "How can I build multiple modes without switching?"
http://www.cmake.org/Wiki/CMake_FAQ
CMAKE_CFG_INTDIR is set to "."

With multiple-configuration-aware build system, like Visual Studio, each unittest is built on appropriate directory, for example,
unittests/ADT/Release/ADTTests.exe
CMAKE_CFG_INTDIR is set to build system's variable, like "$(Configuration)" or "$(OutDir)".

Thus, "--param build_config" is also deprecated.

llvm-svn: 173616
2013-01-27 12:20:50 +00:00