-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Windows] Add default dispatch header search path to standalone builds #5033
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
[Windows] Add default dispatch header search path to standalone builds #5033
Conversation
@swift-ci please test |
The SwiftPM build still fails because we don't (yet) have a way to find headers for libxml and curl, but this at least gets us a step closer |
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.
Minor correction on the commit message: SDKROOT
is setup by Swift and should be available irrespective of the VSDevCmd setup.
@swift-ci please test Linux platform |
1bbb017
to
efdbd18
Compare
Updated to make the same change to the CMake file for standalone CMake builds |
@swift-ci please test |
@swift-ci please test Windows platform |
When building this package via SwiftPM on Windows, we need to include dispatch headers from the appropriate directory in the SDK. We cannot rely on an absolute path such as
/usr/lib/swift
on linux, so instead we use a reasonable default based on the SDKROOT environment variable. I believe this environment variable should be set automatically in a VS developer shell with Swift installed to point to theWindows.sdk
directory within the currently active swift installation. This allows us to find dispatch in many cases and get closer to a working package build on Windows (while still allowing manual overriding via theDISPATCH_INCLUDE_PATH
environment variable)