]> granicus.if.org Git - clang/commit
Fix an logic error in the clang driver preventing crtfastmath.o from linking when...
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 25 Mar 2014 18:02:07 +0000 (18:02 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 25 Mar 2014 18:02:07 +0000 (18:02 +0000)
commitd53585be8fab3180a82b9bc7f4c40a5162e08eeb
treee5cff26cc41132d699b116776f9f9232579bd261
parentb5893c8b7b46be793d9f6fd9a1217bf9355373ed
Fix an logic error in the clang driver preventing crtfastmath.o from linking when -Ofast is used without -ffast-math

In gcc using -Ofast forces linking of crtfastmath.o.
In the current clang crtfastmath.o is only linked when -ffast-math/-funsafe-math-optimizations passed. It can lead to performance issues, when using only -Ofast without explicit -ffast-math (I faced with it).
My patch fixes inconsistency with gcc behaviour and also introduces few tests on it.

Patch by Zinovy Nis!

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204742 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Driver/Driver.h
include/clang/Driver/ToolChain.h
lib/Driver/Driver.cpp
lib/Driver/ToolChain.cpp
lib/Driver/Tools.cpp
test/Driver/linux-ld.c