[PATCH] D116753: [Driver] Default to -fno-math-errno for musl too
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 4 19:20:41 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG38449c98f3d3: [Driver] Default to -fno-math-errno for musl (authored by alxu, committed by MaskRay).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116753/new/
https://reviews.llvm.org/D116753
Files:
clang/lib/Driver/ToolChains/Linux.cpp
clang/test/Driver/fast-math.c
Index: clang/test/Driver/fast-math.c
===================================================================
--- clang/test/Driver/fast-math.c
+++ clang/test/Driver/fast-math.c
@@ -119,6 +119,8 @@
// 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
+// RUN: %clang -### -target x86_64-linux-musl -c %s 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
// RUN: %clang -### -target amdgcn-amd-amdhsa -c %s 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
// RUN: %clang -### -target amdgcn-amd-amdpal -c %s 2>&1 \
Index: clang/lib/Driver/ToolChains/Linux.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Linux.cpp
+++ clang/lib/Driver/ToolChains/Linux.cpp
@@ -687,7 +687,7 @@
}
bool Linux::IsMathErrnoDefault() const {
- if (getTriple().isAndroid())
+ if (getTriple().isAndroid() || getTriple().isMusl())
return false;
return Generic_ELF::IsMathErrnoDefault();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116753.406145.patch
Type: text/x-patch
Size: 1099 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220205/c4ad7272/attachment.bin>
More information about the cfe-commits
mailing list