-
Notifications
You must be signed in to change notification settings - Fork 10.5k
stdlib: use stubs for unit tests as well #2006
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
@@ -0,0 +1,50 @@ | |||
//===--- Subprocess.cpp - Subprocess Stubs --------------------------------===// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean to name the file Subprocess.cpp
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I named it .c to avoid the extern "C" block. I don't have a strong opinion on that, and can change it you believe it is better.
@swift-ci Please test |
44c0dbd
to
ee79541
Compare
I don't understand the failure on the OS X target. Shouldn't /usr/include/crt_externs.h always exist on the build hosts? The header is used in TaskQueue.inc as well. |
@swift-ci Please test |
ee79541
to
9101562
Compare
Interesting, it seems that not all SDKs provide the header. Ive changed it to a forward declaration instead of the header to permit building against any of the SDKs. |
@swift-ci Please test and merge |
Seems like another instance of the packaging issues: swift-build: error: exit(1): which swiftc during the package tests. |
Sorry, it is more than that: https://ci.swift.org/job/swift-PR-osx/732/console
|
Oh, sorry, I didn't see that when I looked through the failures. Is this really just a declaration issue? Since it would seem that if the function was truly unavailable, then the link would fail (since they are not declared weak). |
Yes, it is just a declaration. If we can persuade the compiler to create a reference, everything will link just fine. |
9101562
to
f3d63fd
Compare
Sorry about the delay. I believe that this version should work on tvOS as well now. |
This unifies the behaviour for imports across the private libc extras and the public libc shims.
f3d63fd
to
9d987fe
Compare
ping? |
@swift-ci Please test and merge |
What's in this pull request?
Resolved bug number: (SR-)
Before merging this pull request to apple/swift repository:
Triggering Swift CI
The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:
Smoke Testing
Validation Testing
Note: Only members of the Apple organization can trigger swift-ci.
This unifies the behaviour for imports across the private libc extras and the
public libc shims.