-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[android] Guard spawn.h import #2242
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
[android] Guard spawn.h import #2242
Conversation
@@ -13,13 +13,16 @@ | |||
// NOTE: preprocess away the availability information to allow use of | |||
// unsupported APIs on certain targets (i.e. tvOS) | |||
#define availability(...) | |||
|
|||
// Spawn is not available on Android. | |||
#if !defined(__ANDROID__) |
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.
Could you move it above the #define
above?
Just me or isn't this Subprocess.swift also built on android? (There seems to be a os(Android) check). If so, that should also go through the stubs. Otherwise, why not just remove building this subdirectory for the Android build? |
We include this directory on Android for the |
Oh, I see. Yeah, Id just wrap the entire file (including the macro which is currently not guarded) with it. Alternatively, you could just not add it to the source list in the CMakeList.txt. But the change itself seems fine to me. |
Great! Looks like the tests passed as well. I'll move |
@modocache Sounds good! Please merge directly when you are ready! |
6ff954e
to
dc06b96
Compare
`spawn.h` isn't available on Android. Put its import behind an `#if defined(__ANDROID__)` in order to fix the Android build.
dc06b96
to
b2cf7b5
Compare
Thanks everyone! 🙇 |
What's in this pull request?
spawn.h
isn't available on Android. Put its import behind an#if defined(__ANDROID__)
in order to fix the Android build./cc @compnerd, who added the import in #2006. Does this modification work for you?
Resolved bug number: None
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.