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
[stdlib] Only add Apple reflection test targets #5175
[stdlib] Only add Apple reflection test targets #5175
Conversation
@swift-ci Please test |
/cc @erg |
"swiftSwiftReflectionTest${VARIANT_SUFFIX}" | ||
"swift-reflection-test${VARIANT_SUFFIX}") | ||
endforeach() | ||
if("${SDK}" IN_LIST SWIFT_APPLE_PLATFORMS) |
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.
Where does SWIFT_APPLE_PLATFORMS
come from?
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.
Apologies, looks like I lost a line of source code when I split up #4972. I amended the commit with the missing CMake changes that add SWIFT_APPLE_PLATFORMS
. 😨
619b25d
to
aef94ff
Compare
When building on a macOS host, and when `SWIFT_INCLUDE_TESTS` is specified, the `swiftSwiftReflectionTest` target is added to all platforms. However, this target has a dependency upon Foundation, which is not available on non-Apple platforms. Use `add_swift_library`'s `TARGET_SDKS` parameter and other gating logic to ensure the target is only added for platforms that actually have Darwin available.
aef94ff
to
c42d0d2
Compare
@swift-ci Please test |
Build failed |
Build failed |
Looks good if it builds clean! |
Build failed |
@swift-ci Please clean test |
Thanks! |
Is there any cross-platform subset of |
I really dislike that we have this target code in the Swift tools directory. We should consider sinking this into a stdlib/tools directory or something like that. tools IMO should be meant only for "build tools", not for "target tools". |
I hope that at some point we follow the separate cmake cross compilation model for the stdlib and then sink this code into there. |
When building on a macOS host, and when
SWIFT_INCLUDE_TESTS
is specified, theswiftSwiftReflectionTest
target is added to all platforms. However, this target has a dependency upon Foundation, which is not available on non-Apple platforms.Use
add_swift_library
'sTARGET_SDKS
parameter and other gating logic to ensure the target is only added for platforms that actually have Darwin available.This was pulled out of the larger pull request #4972, which addresses SR-1362.