ccc: Pass -f[no-]math-errno to clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64709 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/ccc/ccclib/Tools.py b/tools/ccc/ccclib/Tools.py
index d3ba30e..5da2de2 100644
--- a/tools/ccc/ccclib/Tools.py
+++ b/tools/ccc/ccclib/Tools.py
@@ -280,6 +280,13 @@
if arglist.getLastArg(arglist.parser.f_unwindTablesOption):
cmd_args.append('--unwind-tables')
+ if arglist.hasFFlag(arglist.parser.f_mathErrnoOption,
+ arglist.parser.f_noMathErrnoOption,
+ self.toolChain.isMathErrnoDefault()):
+ cmd_args.append('--fmath-errno=1')
+ else:
+ cmd_args.append('--fmath-errno=0')
+
arg = arglist.getLastArg(arglist.parser.f_limitedPrecisionOption)
if arg:
cmd_args.append('--limit-float-precision')