1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 14:02:52 +02:00
Commit Graph

197 Commits

Author SHA1 Message Date
Duncan Sands
9ea11b195f 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
Alexey Samsonov
2a3f174788 Enable -Wnon-virtual-dtor build warning
llvm-svn: 177385
2013-03-19 10:10:03 +00:00
Eric Christopher
a925e8b410 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
d3b3578c23 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
43df9a115c 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
Edwin Vane
3e6897f32d 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
6c3dc61e7e 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
d8f4b59584 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
NAKAMURA Takumi
311d4c23b3 [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
Reid Kleckner
f08a0c8fa3 Disable MSVC's warning about noreturn destructors
This warning fires on:
  Operator::~Operator() {
    llvm_unreachable("should never destroy an Operator");
  }

That seems like a false positive.  I don't see any good way to silence
the warning here, so I'm disabling it.

llvm-svn: 173455
2013-01-25 15:36:13 +00:00
Michael J. Spencer
23019c6d44 [CMake] MSVC is incorrectly emitting C4239 in some cases. Disable it.
llvm-svn: 171430
2013-01-03 00:00:40 +00:00
Dmitri Gribenko
803c074aaf Fix a typo introduced in r168577: FlAGS -> FLAGS (note the lowercase ell)
Now we really pass -Wcovered-switch-default if the compiler supports it.

llvm-svn: 171040
2012-12-24 17:52:48 +00:00
Joe Abbey
61bdb20713 Removing SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
Adding CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
       C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG

This is to handle the wackiness on a Mac host where cmake detects:

CMAKE_CXX_COMPILER == "/usr/bin/c++"
CMAKE_C_COMPILER == "/usr/bin/gcc"

llvm-svn: 168577
2012-11-26 02:02:08 +00:00
Tobias Grosser
4c471a66f7 cmake: Pass the -m32 flag to modules if LLVM_BUILD_32_BITS is enabled
This was previously only done for executables and shared libraries, but not
for modules. As modules are essentially shared libraries (that need to be
dlopened explicitly), threating them the same as shared libraries seems
reasonable. This fixes the LLVM_BUILD_32_BITS build of Polly.

Contributed by: Ondra Hosek  <ondra.hosek@gmail.com>

llvm-svn: 158195
2012-06-08 09:41:23 +00:00
Michael J. Spencer
6f5ee07731 [CMake] Promote extension warnings to errors.
llvm-svn: 158176
2012-06-07 23:33:56 +00:00
Michael J. Spencer
b99229b07a [CMake] Order MSVC warnings numerically.
llvm-svn: 158171
2012-06-07 21:34:31 +00:00
Michael J. Spencer
bc976969d4 [CMake] Adjust MSVC warnings.
Remove /Wall from LLVM_ENABLE_WARNINGS (it's useless) and promote 4239
to a level 1 warning.

llvm-svn: 158170
2012-06-07 21:34:15 +00:00
Tim Northover
62cf7e738b Fix how CMake appends -m32 to linker command-lines
llvm-svn: 157337
2012-05-23 18:42:02 +00:00
Rafael Espindola
2342072875 Adding -fcolor-diagnostics is causing problem to users that parse the build
output. Peter Collingbourne also reports that it is showing up in
$(llvm-config --cflags).

Revert this for now since I don't know enough cmake to fix it properly.

This reverts commit 18efed7adc79c1970f307bb5b015d199012ba872.

llvm-svn: 156392
2012-05-08 18:11:06 +00:00
Rafael Espindola
43ad1ac2ef Pass -fcolor-diagnostics when it is supported. This makes a difference when
using cmake+ninja, since ninja buffers the compiler output.

llvm-svn: 156150
2012-05-04 03:23:36 +00:00
NAKAMURA Takumi
9624229c9a CMake: Enable LLVM_COMPILER_JOBS on all MS IDEs. We don't support older environments than VS9.
llvm-svn: 155285
2012-04-21 14:51:02 +00:00
NAKAMURA Takumi
1f754ef34b CMake: Prune redundant LLVM_COMPILER_JOBS from llvm/CMakeLists.txt. HandleLLVMOptions.cmake has it.
llvm-svn: 155284
2012-04-21 14:50:56 +00:00
Michael J. Spencer
0eb4a851f6 Minimal changes for LLVM to compile under VS11.
llvm-svn: 151849
2012-03-01 22:42:52 +00:00
Rafael Espindola
51ef203cf0 Enable -Wcovered-switch-default again, but add -Werror to the checks to make
sure we don't use it with compilers that don't support it.

llvm-svn: 151665
2012-02-28 23:32:06 +00:00
Chandler Carruth
8f6569a698 Temporarily revert r151609, which enabled a new warning for LLVM and
Clang builds. The detection logic for compilers that support the warning
isn't working. Rafael is going to investigate it, but didn't want people
to have to wade through build spam until then.

llvm-svn: 151649
2012-02-28 19:26:56 +00:00
Rafael Espindola
662de5f4e8 Enable -Wcovered-switch-default as it matches the switch style used in llvm.
llvm-svn: 151609
2012-02-28 02:01:55 +00:00
Rafael Espindola
e3e205900c -fvisibility-inlines-hidden is a c++ only option.
Thanks to Peter Collingbourne for noticing it.

llvm-svn: 148913
2012-01-25 03:39:26 +00:00
Rafael Espindola
cd18a7720d Don't use -fvisibility-inlines-hidden on mingw to try to avoid a lot of
warnings from gcc.

llvm-svn: 148539
2012-01-20 13:10:10 +00:00
Rafael Espindola
5af87be2ba cmake: pass -fvisibility-inlines-hidden if it is supported. In a
Release+Asserts build with -DBUILD_SHARED_LIBS=ON, the install
directory goes from 72MB to 70MB.

llvm-svn: 148530
2012-01-20 04:07:48 +00:00
NAKAMURA Takumi
e7a3e38c9e Tweak CMake build on Cygwin.
llvm-svn: 146725
2011-12-16 06:21:08 +00:00
Daniel Dunbar
2ab4cfa33d build/cmake: Move all the user controllable options into top-level CMakeLists
for consistency.

llvm-svn: 143728
2011-11-04 19:04:35 +00:00
NAKAMURA Takumi
162abf56c1 Add -D__STDC_FORMAT_MACROS to use PRIx64.
llvm-svn: 141663
2011-10-11 12:51:44 +00:00
NAKAMURA Takumi
aebe963472 cmake/modules/HandleLLVMOptions.cmake: Reorder __STDC_CONSTANT_MACROS and __STDC_LIMIT_MACROS.
llvm-svn: 141662
2011-10-11 12:51:36 +00:00
NAKAMURA Takumi
2a11307687 CMake: [MSVC] Suppress C4551 'function call missing argument list'.
(void)static_func; it is used as idiom in llvm source tree to suppress "Unused static function" warnings.

llvm-svn: 137800
2011-08-17 01:28:30 +00:00
Andrew Trick
aec8bc23bf lit support for REQUIRES: asserts.
Take #2. Don't piggyback on the existing config.build_mode. Instead,
define a new lit feature for each build feature we need (currently
just "asserts"). Teach both autoconf'd and cmake'd Makefiles to define
this feature within test/lit.site.cfg. This doesn't require any lit
harness changes and should be more robust across build systems.

llvm-svn: 133664
2011-06-22 23:23:19 +00:00
Andrew Trick
30248d290d Added LLVM_BUILD_MODE to cmake so that lit supports tests with REQUIRES: {buildmode}.
llvm-svn: 133205
2011-06-16 22:19:20 +00:00
Oscar Fuentes
51417218c2 Handle gcc-compatible compilers (such as clang) the same way we handle
gcc.

Fixes PR9886.

llvm-svn: 131181
2011-05-11 13:53:08 +00:00
Francois Pichet
676bc0a228 Disable warning C4181: "qualifier applied to reference type; ignored"
This was causing a flooding of warnings with MSVC 2008. This warning was removed in MSVC 2010.

llvm-svn: 129737
2011-04-19 00:03:17 +00:00
Oscar Fuentes
b5bbbd9889 Fix assignment of -fPIC to CMAKE_C_FLAGS. Configure llvm-config.in.in
with the contents of CMAKE_C(XX)_FLAGS too, else `llvm-config
--c(xx)flags' doesn't tell the absolute truth.

This comes from PR9603 and is based on a patch by Ryuta Suzuki!

llvm-svn: 128727
2011-04-01 19:36:06 +00:00
Oscar Fuentes
2743931876 Remove remnant of my experimentation with CMake.
llvm-svn: 127244
2011-03-08 13:30:52 +00:00
Oscar Fuentes
06f62a8581 Support for parallel compilation (/MP) when using the VS IDE.
Patch by Erik Olofsson!

llvm-svn: 126847
2011-03-02 17:47:37 +00:00
NAKAMURA Takumi
684e41daef CMake: Define LLVM_INCLUDE_TESTS in cmake/modules/HandleLLVMOptions.cmake. It affects testing stuff on clang-standalone build.
llvm-svn: 126107
2011-02-21 03:21:06 +00:00
NAKAMURA Takumi
f35d4d8c53 CMake: LLVM_LIT_TOOLS_DIR is needed only on Win32 hosts to use GnuWin32 tools.
Unixen and Cygwin do not need it.

llvm-svn: 125277
2011-02-10 10:29:42 +00:00
NAKAMURA Takumi
81da9fa2a4 CMake: Add the new option LLVM_LIT_TOOLS_DIR. It can specify "Path to GnuWin32 tools".
llvm-svn: 125173
2011-02-09 04:18:58 +00:00
Oscar Fuentes
3810263d0f Don't define NDEBUG on MSVC_IDE and XCode builds. Fixes PR9155.
llvm-svn: 124985
2011-02-06 19:07:06 +00:00
Oscar Fuentes
f42fbe0c95 Moved more stuff to HandleLLVMOptions.cmake
llvm-svn: 124968
2011-02-05 19:08:42 +00:00
Oscar Fuentes
51a072b7d8 Changes for building Clang and others using LLVM as an external
library.

Installs tblgen (required by Clang).

Translates handling of user settings and platform-dependant options to
its own file, where it can included by another project.

Installs the .cmake files required by projects like Clang.

llvm-svn: 124816
2011-02-03 20:57:36 +00:00