# Compiler

**URL:** https://forums.swift.org/c/development/compiler/9.md

[Latest](https://forums.swift.org/latest.md) · [Categories](https://forums.swift.org/categories.md) · [Tags](https://forums.swift.org/tags.md)

---

## [About the Compiler category](https://forums.swift.org/t/about-the-compiler-category/15)

<div class="topic-metadata">

**Author:** [@system](https://forums.swift.org/u/system)\
**Replies:** 1\
**Last updated:** [February 21, 2020, 10:03pm UTC](https://forums.swift.org/t/about-the-compiler-category/15 "2020-02-21T22:03:09Z")

</div>

For developers to discuss the development and implementation of the Swift compiler, low-level runtime, and SourceKit. This category will accept email sent to: swift+compiler@forums.swift.org

---

## [New Contributor Intro: Getting started with Compiler / Stdlib](https://forums.swift.org/t/new-contributor-intro-getting-started-with-compiler-stdlib/90491)

<div class="topic-metadata">

**Author:** [@muskanleyakat25-svg](https://forums.swift.org/u/muskanleyakat25-svg)\
**Replies:** 2\
**Last updated:** [November 6, 2026, 10:31am UTC](https://forums.swift.org/t/new-contributor-intro-getting-started-with-compiler-stdlib/90491 "2026-11-06T10:31:09Z")

</div>

Hi everyone! I am looking to get started with contributing to the Swift compiler and tool chain. I have a foundational background in C++, Git, and Data Structures & Algorithms. I am currently reading through the contrib…

---

## [Mutual TLS (mTLS) for iOS 26 with Swift Concurrency](https://forums.swift.org/t/mutual-tls-mtls-for-ios-26-with-swift-concurrency/90484)

<div class="topic-metadata">

**Author:** [@dheerendra](https://forums.swift.org/u/dheerendra)\
**Replies:** 3\
**Last updated:** [November 6, 2026, 4:03am UTC](https://forums.swift.org/t/mutual-tls-mtls-for-ios-26-with-swift-concurrency/90484 "2026-11-06T04:03:47Z")

</div>

Hi everyone :waving\_hand: I recently set up mutual TLS (client certificate authentication) in an iOS 26 app and wanted to share what I learned. It covers the steps, the code, and a few things that tripped me up. I hope …

---

## [Casts of collections of function types](https://forums.swift.org/t/casts-of-collections-of-function-types/89257)

<div class="topic-metadata">

**Author:** [@Nickolas\_Pohilets](https://forums.swift.org/u/Nickolas_Pohilets)\
**Replies:** 22\
**Last updated:** [November 5, 2026, 10:35am UTC](https://forums.swift.org/t/casts-of-collections-of-function-types/89257 "2026-11-05T10:35:18Z")

</div>

TL;DR Casting collections of function types crashes at runtime. I've been working on a fix for ~10 months across three PRs: First PR was approved and merged, but it didn't handle some use cases and was reverted. Second…

---

## [Annotating Reflection APIs Unavailable in Embedded](https://forums.swift.org/t/annotating-reflection-apis-unavailable-in-embedded/90307)

<div class="topic-metadata">

**Author:** [@filip-sakel](https://forums.swift.org/u/filip-sakel)\
**Replies:** 2\
**Last updated:** [November 2, 2026, 5:14pm UTC](https://forums.swift.org/t/annotating-reflection-apis-unavailable-in-embedded/90307 "2026-11-02T17:14:28Z")

</div>

While I was trying to add Embedded support to SwiftSyntax, I ran into a bit of a rough edge in terms of Embedded support. I noticed that reflection APIs are conditionalized behind SWIFT\_ENABLE\_REFLECTION, which doesn't c…

---

## [Request for review: Preserve async-let typed errors (#91964)](https://forums.swift.org/t/request-for-review-preserve-async-let-typed-errors-91964/90322)

<div class="topic-metadata">

**Author:** [@bpluta](https://forums.swift.org/u/bpluta)\
**Replies:** 1\
**Last updated:** [October 29, 2026, 1:39am UTC](https://forums.swift.org/t/request-for-review-preserve-async-let-typed-errors-91964/90322 "2026-10-29T01:39:23Z")

</div>

Hi everyone! I'm a new contributor to the Swift project and I'm not entirely familiar with the usual PR review process or how long it typically takes to get feedback. I have grown increasingly frustrated by the fact th…

---

## [Implications of hiding implementation details from .swiftmodule files on LLDB](https://forums.swift.org/t/implications-of-hiding-implementation-details-from-swiftmodule-files-on-lldb/90226)

<div class="topic-metadata">

**Author:** [@NuriAmari](https://forums.swift.org/u/NuriAmari)\
**Replies:** 2\
**Last updated:** [October 26, 2026, 8:15pm UTC](https://forums.swift.org/t/implications-of-hiding-implementation-details-from-swiftmodule-files-on-lldb/90226 "2026-10-26T20:15:36Z")

</div>

Hi all. In Policy on hiding implementation details from Swift module interface, I discussed the implications of removing private declarations from .swiftmodule files on diagnostics. I've been working more towards this,…

---

## [CMake guidance - tweaking the process to build the docs for the standard library](https://forums.swift.org/t/cmake-guidance-tweaking-the-process-to-build-the-docs-for-the-standard-library/89845)

<div class="topic-metadata">

**Author:** [@Joseph\_Heck](https://forums.swift.org/u/Joseph_Heck)\
**Replies:** 4\
**Last updated:** [October 15, 2026, 11:08pm UTC](https://forums.swift.org/t/cmake-guidance-tweaking-the-process-to-build-the-docs-for-the-standard-library/89845 "2026-10-15T23:08:49Z")

</div>

I know a bit of CMake, but I'd really like some guidance or thoughts on a potential solution I'm trying to work out: This is all about the Swift build, and generating the documentation for the standard library (which ul…

---

## [\[Pitch\] Make protocol conformance resolution demand-driven](https://forums.swift.org/t/pitch-make-protocol-conformance-resolution-demand-driven/87792)

<div class="topic-metadata">

**Author:** [@AdamCmiel](https://forums.swift.org/u/AdamCmiel)\
**Replies:** 5\
**Last updated:** [October 15, 2026, 3:43am UTC](https://forums.swift.org/t/pitch-make-protocol-conformance-resolution-demand-driven/87792 "2026-10-15T03:43:01Z")

</div>

I'd welcome feedback on the incremental approach outlined below, particularly whether the Inherited-stage unification is the right first step, and whether anyone sees cycle risks I've missed, or if this has been tried al…

---

## [Decoupling Swift Compiler and Runtime Testing](https://forums.swift.org/t/decoupling-swift-compiler-and-runtime-testing/90047)

<div class="topic-metadata">

**Author:** [@etcwilde](https://forums.swift.org/u/etcwilde)\
**Replies:** 4\
**Last updated:** [October 14, 2026, 5:32pm UTC](https://forums.swift.org/t/decoupling-swift-compiler-and-runtime-testing/90047 "2026-10-14T17:32:11Z")

</div>

Decoupling Swift Compiler and Runtime Testing The Swift compiler and runtime execution testing are tightly coupled to the internal layout of the compiler build directory. This prevents testing installed SDK layouts, comp…

---

## [Compilation caching integration with toolchain-cas-plugin](https://forums.swift.org/t/compilation-caching-integration-with-toolchain-cas-plugin/89937)

<div class="topic-metadata">

**Author:** [@owenv](https://forums.swift.org/u/owenv)\
**Replies:** 4\
**Last updated:** [October 13, 2026, 4:49pm UTC](https://forums.swift.org/t/compilation-caching-integration-with-toolchain-cas-plugin/89937 "2026-10-13T16:49:31Z")

</div>

In order to better support distributed compilation caching with Swift open source toolchains, @akyrtzi , @cachemeifyoucan and I have requested a new swiftlang repository, swiftlang/toolchain-cas-plugin. This repository w…

---

## [Policy on hiding implementation details from Swift module interface](https://forums.swift.org/t/policy-on-hiding-implementation-details-from-swift-module-interface/89984)

<div class="topic-metadata">

**Author:** [@NuriAmari](https://forums.swift.org/u/NuriAmari)\
**Replies:** 11\
**Last updated:** [October 12, 2026, 9:35pm UTC](https://forums.swift.org/t/policy-on-hiding-implementation-details-from-swift-module-interface/89984 "2026-10-12T21:35:35Z")

</div>

Hi all. I continue to work on bringing about this vision for a stable @\_implementationOnly via abstract type layouts, but I've reached a point where I'd like to discuss the direction. Specifically, I want to discuss ho…

---

## [Scope restrictions](https://forums.swift.org/t/scope-restrictions/89944)

<div class="topic-metadata">

**Author:** [@John\_McCall](https://forums.swift.org/u/John_McCall)\
**Replies:** 3\
**Last updated:** [October 9, 2026, 12:14pm UTC](https://forums.swift.org/t/scope-restrictions/89944 "2026-10-09T12:14:36Z")

</div>

Since we've kicked off the implementation effort for this effort, let me make a thread for organizing the implementation design. I want to start us off with a bunch of AST design points. This isn't exhaustive of the thin…

---

## [One extension on another module's type makes every user of that type recompile on any declaration change in your module (incremental imports)](https://forums.swift.org/t/one-extension-on-another-modules-type-makes-every-user-of-that-type-recompile-on-any-declaration-change-in-your-module-incremental-imports/89909)

<div class="topic-metadata">

**Author:** [@kimdugong](https://forums.swift.org/u/kimdugong)\
**Replies:** 0\
**Last updated:** [October 6, 2026, 12:16am UTC](https://forums.swift.org/t/one-extension-on-another-modules-type-makes-every-user-of-that-type-recompile-on-any-declaration-change-in-your-module-incremental-imports/89909 "2026-10-06T00:16:22Z")

</div>

We split a feature out of a ~1,200-file iOS app target into a local SwiftPM package expecting the usual payoff: edits inside the package shouldn't recompile the app. Body edits did behave (0 app files). But adding any de…

---

## [Indirect enums vs classes](https://forums.swift.org/t/indirect-enums-vs-classes/89884)

<div class="topic-metadata">

**Author:** [@LeoAvMo](https://forums.swift.org/u/LeoAvMo)\
**Replies:** 6\
**Last updated:** [October 5, 2026, 12:26pm UTC](https://forums.swift.org/t/indirect-enums-vs-classes/89884 "2026-10-05T12:26:12Z")

</div>

Hi! I'm new to the here and I'm currently doing a project in Swift for my compilers course. I was doing an implementation of a stack and a queue, since I had already done it in C++ in my third semester of uni. After cha…

---

## [Building Linux toolchain with --bootstrapping=bootstrapping option](https://forums.swift.org/t/building-linux-toolchain-with-bootstrapping-bootstrapping-option/89815)

<div class="topic-metadata">

**Author:** [@kifio](https://forums.swift.org/u/kifio)\
**Replies:** 4\
**Last updated:** [September 30, 2026, 8:02am UTC](https://forums.swift.org/t/building-linux-toolchain-with-bootstrapping-bootstrapping-option/89815 "2026-09-30T08:02:01Z")

</div>

Hi, everyone. I'm new here. Sorry, if it's duplicate, but all the related topics I found looks a bit outdated (they are from 2020 or 2023 years). I want to build Swift release toolchain on clear Ubuntu without preinstal…

---

## [ClangImporter regression (6.3+): identical imported ObjC generic types treated as distinct in batch mode](https://forums.swift.org/t/clangimporter-regression-6-3-identical-imported-objc-generic-types-treated-as-distinct-in-batch-mode/89740)

<div class="topic-metadata">

**Author:** [@tamadon](https://forums.swift.org/u/tamadon)\
**Replies:** 0\
**Last updated:** [September 24, 2026, 1:41am UTC](https://forums.swift.org/t/clangimporter-regression-6-3-identical-imported-objc-generic-types-treated-as-distinct-in-batch-mode/89740 "2026-09-24T01:41:17Z")

</div>

I filed Type checker treats identical imported ObjC generic types as distinct after another file in the batch references a same-named type from another module · Issue #92419 · swiftlang/swift · GitHub with a 4 KB reprodu…

---

## [Symbol graph output and swift 6.4](https://forums.swift.org/t/symbol-graph-output-and-swift-6-4/89667)

<div class="topic-metadata">

**Author:** [@adam-fowler](https://forums.swift.org/u/adam-fowler)\
**Replies:** 2\
**Last updated:** [September 20, 2026, 9:46am UTC](https://forums.swift.org/t/symbol-graph-output-and-swift-6-4/89667 "2026-09-20T09:46:17Z")

</div>

Since updating to swift 6.4 it seems symbol graph output no longer works. Previously swift build -Xswiftc -emit-symbol-graph -Xswiftc -emit-symbol-graph-dir -Xswiftc .build/symbol-graphs would output all the module sym…

---

## [Reading a Closure Out of a Generic Lock Box Causes Stack Overflow](https://forums.swift.org/t/reading-a-closure-out-of-a-generic-lock-box-causes-stack-overflow/89549)

<div class="topic-metadata">

**Author:** [@bdkjones](https://forums.swift.org/u/bdkjones)\
**Replies:** 4\
**Last updated:** [September 16, 2026, 5:31pm UTC](https://forums.swift.org/t/reading-a-closure-out-of-a-generic-lock-box-causes-stack-overflow/89549 "2026-09-16T17:31:43Z")

</div>

After a few crash reports from users, Fable 5.1 has suggested that the Swift compiler has a bug. Now, a surefire way to look stupid is to tell a bunch of compiler experts that they have a bug. So before I file an actual …

---

## [Can the optimizer assume that a borrow lifetime dependence never writes to its source?](https://forums.swift.org/t/can-the-optimizer-assume-that-a-borrow-lifetime-dependence-never-writes-to-its-source/89508)

<div class="topic-metadata">

**Author:** [@Auties00](https://forums.swift.org/u/Auties00)\
**Replies:** 0\
**Last updated:** [September 13, 2026, 10:30pm UTC](https://forums.swift.org/t/can-the-optimizer-assume-that-a-borrow-lifetime-dependence-never-writes-to-its-source/89508 "2026-09-13T22:30:42Z")

</div>

Hello, I've been looking into swiftlang/swift#91665, which is a dead swift\_bridgeObjectRelease that gets left behind in a hot String to Span loop, and I ended up with a fix that depends on a semantic assumption I can'…

---

## [Building the Swift toolchain from source on NixOS (flake + recipe)](https://forums.swift.org/t/building-the-swift-toolchain-from-source-on-nixos-flake-recipe/87481)

<div class="topic-metadata">

**Author:** [@lucasly-ba](https://forums.swift.org/u/lucasly-ba)\
**Replies:** 9\
**Last updated:** [August 30, 2026, 3:47am UTC](https://forums.swift.org/t/building-the-swift-toolchain-from-source-on-nixos-flake-recipe/87481 "2026-08-30T03:47:18Z")

</div>

Hi everyone, I have been building the full Swift 6.5 toolchain from source on NixOS: compiler, stdlib, CxxStdlib, libdispatch, and Foundation, with zero patches against upstream. The repo is a Nix flake plus a build scr…

---

## [Why the compiler doesn't just assume @inliable by default for all symbols in non-resilient modules/builds?](https://forums.swift.org/t/why-the-compiler-doesnt-just-assume-inliable-by-default-for-all-symbols-in-non-resilient-modules-builds/89141)

<div class="topic-metadata">

**Author:** [@MahdiBM](https://forums.swift.org/u/MahdiBM)\
**Replies:** 7\
**Last updated:** [August 24, 2026, 10:31pm UTC](https://forums.swift.org/t/why-the-compiler-doesnt-just-assume-inliable-by-default-for-all-symbols-in-non-resilient-modules-builds/89141 "2026-08-24T22:31:42Z")

</div>

Lots of Swift codes use @inlinable nowadays, a simple search in apple / swiftlang org shows a lot of its occurrences: Code search results · GitHub Are there any downsides to have @inlinable/@useableFromInline by default…

---

## [Progress on Opaque SIL Values](https://forums.swift.org/t/progress-on-opaque-sil-values/88589)

<div class="topic-metadata">

**Author:** [@kavon](https://forums.swift.org/u/kavon)\
**Replies:** 1\
**Last updated:** [August 24, 2026, 6:20pm UTC](https://forums.swift.org/t/progress-on-opaque-sil-values/88589 "2026-08-24T18:20:09Z")

</div>

Hi everyone, SIL opaque values (-enable-sil-opaque-values) is a compiler infrastructure project that defers the lowering of resilient and generic types to addresses, until the AddressLowering pass, so they are treated l…

---

## [Is it ok to have an unfinished borrow in a basic block terminated with \`unreachable\` instruction?](https://forums.swift.org/t/is-it-ok-to-have-an-unfinished-borrow-in-a-basic-block-terminated-with-unreachable-instruction/89147)

<div class="topic-metadata">

**Author:** [@Nickolas\_Pohilets](https://forums.swift.org/u/Nickolas_Pohilets)\
**Replies:** 2\
**Last updated:** [August 24, 2026, 5:08pm UTC](https://forums.swift.org/t/is-it-ok-to-have-an-unfinished-borrow-in-a-basic-block-terminated-with-unreachable-instruction/89147 "2026-08-24T17:08:07Z")

</div>

I've added some unit tests in my PR, and they are triggering LinearLifetimeChecker. This seems to be an existing issue, not related to my changes, but reproducible by newly added tests. Reported as A leak due to a consu…

---

## [How can I express "@inline(always) but not when -Osize"?](https://forums.swift.org/t/how-can-i-express-inline-always-but-not-when-osize/89082)

<div class="topic-metadata">

**Author:** [@MahdiBM](https://forums.swift.org/u/MahdiBM)\
**Replies:** 2\
**Last updated:** [August 20, 2026, 3:14pm UTC](https://forums.swift.org/t/how-can-i-express-inline-always-but-not-when-osize/89082 "2026-08-20T15:14:27Z")

</div>

As part of my work on GitHub - swift-dns/swift-endpoint: A highly-optimized library containing types representing an endpoint, such as DomainName and IPv4/v6Address · GitHub parts of which might soon make it to a swiftla…

---

## [Bumping minimum required CMake version (3.24 or 3.29)](https://forums.swift.org/t/bumping-minimum-required-cmake-version-3-24-or-3-29/87494)

<div class="topic-metadata">

**Author:** [@etcwilde](https://forums.swift.org/u/etcwilde)\
**Replies:** 7\
**Last updated:** [August 19, 2026, 5:16pm UTC](https://forums.swift.org/t/bumping-minimum-required-cmake-version-3-24-or-3-29/87494 "2026-08-19T17:16:13Z")

</div>

Hi folks, we're looking at bumping the minimum required CMake version for building the compiler. There are currently two parallel PRs posted for bumping the version to 3.24 and 3.29. The motivation for bumping to 3.24 i…

---

## [Utils/build-\* scripts are confusing; trying to build on Alpine](https://forums.swift.org/t/utils-build-scripts-are-confusing-trying-to-build-on-alpine/82986)

<div class="topic-metadata">

**Author:** [@IngwiePhoenix](https://forums.swift.org/u/IngwiePhoenix)\
**Replies:** 10\
**Last updated:** [August 18, 2026, 3:50pm UTC](https://forums.swift.org/t/utils-build-scripts-are-confusing-trying-to-build-on-alpine/82986 "2026-08-18T15:50:18Z")

</div>

Hello! So the long story short is that I would like to build Swift for Alpine, since there are no packages for it by default - neither in the main or community repo and although there seems to be a static SDK, it is adv…

---

## [How to make incremental builds work on a Mac mini CI with Xcode 26](https://forums.swift.org/t/how-to-make-incremental-builds-work-on-a-mac-mini-ci-with-xcode-26/83653)

<div class="topic-metadata">

**Author:** [@peco](https://forums.swift.org/u/peco)\
**Replies:** 1\
**Last updated:** [August 7, 2026, 9:59am UTC](https://forums.swift.org/t/how-to-make-incremental-builds-work-on-a-mac-mini-ci-with-xcode-26/83653 "2026-08-07T09:59:25Z")

</div>

Hi all, I’m looking for help from people familiar with Swift/Xcode. Our team runs CI builds on a single Mac mini. Incremental builds on local machines are fast (around 1–2 minutes), but on the Mac mini CI it seems inc…

---

## [Code coverage: functions generated by attached macros get no instrumentation](https://forums.swift.org/t/code-coverage-functions-generated-by-attached-macros-get-no-instrumentation/88824)

<div class="topic-metadata">

**Author:** [@sisoje](https://forums.swift.org/u/sisoje)\
**Replies:** 2\
**Last updated:** [August 6, 2026, 10:46pm UTC](https://forums.swift.org/t/code-coverage-functions-generated-by-attached-macros-get-no-instrumentation/88824 "2026-08-06T22:46:33Z")

</div>

Code generated by attached macros is invisible to code coverage: no counters are emitted for generated functions under any filename. This isn't mis-attribution — instrumentation is never produced. Setup — an attached me…

---

## [Linux RISCV64 Support](https://forums.swift.org/t/linux-riscv64-support/56030)

<div class="topic-metadata">

**Author:** [@ColemanCDA](https://forums.swift.org/u/ColemanCDA)\
**Replies:** 13\
**Last updated:** [August 3, 2026, 9:17pm UTC](https://forums.swift.org/t/linux-riscv64-support/56030 "2026-08-03T21:17:18Z")

</div>

I have been working on patches for compiling Swift 5.6 for RISCV64 with Buildroot. First I compiled the patched compiler (swift, llvm-project and swift-core-tools-support) and then use Buildroot with patched compiler to …

[Next page](https://forums.swift.org/c/development/compiler/9.md?page=1)
