compnerd / compnerd/swift-build

Remove workaround to delete more recent Windows SDK version folders

Open
#958 0 comments 0 reactions 1 assignee Claimed by @Steelskin View on GitHub
Dominant language
No language data
Stars
232
Forks
54
Avg merge
1d 12h
Merged PRs (30d)
14

Description

By default, LLVM looks for the ucrt headers by picking the most recent version folder on disk, rather than use environment variables, the way MSVC does it.

This is problematic for the Windows Swift toolchain because Swift relies on a `ucrt.modulemap` file, part of the toolchain installation, to properly parse the ucrt headers. However, `ucrt.modulemap` is only compatible with a subset of UCRT headers. While it is updated whenever a new Windows SDK is released, there is a period of time where the Swift toolchain does not work with the most recent Windows SDK. The bootstrapping toolchain used to build the Swift compiler is typically one version behind the one being built, resulting in a `ucrt.modulemap` that might not match the most recent available SDK.

As a result, the only reliable way of preventing LLVM from picking up an incompatible version of the Windows SDK is to delete the folders for unsupported SDK versions that are too recent.

This issue tracks removing this workaround when a more permanent solution to this problem has been found.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.