Skip to content

Conditionalize pipe(2) usage for WASI #698

Closed
@kateinoigakukun

Description

@kateinoigakukun

Description

WASI does not have pipe system call, and wasi-libc doesn't provide any stub for it. So WASI build started failing after #694.

/home/build-user/swift-testing/Sources/Testing/Support/FileHandle.swift:449:20: error: cannot find 'pipe' in scope
447 |         }
448 | #else
449 |         guard 0 == pipe(fds.baseAddress) else {
    |                    `- error: cannot find 'pipe' in scope
450 |           throw CError(rawValue: swt_errno())
451 |         }

https://ci.swift.org/job/oss-swift-pr-test-crosscompile-wasm-ubuntu-20_04/1525/console

Expected behavior

Conditionalize the use of pipe(2) by something like SWT_NO_PIPE in swift-testing side.

Actual behavior

No response

Steps to reproduce

No response

swift-testing version/commit hash

No response

Swift & OS version (output of swift --version ; uname -a)

No response

Metadata

Metadata

Assignees

Labels

bug🪲 Something isn't workingwasi/wasm🧭 WebAssembly support

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions