Detect clang even if it's disguised, e.g. cross-compiler or invoked by
explicit path name, and add the option based on that.
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/4383)
inherit_from => [ "linux-x86" ],
cc => "clang",
cxx => "clang++",
- cflags => add("-Wextra -Qunused-arguments"),
+ cflags => add("-Wextra"),
},
"linux-x86_64" => {
inherit_from => [ "linux-generic64", asm("x86_64_asm") ],
inherit_from => [ "linux-x86_64" ],
cc => "clang",
cxx => "clang++",
- cflags => add("-Wextra -Qunused-arguments"),
+ cflags => add("-Wextra"),
},
"linux-x32" => {
inherit_from => [ "linux-generic32", asm("x86_64_asm") ],
# -Wunused-macros -- no, too tricky for BN and _XOPEN_SOURCE etc
# -Wextended-offsetof -- no, needed in CMS ASN1 code
my $clang_devteam_warn = ""
- . " -Qunused-arguments"
. " -Wswitch-default"
. " -Wno-parentheses-equality"
. " -Wno-language-extension-token"
push @{$config{defines}}, $apiflag;
}
+if (defined($predefined{__clang__}) && !$disabled{asm}) {
+ $config{cflags} .= " -Qunused-arguments";
+}
+
if ($strict_warnings)
{
my $wopt;