From 5b45c5d7ec51ef019a8133c7e27251ce3c9f0bbd Mon Sep 17 00:00:00 2001 From: David Greene Date: Thu, 19 Jun 2014 19:31:05 +0000 Subject: [PATCH] Turn of -Werror by default Don't build with -Werror unless asked to. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211299 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/llvm-compilers-check | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/utils/llvm-compilers-check b/utils/llvm-compilers-check index 3173027759b..d745b3a7c50 100755 --- a/utils/llvm-compilers-check +++ b/utils/llvm-compilers-check @@ -149,6 +149,8 @@ def add_options(parser): help=("Do not do installs")) parser.add_option("--keep-going", default=False, action="store_true", help=("Keep going after failures")) + parser.add_option("--enable-werror", default=False, action="store_true", + help=("Build with -Werror")) return def check_options(parser, options, valid_builds): @@ -361,16 +363,13 @@ class Builder(threading.Thread): configure_flags = dict( llvm=dict(debug=["--prefix=" + self.install_prefix, - "--enable-werror", "--enable-assertions", "--disable-optimized", "--with-gcc-toolchain=" + cxxroot], release=["--prefix=" + self.install_prefix, - "--enable-werror", "--enable-optimized", "--with-gcc-toolchain=" + cxxroot], paranoid=["--prefix=" + self.install_prefix, - "--enable-werror", "--enable-assertions", "--enable-expensive-checks", "--disable-optimized", @@ -379,6 +378,11 @@ class Builder(threading.Thread): release=[], paranoid=[])) + if (self.options.enable_werror): + configure_flags["llvm"]["debug"].append("--enable-werror") + configure_flags["llvm"]["release"].append("--enable-werror") + configure_flags["llvm"]["paranoid"].append("--enable-werror") + configure_env = dict( llvm=dict(debug=dict(CC=self.cc, CXX=self.cxx), -- 2.34.1