-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Fix a build failure on Windows (#4224) #4235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@swift-ci please smoke test |
I think that we should really revert the change - its incomplete - this should have an analogous counterpart to Windows. (Having a separate |
I initially considered alternatives such as In light of that, it might be better to revert and reimplement #3815 in other ways.
I think that would be the most ideal too. |
I think that we could just bring over |
By any chance, could your concern be addressed with code such as the following? func exec(...) {
#if !(os(Windows))
// signal(SIGINT, SIG_IGN) is used for handling SIGINT by DispatchSourceSignal,
// but this process is about to be replaced by exec, so SIG_IGN must be returned to default.
signal(SIGINT, SIG_DFL)
#endif
TSCBasic.exec(...)
}
...
public class SwiftTool {
...
// marked internal for testing
internal init(outputStream: OutputByteStream, options: GlobalOptions) throws {
...
do {
...
#if os(Windows)
...
#else
...
signal(SIGINT, SIG_IGN)
...
#endif
...
} catch {
...
}
...
}
...
}
... |
@swift-ci please smoke test macOS |
Yeah, I think that would be better than the current version. |
26967ce
to
e857589
Compare
@swift-ci smoke test |
no problem @KKK669 please bring this commit over to the 5.6 PR once merged |
Yes sure. Thank you. |
@swift-ci smoke test linux |
@swift-ci please smoke test Linux platform |
@swift-ci smoke test linux |
@swift-ci please smoke test Linux platform |
This is a hot fix for Windows build broken by #4224. #4231 also needs this change.
Motivation:
#4224 broke Windows build as @compnerd pointed out at #4224 (comment). The global function
exec
added in #4224 is actually unnecessary for Windows becausesignal(SIGINT, SIG_IGN)
is not compiled for Windows target.Modifications:
exec
with#if !(os(Windows))
and#endif
Result:
Combined with this change, #4224 no longer affects Windows.