mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
stdlib/benchmark: add canImport(Musl) where needed (#67120)
This allows compiling stdlib and benchmarks when targeting musl instead of Glibc.
This commit is contained in:
@@ -11,8 +11,10 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
import TestsUtils
|
||||
#if os(Linux)
|
||||
#if canImport(Glibc)
|
||||
import Glibc
|
||||
#elseif canImport(Musl)
|
||||
import Musl
|
||||
#elseif os(Windows)
|
||||
import MSVCRT
|
||||
#else
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
//
|
||||
// Originally written by @owensd. Used with his permission.
|
||||
|
||||
#if os(Linux)
|
||||
#if canImport(Glibc)
|
||||
import Glibc
|
||||
#elseif canImport(Musl)
|
||||
import Musl
|
||||
#elseif os(Windows)
|
||||
import MSVCRT
|
||||
#else
|
||||
|
||||
@@ -11,8 +11,10 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
import TestsUtils
|
||||
#if os(Linux)
|
||||
#if canImport(Glibc)
|
||||
import Glibc
|
||||
#elseif canImport(Musl)
|
||||
import Musl
|
||||
#elseif os(Windows)
|
||||
import MSVCRT
|
||||
#else
|
||||
|
||||
@@ -11,8 +11,10 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
import TestsUtils
|
||||
#if os(Linux)
|
||||
#if canImport(Glibc)
|
||||
import Glibc
|
||||
#elseif canImport(Musl)
|
||||
import Musl
|
||||
#elseif os(Windows)
|
||||
import MSVCRT
|
||||
#else
|
||||
|
||||
@@ -11,8 +11,10 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
import TestsUtils
|
||||
#if os(Linux)
|
||||
#if canImport(Glibc)
|
||||
import Glibc
|
||||
#elseif canImport(Musl)
|
||||
import Musl
|
||||
#elseif os(Windows)
|
||||
import MSVCRT
|
||||
#else
|
||||
|
||||
@@ -10,8 +10,10 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#if os(Linux)
|
||||
#if canImport(Glibc)
|
||||
import Glibc
|
||||
#elseif canImport(Musl)
|
||||
import Musl
|
||||
#elseif os(Windows)
|
||||
import MSVCRT
|
||||
#else
|
||||
|
||||
@@ -10,8 +10,10 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#if os(Linux)
|
||||
#if canImport(Glibc)
|
||||
import Glibc
|
||||
#elseif canImport(Musl)
|
||||
import Musl
|
||||
#elseif os(Windows)
|
||||
import MSVCRT
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user