mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
FreeBSD cxx stdlib and tests fixes
This commit is contained in:
@@ -77,7 +77,7 @@ add_swift_target_library(swiftCxxStdlib STATIC NO_LINK_NAME IS_STDLIB IS_SWIFT_O
|
||||
DEPLOYMENT_VERSION_XROS ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_XROS}
|
||||
|
||||
LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
|
||||
TARGET_SDKS ALL_APPLE_PLATFORMS LINUX WINDOWS ANDROID
|
||||
TARGET_SDKS ALL_APPLE_PLATFORMS LINUX WINDOWS ANDROID FREEBSD
|
||||
MACCATALYST_BUILD_FLAVOR zippered
|
||||
INSTALL_IN_COMPONENT compiler
|
||||
INSTALL_WITH_SHARED
|
||||
|
||||
@@ -57,6 +57,7 @@ headers = [
|
||||
'nl_types.h',
|
||||
'poll.h',
|
||||
'pthread.h',
|
||||
'pthread_np.h',
|
||||
'pwd.h',
|
||||
'regex.h',
|
||||
'sched.h',
|
||||
|
||||
@@ -94,7 +94,8 @@ set(swift_runtime_backtracing_sources
|
||||
Backtrace.cpp
|
||||
BacktraceUtils.cpp
|
||||
CrashHandlerMacOS.cpp
|
||||
CrashHandlerLinux.cpp)
|
||||
CrashHandlerLinux.cpp
|
||||
)
|
||||
|
||||
# Acknowledge that the following sources are known.
|
||||
set(LLVM_OPTIONAL_SOURCES
|
||||
|
||||
@@ -8,11 +8,12 @@
|
||||
|
||||
// TODO: Need to find out how to combine %env- and %target-run and %import-libdispatch reliably.
|
||||
// UNSUPPORTED: OS=linux-gnu
|
||||
// UNSUPPORTED: OS=freebsd
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: executable_test
|
||||
// REQUIRES: libdispatch
|
||||
//
|
||||
//
|
||||
// REQUIRES: concurrency_runtime
|
||||
// UNSUPPORTED: back_deployment_runtime
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
// TODO: Need to find out how to combine %env- and %target-run and %import-libdispatch reliably.
|
||||
// UNSUPPORTED: OS=linux-gnu
|
||||
// UNSUPPORTED: OS=freebsd
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: executable_test
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
// Locating the built libraries failed on Linux (construction of test case),
|
||||
// but we primarily care about macOS in this test
|
||||
// UNSUPPORTED: OS=linux-gnu
|
||||
// UNSUPPORTED: OS=freebsd
|
||||
|
||||
// UNSUPPORTED: use_os_stdlib
|
||||
// UNSUPPORTED: back_deployment_runtime
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-ide-test -print-module -module-to-print=FakeToolchain -tools-directory %S/Inputs/fake-toolchain/bin -source-filename=x -enable-experimental-cxx-interop -Xcc -stdlib=libc++ | %FileCheck %s
|
||||
// RUN: %target-swift-ide-test -print-module -module-to-print=FakeToolchain -tools-directory %S/Inputs/fake-toolchain/bin -source-filename=x -enable-experimental-cxx-interop -Xcc -stdlib=libc++ -Xcc -I%S/Inputs/fake-toolchain/include/c++/v1 | %FileCheck %s
|
||||
|
||||
// Clang driver on Windows doesn't support -stdlib=libc++
|
||||
// XFAIL: OS=windows-msvc
|
||||
|
||||
@@ -16,7 +16,7 @@ StdOptionalTestSuite.test("pointee") {
|
||||
let pointee = nonNilOpt.pointee
|
||||
expectEqual(123, pointee)
|
||||
|
||||
#if !os(Linux) // crashes on Ubuntu 18.04 (rdar://113414160)
|
||||
#if !os(Linux) && !os(FreeBSD) // crashes on Ubuntu 18.04 (rdar://113414160)
|
||||
var modifiedOpt = getNilOptional()
|
||||
modifiedOpt.pointee = 777
|
||||
expectEqual(777, modifiedOpt.pointee)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-frontend -typecheck %s
|
||||
// RUN: %target-swift-frontend -typecheck %s %import-libdispatch
|
||||
|
||||
// REQUIRES: libdispatch
|
||||
// UNSUPPORTED: OS=linux-gnu
|
||||
@@ -27,14 +27,22 @@ if #available(OSX 10.10, iOS 8.0, *) {
|
||||
// dispatch/source.h
|
||||
_ = DispatchSource.makeUserDataAddSource()
|
||||
_ = DispatchSource.makeUserDataOrSource()
|
||||
#if !os(FreeBSD)
|
||||
_ = DispatchSource.makeMachSendSource(port: mach_port_t(0), eventMask: [])
|
||||
_ = DispatchSource.makeMachReceiveSource(port: mach_port_t(0))
|
||||
_ = DispatchSource.makeMemoryPressureSource(eventMask: [])
|
||||
#endif
|
||||
_ = DispatchSource.makeProcessSource(identifier: 0, eventMask: [])
|
||||
_ = DispatchSource.makeReadSource(fileDescriptor: 0)
|
||||
#if os(FreeBSD)
|
||||
_ = DispatchSource.makeSignalSource(signal: 2)
|
||||
#else
|
||||
_ = DispatchSource.makeSignalSource(signal: SIGINT)
|
||||
#endif
|
||||
_ = DispatchSource.makeTimerSource()
|
||||
#if !os(FreeBSD)
|
||||
_ = DispatchSource.makeFileSystemObjectSource(fileDescriptor: 0, eventMask: [])
|
||||
#endif
|
||||
_ = DispatchSource.makeWriteSource(fileDescriptor: 0)
|
||||
|
||||
// dispatch/time.h
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// REQUIRES: executable_test
|
||||
// UNSUPPORTED: OS=windows-msvc
|
||||
// UNSUPPORTED: OS=wasi
|
||||
// UNSUPPORTED: OS=freebsd
|
||||
|
||||
import StdlibUnittest
|
||||
import SwiftPrivateLibcExtras
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// RUN: %target-typecheck-verify-swift
|
||||
|
||||
// FIXME: No simd module on linux rdar://problem/20795411
|
||||
// XFAIL: OS=linux-gnu, OS=windows-msvc, OS=openbsd, OS=linux-android, OS=linux-androideabi
|
||||
// XFAIL: OS=linux-gnu, OS=windows-msvc, OS=openbsd, OS=linux-android, OS=linux-androideabi, OS=freebsd
|
||||
// XFAIL: OS=wasi
|
||||
|
||||
import simd
|
||||
|
||||
Reference in New Issue
Block a user