# Compiler Build System Roadmap

**URL:** <https://forums.swift.org/t/compiler-build-system-roadmap/90805>\
**Category:** Compiler\
**Created:** [November 16, 2026, 8:00pm UTC](https://forums.swift.org/t/compiler-build-system-roadmap/90805 "2026-11-16T20:00:53Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Finagolfin](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/finagolfin/32/34388_2.png) [@Finagolfin](https://forums.swift.org/u/Finagolfin)\
**Post date:** [November 19, 2026, 11:54am UTC](https://forums.swift.org/t/compiler-build-system-roadmap/90805/4 "2026-11-19T11:54:53Z")

</div>

> [@etcwilde](#):
>
> I don't see a lot of value in adding another runtime build until we are testing with it and/or shipping it in the [Swift.org](http://Swift.org) SDKs.

Does the linked macOS Runtimes/ build do either? It may be useful to add something like that for linux too, to at least make sure nothing breaks on the daily linux CI.

> [@etcwilde](#):
>
> 1. This is the importance of distinguishing the runtime that the compiler runs on from the SDK that the compiler build programs against.

[I filed an issue for this](https://github.com/swiftlang/swift/issues/74586) when the change was made for linux. In practice, it doesn't appear to have caused a problem, though I agree that it would be better not to rely on that. 😛

> [@etcwilde](#):
>
> The Swift toolchain needs to ship and reference its own Clang resource directory for the Clang Importer embedded in Swift and for Clang. If targeting a platform where the host toolchain lacks the necessary builtins, the right solution is to build the matching `compiler-rt` builtins and headers for that target LLVM revision, rather than attempting to borrow them from an external toolchain.

While we can get into what should be done with that build config elsewhere- both the current Android SDK builds on Windows and linux hosts use the Android NDK's clang resource directory at least partially- my point is that we need to start listing this clang resource directory as a fourth distinct requirement for cross-compilation to work, as it isn't contained in the platform sysroot nor is it mentioned anywhere in your toolchain section above. Repeatedly leaving it out or just mentioning it briefly in passing- like [the single offhand mention in this doc](https://github.com/swiftlang/swift/blob/main/docs/CrossCompilationModel.md#components), "Some of this content is required to process the system headers themselves (e.g. clang's builtin resource headers)"- leads to problems like us leaving configuring it for external platform C/C++ SDKs out of the SDK bundle config proposal.

I know we still have unresolved issues with how to build or match those platform clang resource directory contents properly, but that clang directory also needs to be included more prominently as a distinct requirement for cross-compilation targeting is all I'm saying here.

> [@etcwilde](#):
>
> Only a small subset of this is really needed for day-to-day development, but this should be fairly comprehensive.

Realistically, almost nobody is going to ~~read the~~ RTFM, particularly for a tool like CMake that everyone just tolerates, so I'm suggesting that if you want to avoid the

> [@etcwilde](#):
>
> several issues with how targets compute and propagate flags

you mentioned above from cropping up again, that you write a short primer for the Swift team, so we can just read that. 😉

> [@etcwilde](#):
>
> Either way, we still need to be able to describe what the vendor needs because the requirements of the compiler and macro usage are still different.

I was pointing out that once it is statically linked, there would no longer be any such requirements for separate compiler-used shared libraries, but I see on that pull that you have concerns if that static linking approach would work.

> [@etcwilde](#):
>
> I'm not planning on adding additional SwiftPM builds to the core compiler build.

Yep, already said that I wouldn't expect it from you, just asking if [the related SwiftPM requirement for Swift code in the compiler listed here four years ago](https://forums.swift.org/t/implementing-parts-of-the-swift-compiler-in-swift/59524) will continue to be enforced and perhaps expanded, or if this CMake effort will supercede that. I figured you might have discussed that with the Swift team, so just asking what the plan is here.

---

_[View the full topic](https://forums.swift.org/t/compiler-build-system-roadmap/90805)._
