Closed
Description
Description
Building the debug variant on Linux will result in failure. If you work around #74659, the next issue encountered is:
/home/ryan_mansfield/swift/swift/SwiftCompilerSources/Sources/Basic/Utils.swift:57:44: error: cannot find 'stderr' in scope
public var standardError = CFileStream(fp: stderr)
^~~~~~
/home/ryan_mansfield/swift/swift/SwiftCompilerSources/Sources/Basic/Utils.swift:62:55: error: cannot find type 'FILE' in scope
public typealias FILEPointer = UnsafeMutablePointer<FILE>
^~~~
/home/ryan_mansfield/swift/swift/SwiftCompilerSources/Sources/Basic/Utils.swift:69:5: error: cannot find 'fputs' in scope
fputs(string, fp)
^~~~~
/home/ryan_mansfield/swift/swift/SwiftCompilerSources/Sources/Basic/Utils.swift:73:5: error: cannot find 'fflush' in scope
fflush(fp)
^~~~~~
This is because in Debug mode, BRIDGING_MODE=PURE is enabled and then in PURE_BRIDGING_MODE is defined and as a result in include/swift/Basic/BasicBridging.h USED_IN_CPP_SOURCE is not defined, and stdio.h is not implicitly included.
It appears this worked up until 0c8c985 with removal of the import CxxStdlib
@eeckstein fyi
Reproduction
On linux build without args (default to debug)
utils/build-script
Expected behavior
Successful build
Environment
Ubuntu 22.04
Additional information
No response