Skip to content

Commit

Permalink
[android] add an android NDK Swift overlay module, and use it instead…
Browse files Browse the repository at this point in the history
… of Glibc
  • Loading branch information
hyp committed Apr 25, 2024
1 parent cdc0892 commit a13f749
Show file tree
Hide file tree
Showing 29 changed files with 249 additions and 19 deletions.
31 changes: 19 additions & 12 deletions lib/ClangImporter/ClangIncludePaths.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ static bool shouldInjectLibcModulemap(const llvm::Triple &triple) {

static SmallVector<std::pair<std::string, std::string>, 2>
getLibcFileMapping(ASTContext &ctx, StringRef modulemapFileName,
std::optional<StringRef> maybeHeaderFileName,
std::optional<ArrayRef<StringRef>> maybeHeaderFileNames,
const llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> &vfs) {
const llvm::Triple &triple = ctx.LangOpts.Target;
if (!shouldInjectLibcModulemap(triple))
Expand Down Expand Up @@ -227,18 +227,20 @@ getLibcFileMapping(ASTContext &ctx, StringRef modulemapFileName,
SmallVector<std::pair<std::string, std::string>, 2> vfsMappings{
{std::string(injectedModuleMapPath), std::string(actualModuleMapPath)}};

if (maybeHeaderFileName) {
// TODO: remove the SwiftGlibc.h header and reference all Glibc headers
// directly from the modulemap.
Path actualHeaderPath = actualModuleMapPath;
llvm::sys::path::remove_filename(actualHeaderPath);
llvm::sys::path::append(actualHeaderPath, maybeHeaderFileName.value());
if (maybeHeaderFileNames) {
for (const auto &filename : *maybeHeaderFileNames) {
// TODO: remove the SwiftGlibc.h header and reference all Glibc headers
// directly from the modulemap.
Path actualHeaderPath = actualModuleMapPath;
llvm::sys::path::remove_filename(actualHeaderPath);
llvm::sys::path::append(actualHeaderPath, filename);

Path injectedHeaderPath(libcDir);
llvm::sys::path::append(injectedHeaderPath, maybeHeaderFileName.value());
Path injectedHeaderPath(libcDir);
llvm::sys::path::append(injectedHeaderPath, filename);

vfsMappings.push_back(
{std::string(injectedHeaderPath), std::string(actualHeaderPath)});
vfsMappings.push_back(
{std::string(injectedHeaderPath), std::string(actualHeaderPath)});
}
}

return vfsMappings;
Expand Down Expand Up @@ -534,8 +536,13 @@ ClangInvocationFileMapping swift::getClangInvocationFileMapping(
// WASI Mappings
libcFileMapping =
getLibcFileMapping(ctx, "wasi-libc.modulemap", std::nullopt, vfs);
} else if (triple.isAndroid()) {
// Android uses the android-specific module map that overlays the NDK.
StringRef headerFiles[] = {"SwiftAndroidNDK.h", "SwiftBionic.h"};
libcFileMapping =
getLibcFileMapping(ctx, "android.modulemap", headerFiles, vfs);
} else {
// Android/BSD/Linux Mappings
// BSD/Linux Mappings
libcFileMapping = getLibcFileMapping(ctx, "glibc.modulemap",
StringRef("SwiftGlibc.h"), vfs);
}
Expand Down
15 changes: 13 additions & 2 deletions stdlib/cmake/modules/AddSwiftStdlib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1739,6 +1739,9 @@ endfunction()
# SWIFT_MODULE_DEPENDS_WASI
# Swift modules this library depends on when built for WASI.
#
# SWIFT_MODULE_DEPENDS_ANDROID
# Swift modules this library depends on when built for Android.
#
# FRAMEWORK_DEPENDS
# System frameworks this library depends on.
#
Expand Down Expand Up @@ -1862,6 +1865,7 @@ function(add_swift_target_library name)
SWIFT_COMPILE_FLAGS_XROS
SWIFT_COMPILE_FLAGS_LINUX
SWIFT_MODULE_DEPENDS
SWIFT_MODULE_DEPENDS_ANDROID
SWIFT_MODULE_DEPENDS_CYGWIN
SWIFT_MODULE_DEPENDS_FREEBSD
SWIFT_MODULE_DEPENDS_FREESTANDING
Expand Down Expand Up @@ -2061,9 +2065,12 @@ function(add_swift_target_library name)
elseif(sdk STREQUAL "OPENBSD")
list(APPEND swiftlib_module_depends_flattened
${SWIFTLIB_SWIFT_MODULE_DEPENDS_OPENBSD})
elseif(sdk STREQUAL "LINUX" OR sdk STREQUAL "ANDROID")
elseif(sdk STREQUAL "LINUX")
list(APPEND swiftlib_module_depends_flattened
${SWIFTLIB_SWIFT_MODULE_DEPENDS_LINUX})
elseif(sdk STREQUAL "ANDROID")
list(APPEND swiftlib_module_depends_flattened
${SWIFTLIB_SWIFT_MODULE_DEPENDS_ANDROID})
elseif(sdk STREQUAL "CYGWIN")
list(APPEND swiftlib_module_depends_flattened
${SWIFTLIB_SWIFT_MODULE_DEPENDS_CYGWIN})
Expand Down Expand Up @@ -2861,6 +2868,7 @@ function(add_swift_target_executable name)
DEPENDS
LINK_LIBRARIES
SWIFT_MODULE_DEPENDS
SWIFT_MODULE_DEPENDS_ANDROID
SWIFT_MODULE_DEPENDS_CYGWIN
SWIFT_MODULE_DEPENDS_FREEBSD
SWIFT_MODULE_DEPENDS_FREESTANDING
Expand Down Expand Up @@ -2962,9 +2970,12 @@ function(add_swift_target_executable name)
elseif(sdk STREQUAL "OPENBSD")
list(APPEND swiftexe_module_depends_flattened
${SWIFTEXE_TARGET_SWIFT_MODULE_DEPENDS_OPENBSD})
elseif(sdk STREQUAL "LINUX" OR sdk STREQUAL "ANDROID")
elseif(sdk STREQUAL "LINUX")
list(APPEND swiftexe_module_depends_flattened
${SWIFTEXE_TARGET_SWIFT_MODULE_DEPENDS_LINUX})
elseif(sdk STREQUAL "ANDROID")
list(APPEND swiftexe_module_depends_flattened
${SWIFTEXE_TARGET_SWIFT_MODULE_DEPENDS_ANDROID})
elseif(sdk STREQUAL "CYGWIN")
list(APPEND swiftexe_module_depends_flattened
${SWIFTEXE_TARGET_SWIFT_MODULE_DEPENDS_CYGWIN})
Expand Down
1 change: 1 addition & 0 deletions stdlib/private/RuntimeUnittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ add_swift_target_library(swiftRuntimeUnittest ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES
ExclusivityTests.cpp

SWIFT_MODULE_DEPENDS StdlibUnittest
SWIFT_MODULE_DEPENDS_ANDROID Android
SWIFT_MODULE_DEPENDS_LINUX Glibc
SWIFT_MODULE_DEPENDS_FREEBSD Glibc
SWIFT_MODULE_DEPENDS_OPENBSD Glibc
Expand Down
1 change: 1 addition & 0 deletions stdlib/private/StdlibCollectionUnittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ add_swift_target_library(swiftStdlibCollectionUnittest ${SWIFT_STDLIB_LIBRARY_BU
WriteBackMutableSlice.swift

SWIFT_MODULE_DEPENDS StdlibUnittest
SWIFT_MODULE_DEPENDS_ANDROID Android
SWIFT_MODULE_DEPENDS_LINUX Glibc
SWIFT_MODULE_DEPENDS_FREEBSD Glibc
SWIFT_MODULE_DEPENDS_OPENBSD Glibc
Expand Down
1 change: 1 addition & 0 deletions stdlib/private/StdlibUnicodeUnittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ add_swift_target_library(swiftStdlibUnicodeUnittest ${SWIFT_STDLIB_LIBRARY_BUILD
WordBreaking.swift

SWIFT_MODULE_DEPENDS StdlibUnittest
SWIFT_MODULE_DEPENDS_ANDROID Android
SWIFT_MODULE_DEPENDS_LINUX Glibc
SWIFT_MODULE_DEPENDS_FREEBSD Glibc
SWIFT_MODULE_DEPENDS_OPENBSD Glibc
Expand Down
1 change: 1 addition & 0 deletions stdlib/private/StdlibUnittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ add_swift_target_library(swiftStdlibUnittest ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES}
SWIFT_MODULE_DEPENDS_XROS ${swift_stdlib_unittest_darwin_dependencies}
SWIFT_MODULE_DEPENDS_MACCATALYST ${swift_stdlib_unittest_darwin_dependencies}
SWIFT_MODULE_DEPENDS_FREESTANDING "${SWIFT_FREESTANDING_TEST_DEPENDENCIES}"
SWIFT_MODULE_DEPENDS_ANDROID Android
SWIFT_MODULE_DEPENDS_LINUX Glibc
SWIFT_MODULE_DEPENDS_FREEBSD Glibc
SWIFT_MODULE_DEPENDS_OPENBSD Glibc
Expand Down
2 changes: 2 additions & 0 deletions stdlib/private/StdlibUnittest/RaceTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ import Darwin
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#elseif os(WASI)
import WASILibc
#elseif os(Windows)
Expand Down
2 changes: 2 additions & 0 deletions stdlib/private/StdlibUnittest/StdlibCoreExtras.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import Darwin
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#elseif os(WASI)
import WASILibc
#elseif os(Windows)
Expand Down
2 changes: 2 additions & 0 deletions stdlib/private/StdlibUnittest/StdlibUnittest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import Darwin
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#elseif os(WASI)
import WASILibc
#elseif os(Windows)
Expand Down
1 change: 1 addition & 0 deletions stdlib/private/SwiftPrivate/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ add_swift_target_library(swiftSwiftPrivate ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} I
SWIFT_MODULE_DEPENDS_WATCHOS ${swift_swiftprivate_darwin_depencencies}
SWIFT_MODULE_DEPENDS_MACCATALYST ${swift_swiftprivate_darwin_depencencies}
SWIFT_MODULE_DEPENDS_FREESTANDING "${SWIFT_FREESTANDING_TEST_DEPENDENCIES}"
SWIFT_MODULE_DEPENDS_ANDROID Android
SWIFT_MODULE_DEPENDS_LINUX Glibc
SWIFT_MODULE_DEPENDS_FREEBSD Glibc
SWIFT_MODULE_DEPENDS_OPENBSD Glibc
Expand Down
2 changes: 2 additions & 0 deletions stdlib/private/SwiftPrivate/IO.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import Darwin
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#elseif canImport(WASILibc)
import WASILibc
#endif
Expand Down
1 change: 1 addition & 0 deletions stdlib/private/SwiftPrivateLibcExtras/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ add_swift_target_library(swiftSwiftPrivateLibcExtras ${SWIFT_STDLIB_LIBRARY_BUIL
SWIFT_MODULE_DEPENDS_XROS ${swift_private_libc_extras_darwin_depencencies}
SWIFT_MODULE_DEPENDS_MACCATALYST ${swift_private_libc_extras_darwin_depencencies}
SWIFT_MODULE_DEPENDS_FREESTANDING "${SWIFT_FREESTANDING_TEST_DEPENDENCIES}"
SWIFT_MODULE_DEPENDS_ANDROID Android
SWIFT_MODULE_DEPENDS_LINUX Glibc
SWIFT_MODULE_DEPENDS_FREEBSD Glibc
SWIFT_MODULE_DEPENDS_OPENBSD Glibc
Expand Down
2 changes: 2 additions & 0 deletions stdlib/private/SwiftPrivateLibcExtras/Subprocess.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import Darwin
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#elseif os(WASI)
import WASILibc
#elseif os(Windows)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import Darwin
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#elseif os(WASI)
import WASILibc
#elseif os(Windows)
Expand Down
1 change: 1 addition & 0 deletions stdlib/private/SwiftPrivateThreadExtras/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ add_swift_target_library(swiftSwiftPrivateThreadExtras ${SWIFT_STDLIB_LIBRARY_BU
SWIFT_MODULE_DEPENDS_XROS ${swift_private_thread_extras_darwin_depencencies}
SWIFT_MODULE_DEPENDS_MACCATALYST ${swift_private_thread_extras_darwin_depencencies}
SWIFT_MODULE_DEPENDS_FREESTANDING "${SWIFT_FREESTANDING_TEST_DEPENDENCIES}"
SWIFT_MODULE_DEPENDS_ANDROID Android
SWIFT_MODULE_DEPENDS_LINUX Glibc
SWIFT_MODULE_DEPENDS_FREEBSD Glibc
SWIFT_MODULE_DEPENDS_OPENBSD Glibc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import Darwin
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#elseif os(WASI)
import WASILibc
#elseif os(Windows)
Expand Down
2 changes: 2 additions & 0 deletions stdlib/private/SwiftPrivateThreadExtras/ThreadBarriers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import Darwin
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#elseif os(WASI)
import WASILibc
#elseif os(Windows)
Expand Down
1 change: 1 addition & 0 deletions stdlib/private/SwiftReflectionTest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ if (SWIFT_INCLUDE_TESTS AND SWIFT_BUILD_DYNAMIC_STDLIB)
SWIFT_MODULE_DEPENDS_TVOS ${swift_reflection_test_darwin_depencencies}
SWIFT_MODULE_DEPENDS_WATCHOS ${swift_reflection_test_darwin_depencencies}
SWIFT_MODULE_DEPENDS_XROS ${swift_reflection_test_darwin_depencencies}
SWIFT_MODULE_DEPENDS_ANDROID Android
SWIFT_MODULE_DEPENDS_LINUX Glibc
SWIFT_MODULE_DEPENDS_FREEBSD Glibc
SWIFT_MODULE_DEPENDS_OPENBSD Glibc
Expand Down
2 changes: 2 additions & 0 deletions stdlib/private/SwiftReflectionTest/SwiftReflectionTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ import SwiftShims
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#endif

let rtldDefault: UnsafeMutableRawPointer? = nil
Expand Down
1 change: 1 addition & 0 deletions stdlib/public/Concurrency/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ add_swift_target_library(swift_Concurrency ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} I
${SWIFT_RUNTIME_CONCURRENCY_C_SOURCES}
${SWIFT_RUNTIME_CONCURRENCY_SWIFT_SOURCES}

SWIFT_MODULE_DEPENDS_ANDROID Android
SWIFT_MODULE_DEPENDS_LINUX Glibc
SWIFT_MODULE_DEPENDS_FREEBSD Glibc
SWIFT_MODULE_DEPENDS_OPENBSD Glibc
Expand Down
1 change: 1 addition & 0 deletions stdlib/public/Differentiation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ add_swift_target_library(swift_Differentiation ${SWIFT_STDLIB_LIBRARY_BUILD_TYPE
SWIFT_MODULE_DEPENDS_TVOS ${swiftDifferentiationDarwinDependencies}
SWIFT_MODULE_DEPENDS_WATCHOS ${swiftDifferentiationDarwinDependencies}
SWIFT_MODULE_DEPENDS_XROS ${swiftDifferentiationDarwinDependencies}
SWIFT_MODULE_DEPENDS_ANDROID Android
SWIFT_MODULE_DEPENDS_LINUX Glibc
SWIFT_MODULE_DEPENDS_FREEBSD Glibc
SWIFT_MODULE_DEPENDS_OPENBSD Glibc
Expand Down
4 changes: 3 additions & 1 deletion stdlib/public/Differentiation/TgmathDerivatives.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ import Swift
import Darwin.C.tgmath
#elseif canImport(Musl)
import Musl
#elseif os(Linux) || os(FreeBSD) || os(OpenBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku)
#elseif os(Linux) || os(FreeBSD) || os(OpenBSD) || os(PS4) || os(Cygwin) || os(Haiku)
import Glibc
#elseif os(WASI)
import WASILibc
#elseif os(Windows)
import CRT
#elseif os(Android)
import Android
#else
#error("Unsupported platform")
#endif
Expand Down
1 change: 1 addition & 0 deletions stdlib/public/Distributed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ add_swift_target_library(swiftDistributed ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS
SWIFT_MODULE_DEPENDS_OSX ${swift_distributed_darwin_depencencies}
SWIFT_MODULE_DEPENDS_TVOS ${swift_distributed_darwin_depencencies}
SWIFT_MODULE_DEPENDS_WATCHOS ${swift_distributed_darwin_depencencies}
SWIFT_MODULE_DEPENDS_ANDROID Android
SWIFT_MODULE_DEPENDS_LINUX Glibc
SWIFT_MODULE_DEPENDS_FREEBSD Glibc
SWIFT_MODULE_DEPENDS_OPENBSD Glibc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import Darwin
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#elseif os(Windows)
import WinSDK
#endif
Expand Down
88 changes: 88 additions & 0 deletions stdlib/public/Platform/Android.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

@_exported import SwiftAndroid // Clang module

@available(swift, deprecated: 3.0, message: "Please use 'Double.pi' or '.pi' to get the value of correct type and avoid casting.")
public let M_PI = Double.pi
@available(swift, deprecated: 3.0, message: "Please use 'Double.pi / 2' or '.pi / 2' to get the value of correct type and avoid casting.")
public let M_PI_2 = Double.pi / 2
@available(swift, deprecated: 3.0, message: "Please use 'Double.pi / 4' or '.pi / 4' to get the value of correct type and avoid casting.")
public let M_PI_4 = Double.pi / 4

@available(swift, deprecated: 3.0, message: "Please use 2.squareRoot()'.")
public let M_SQRT2 = 2.squareRoot()

@available(swift, deprecated: 3.0, message: "Please use 0.5.squareRoot()'.")
public let M_SQRT1_2 = 0.5.squareRoot()

@available(swift, deprecated: 3.0, message: "Please use 'T.radix' to get the radix of a FloatingPoint type 'T'.")
public let FLT_RADIX = Double.radix

// Where does the 1 come from? C counts the usually-implicit leading
// significand bit, but Swift does not. Neither is really right or wrong.
@available(swift, deprecated: 3.0, message: "Please use 'Float.significandBitCount + 1'.")
public let FLT_MANT_DIG = Float.significandBitCount + 1

// Where does the 1 come from? C models floating-point numbers as having a
// significand in [0.5, 1), but Swift (following IEEE 754) considers the
// significand to be in [1, 2). This rationale applies to FLT_MIN_EXP
// as well.
@available(swift, deprecated: 3.0, message: "Please use 'Float.greatestFiniteMagnitude.exponent + 1'.")
public let FLT_MAX_EXP = Float.greatestFiniteMagnitude.exponent + 1

@available(swift, deprecated: 3.0, message: "Please use 'Float.leastNormalMagnitude.exponent + 1'.")
public let FLT_MIN_EXP = Float.leastNormalMagnitude.exponent + 1

@available(swift, deprecated: 3.0, message: "Please use 'Float.greatestFiniteMagnitude' or '.greatestFiniteMagnitude'.")
public let FLT_MAX = Float.greatestFiniteMagnitude

@available(swift, deprecated: 3.0, message: "Please use 'Float.ulpOfOne' or '.ulpOfOne'.")
public let FLT_EPSILON = Float.ulpOfOne

@available(swift, deprecated: 3.0, message: "Please use 'Float.leastNormalMagnitude' or '.leastNormalMagnitude'.")
public let FLT_MIN = Float.leastNormalMagnitude

@available(swift, deprecated: 3.0, message: "Please use 'Float.leastNonzeroMagnitude' or '.leastNonzeroMagnitude'.")
public let FLT_TRUE_MIN = Float.leastNonzeroMagnitude


// Where does the 1 come from? C counts the usually-implicit leading
// significand bit, but Swift does not. Neither is really right or wrong.
@available(swift, deprecated: 3.0, message: "Please use 'Double.significandBitCount + 1'.")
public let DBL_MANT_DIG = Double.significandBitCount + 1

// Where does the 1 come from? C models floating-point numbers as having a
// significand in [0.5, 1), but Swift (following IEEE 754) considers the
// significand to be in [1, 2). This rationale applies to DBL_MIN_EXP
// as well.
@available(swift, deprecated: 3.0, message: "Please use 'Double.greatestFiniteMagnitude.exponent + 1'.")
public let DBL_MAX_EXP = Double.greatestFiniteMagnitude.exponent + 1

@available(swift, deprecated: 3.0, message: "Please use 'Double.leastNormalMagnitude.exponent + 1'.")
public let DBL_MIN_EXP = Double.leastNormalMagnitude.exponent + 1

@available(swift, deprecated: 3.0, message: "Please use 'Double.greatestFiniteMagnitude' or '.greatestFiniteMagnitude'.")
public let DBL_MAX = Double.greatestFiniteMagnitude

@available(swift, deprecated: 3.0, message: "Please use 'Double.ulpOfOne' or '.ulpOfOne'.")
public let DBL_EPSILON = Double.ulpOfOne

@available(swift, deprecated: 3.0, message: "Please use 'Double.leastNormalMagnitude' or '.leastNormalMagnitude'.")
public let DBL_MIN = Double.leastNormalMagnitude

@available(swift, deprecated: 3.0, message: "Please use 'Double.leastNonzeroMagnitude' or '.leastNonzeroMagnitude'.")
public let DBL_TRUE_MIN = Double.leastNonzeroMagnitude

public let M_LN2 = SwiftAndroid.M_LN2
public let M_LOG10E = SwiftAndroid.M_LOG10E
public let M_2_SQRTPI = SwiftAndroid.M_2_SQRTPI
Loading

0 comments on commit a13f749

Please sign in to comment.