[libc-commits] [libc] 3f72f9d - [libc] Fix 64-bit Apple ARM support and header includes
Dominic Chen via libc-commits
libc-commits at lists.llvm.org
Fri Jan 28 00:22:57 PST 2022
Author: Dominic Chen
Date: 2022-01-28T00:22:47-08:00
New Revision: 3f72f9da43f0691094c0b23f142d295a784eeada
URL: https://github.com/llvm/llvm-project/commit/3f72f9da43f0691094c0b23f142d295a784eeada
DIFF: https://github.com/llvm/llvm-project/commit/3f72f9da43f0691094c0b23f142d295a784eeada.diff
LOG: [libc] Fix 64-bit Apple ARM support and header includes
Summary:
Reviewers: sivachandra
Subscribers:
Differential Revision: https://reviews.llvm.org/D114236
Added:
Modified:
libc/src/__support/FPUtil/PlatformDefs.h
libc/test/src/math/exhaustive/cosf_test.cpp
libc/test/src/math/exhaustive/expm1f_test.cpp
libc/test/src/math/exhaustive/sinf_test.cpp
libc/test/src/math/exhaustive/sqrtf_test.cpp
Removed:
################################################################################
diff --git a/libc/src/__support/FPUtil/PlatformDefs.h b/libc/src/__support/FPUtil/PlatformDefs.h
index 61af0dae49723..a32c4af1b0ada 100644
--- a/libc/src/__support/FPUtil/PlatformDefs.h
+++ b/libc/src/__support/FPUtil/PlatformDefs.h
@@ -15,7 +15,8 @@
#define X87_FPU
#endif
-#if defined(_WIN32)
+// https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms
+#if defined(_WIN32) || (defined(__APPLE__) && defined(__aarch64__))
#define LONG_DOUBLE_IS_DOUBLE
#endif
diff --git a/libc/test/src/math/exhaustive/cosf_test.cpp b/libc/test/src/math/exhaustive/cosf_test.cpp
index 3ec9d870bd6d2..c42690d4cbbba 100644
--- a/libc/test/src/math/exhaustive/cosf_test.cpp
+++ b/libc/test/src/math/exhaustive/cosf_test.cpp
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include "src/__support/FPUtil/FPBits.h"
-#include "src/__support/FPUtil/TestHelpers.h"
#include "src/math/cosf.h"
#include "utils/MPFRWrapper/MPFRUtils.h"
#include <math.h>
diff --git a/libc/test/src/math/exhaustive/expm1f_test.cpp b/libc/test/src/math/exhaustive/expm1f_test.cpp
index 5b277342a6521..9260c18e56476 100644
--- a/libc/test/src/math/exhaustive/expm1f_test.cpp
+++ b/libc/test/src/math/exhaustive/expm1f_test.cpp
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include "src/__support/FPUtil/FPBits.h"
-#include "src/__support/FPUtil/TestHelpers.h"
#include "src/math/expm1f.h"
#include "utils/MPFRWrapper/MPFRUtils.h"
#include <math.h>
diff --git a/libc/test/src/math/exhaustive/sinf_test.cpp b/libc/test/src/math/exhaustive/sinf_test.cpp
index 1fac9c8a8393e..fe90252724dca 100644
--- a/libc/test/src/math/exhaustive/sinf_test.cpp
+++ b/libc/test/src/math/exhaustive/sinf_test.cpp
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include "src/__support/FPUtil/FPBits.h"
-#include "src/__support/FPUtil/TestHelpers.h"
#include "src/math/sinf.h"
#include "utils/MPFRWrapper/MPFRUtils.h"
#include <math.h>
diff --git a/libc/test/src/math/exhaustive/sqrtf_test.cpp b/libc/test/src/math/exhaustive/sqrtf_test.cpp
index 497a7c1e92759..28f7e43f6050c 100644
--- a/libc/test/src/math/exhaustive/sqrtf_test.cpp
+++ b/libc/test/src/math/exhaustive/sqrtf_test.cpp
@@ -7,7 +7,6 @@
//===---------------------------------------------------------------------===//
#include "src/__support/FPUtil/FPBits.h"
-#include "src/__support/FPUtil/TestHelpers.h"
#include "src/math/sqrtf.h"
#include "utils/MPFRWrapper/MPFRUtils.h"
#include <math.h>
More information about the libc-commits
mailing list