This revision was automatically updated to reflect the committed changes. Closed by commit rL340424: [Android] Default to -fno-math-errno (authored by pirama, committed by ). Herald added a subscriber: llvm-commits.
Repository: rL LLVM https://reviews.llvm.org/D51068 Files: cfe/trunk/lib/Driver/ToolChains/Linux.cpp cfe/trunk/lib/Driver/ToolChains/Linux.h cfe/trunk/test/Driver/fast-math.c Index: cfe/trunk/test/Driver/fast-math.c =================================================================== --- cfe/trunk/test/Driver/fast-math.c +++ cfe/trunk/test/Driver/fast-math.c @@ -95,6 +95,8 @@ // RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s // RUN: %clang -### -target x86_64-fuchsia -c %s 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s +// RUN: %clang -### -target x86_64-linux-android -c %s 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s // // Check that -ffast-math disables -fmath-errno, and -fno-fast-math merely // preserves the target default. Also check various flag set operations between Index: cfe/trunk/lib/Driver/ToolChains/Linux.h =================================================================== --- cfe/trunk/lib/Driver/ToolChains/Linux.h +++ cfe/trunk/lib/Driver/ToolChains/Linux.h @@ -38,6 +38,7 @@ void AddIAMCUIncludeArgs(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const override; bool isPIEDefault() const override; + bool IsMathErrnoDefault() const override; SanitizerMask getSupportedSanitizers() const override; void addProfileRTLibs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const override; Index: cfe/trunk/lib/Driver/ToolChains/Linux.cpp =================================================================== --- cfe/trunk/lib/Driver/ToolChains/Linux.cpp +++ cfe/trunk/lib/Driver/ToolChains/Linux.cpp @@ -907,6 +907,12 @@ getTriple().isMusl() || getSanitizerArgs().requiresPIE(); } +bool Linux::IsMathErrnoDefault() const { + if (getTriple().isAndroid()) + return false; + return Generic_ELF::IsMathErrnoDefault(); +} + SanitizerMask Linux::getSupportedSanitizers() const { const bool IsX86 = getTriple().getArch() == llvm::Triple::x86; const bool IsX86_64 = getTriple().getArch() == llvm::Triple::x86_64;
Index: cfe/trunk/test/Driver/fast-math.c =================================================================== --- cfe/trunk/test/Driver/fast-math.c +++ cfe/trunk/test/Driver/fast-math.c @@ -95,6 +95,8 @@ // RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s // RUN: %clang -### -target x86_64-fuchsia -c %s 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s +// RUN: %clang -### -target x86_64-linux-android -c %s 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s // // Check that -ffast-math disables -fmath-errno, and -fno-fast-math merely // preserves the target default. Also check various flag set operations between Index: cfe/trunk/lib/Driver/ToolChains/Linux.h =================================================================== --- cfe/trunk/lib/Driver/ToolChains/Linux.h +++ cfe/trunk/lib/Driver/ToolChains/Linux.h @@ -38,6 +38,7 @@ void AddIAMCUIncludeArgs(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const override; bool isPIEDefault() const override; + bool IsMathErrnoDefault() const override; SanitizerMask getSupportedSanitizers() const override; void addProfileRTLibs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const override; Index: cfe/trunk/lib/Driver/ToolChains/Linux.cpp =================================================================== --- cfe/trunk/lib/Driver/ToolChains/Linux.cpp +++ cfe/trunk/lib/Driver/ToolChains/Linux.cpp @@ -907,6 +907,12 @@ getTriple().isMusl() || getSanitizerArgs().requiresPIE(); } +bool Linux::IsMathErrnoDefault() const { + if (getTriple().isAndroid()) + return false; + return Generic_ELF::IsMathErrnoDefault(); +} + SanitizerMask Linux::getSupportedSanitizers() const { const bool IsX86 = getTriple().getArch() == llvm::Triple::x86; const bool IsX86_64 = getTriple().getArch() == llvm::Triple::x86_64;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits