r258815 - Revert "[Driver] Make sure -fno-math-builtin option is being passed by the driver."
Chad Rosier via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 26 08:37:35 PST 2016
All,
In r258814 I upgraded the -fno-math-builtin option from a cc1 only option
to a full blown compiler option. However, after a bit of searching I
can't seem to find documentation of this actually being a supported option
by gcc. Therefore, I reverted the change. I can see the potential
utility of the option, but I don't think we should add new options (that
must be supported for all of eternity) unless they really are necessary.
PR26317 should be addressed by marking the -fno-math-builtin with the
HelpHidden flag, so as to not confuse the users of clang.
Sorry for the noise..
Chad
> Author: mcrosier
> Date: Tue Jan 26 10:16:53 2016
> New Revision: 258815
>
> URL: http://llvm.org/viewvc/llvm-project?rev=258815&view=rev
> Log:
> Revert "[Driver] Make sure -fno-math-builtin option is being passed by the
> driver."
>
> This reverts commit r258814.
>
> Modified:
> cfe/trunk/lib/Driver/Tools.cpp
> cfe/trunk/test/CodeGen/nomathbuiltin.c
> cfe/trunk/test/Driver/clang_f_opts.c
>
> Modified: cfe/trunk/lib/Driver/Tools.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=258815&r1=258814&r2=258815&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Driver/Tools.cpp (original)
> +++ cfe/trunk/lib/Driver/Tools.cpp Tue Jan 26 10:16:53 2016
> @@ -5465,13 +5465,12 @@ void Clang::ConstructJob(Compilation &C,
> options::OPT_fno_apple_pragma_pack, false))
> CmdArgs.push_back("-fapple-pragma-pack");
>
> - // Process -fno-math-builtin options.
> // le32-specific flags:
> // -fno-math-builtin: clang should not convert math builtins to
> intrinsics
> // by default.
> - if (Args.hasArg(options::OPT_fno_math_builtin) ||
> - getToolChain().getArch() == llvm::Triple::le32)
> + if (getToolChain().getArch() == llvm::Triple::le32) {
> CmdArgs.push_back("-fno-math-builtin");
> + }
>
> // Default to -fno-builtin-str{cat,cpy} on Darwin for ARM.
> //
>
> Modified: cfe/trunk/test/CodeGen/nomathbuiltin.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/nomathbuiltin.c?rev=258815&r1=258814&r2=258815&view=diff
> ==============================================================================
> --- cfe/trunk/test/CodeGen/nomathbuiltin.c (original)
> +++ cfe/trunk/test/CodeGen/nomathbuiltin.c Tue Jan 26 10:16:53 2016
> @@ -9,3 +9,4 @@ double foo(double a, double b) {
> return pow(a, b);
> // CHECK: call {{.*}}double @pow
> }
> +
>
> Modified: cfe/trunk/test/Driver/clang_f_opts.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang_f_opts.c?rev=258815&r1=258814&r2=258815&view=diff
> ==============================================================================
> --- cfe/trunk/test/Driver/clang_f_opts.c (original)
> +++ cfe/trunk/test/Driver/clang_f_opts.c Tue Jan 26 10:16:53 2016
> @@ -191,9 +191,6 @@
> // RUN: %clang -### -S -fexec-charset=iso-8859-1 -o /dev/null %s 2>&1 |
> FileCheck -check-prefix=CHECK-INVALID-INPUT-CHARSET %s
> // CHECK-INVALID-INPUT-CHARSET: error: invalid value 'iso-8859-1' in
> '-fexec-charset=iso-8859-1'
>
> -// RUN: %clang -### -S -fno-math-builtin %s 2>&1 |
> FileCheck -check-prefix=CHECK-NO-MATH-BUILTIN %s
> -// CHECK-NO-MATH-BUILTIN: "-fno-math-builtin"
> -
> // Test that we don't error on these.
> // RUN: %clang -### -S -Werror
> \
> // RUN: -falign-functions -falign-functions=2 -fno-align-functions
> \
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
More information about the cfe-commits
mailing list