# \#build-script

**URL:** https://forums.swift.org/tag/build-script/77.md

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

---

## [\[GSoC 2026\] Sysroot Support in Swift's build-script — Draft Proposal](https://forums.swift.org/t/gsoc-2026-sysroot-support-in-swifts-build-script-draft-proposal/85636)

<div class="topic-metadata">

**Author:** [@AnasNasr](https://forums.swift.org/u/AnasNasr)\
**Replies:** 0\
**Last updated:** [March 27, 2026, 5:34am UTC](https://forums.swift.org/t/gsoc-2026-sysroot-support-in-swifts-build-script-draft-proposal/85636 "2026-03-27T05:34:49Z")

</div>

Hi Swift community! I'm Anas, graduating in the next few months and interested in applying for GSoC 2026. I've been working on a proposal for the Sysroot Support in build-script project and wanted to share my draft befo…

---

## [Updating to latest ninja version for main, rebranch and next schemes](https://forums.swift.org/t/updating-to-latest-ninja-version-for-main-rebranch-and-next-schemes/82095)

<div class="topic-metadata">

**Author:** [@edymtt](https://forums.swift.org/u/edymtt)\
**Replies:** 1\
**Last updated:** [September 18, 2025, 7:36am UTC](https://forums.swift.org/t/updating-to-latest-ninja-version-for-main-rebranch-and-next-schemes/82095 "2025-09-18T07:36:56Z")

</div>

Good morning, we are planning to update the ninja version that update-checkout fetches for main, rebranch and next schemes -- namely going \[from 1.11.1 to 1.13.1\](https://github.com/swiftlang/swift/pull/84172). This wi…

---

## [SOLVED \[Build Error\] Toolchain executables missing when building \`swiftpm\`, \`swiftsyntax\`, \`sourcekit-lsp\`, \`sourcekit-lsp-lint\`](https://forums.swift.org/t/solved-build-error-toolchain-executables-missing-when-building-swiftpm-swiftsyntax-sourcekit-lsp-sourcekit-lsp-lint/72206)

<div class="topic-metadata">

**Author:** [@00buggy00](https://forums.swift.org/u/00buggy00)\
**Replies:** 3\
**Last updated:** [July 7, 2025, 2:37pm UTC](https://forums.swift.org/t/solved-build-error-toolchain-executables-missing-when-building-swiftpm-swiftsyntax-sourcekit-lsp-sourcekit-lsp-lint/72206 "2025-07-07T14:37:33Z")

</div>

I'm getting an error telling me swift-run is unknown or missing. Here is my process so far: The command I tried after completing Getting Started: utils/build-script --skip-build-benchmarks --skip-ios --skip-watchos \\ …

---

## [Updating the way we build \`compiler-rt\` in \`build-script\`](https://forums.swift.org/t/updating-the-way-we-build-compiler-rt-in-build-script/79191)

<div class="topic-metadata">

**Author:** [@edymtt](https://forums.swift.org/u/edymtt)\
**Replies:** 4\
**Last updated:** [June 16, 2025, 7:46pm UTC](https://forums.swift.org/t/updating-the-way-we-build-compiler-rt-in-build-script/79191 "2025-06-16T19:46:37Z")

</div>

Good morning everyone, We are changing build-script to use the LLVM-recommended way to build compiler-rt, since the current way will be removed in LLVM-21 1 2 3 -- we are planning for this transition to be as seamless a…

---

## [Scripting in Swift and sharing reusable code across scripts via a module - A simple solution for CI](https://forums.swift.org/t/scripting-in-swift-and-sharing-reusable-code-across-scripts-via-a-module-a-simple-solution-for-ci/79444)

<div class="topic-metadata">

**Author:** [@Gero](https://forums.swift.org/u/Gero)\
**Replies:** 0\
**Last updated:** [April 22, 2025, 2:22pm UTC](https://forums.swift.org/t/scripting-in-swift-and-sharing-reusable-code-across-scripts-via-a-module-a-simple-solution-for-ci/79444 "2025-04-22T14:22:18Z")

</div>

(Apologies in advance if the chosen category is unfit, please move if needed :smile:) While investigating the possibilities of scripting in swift (specifically to run scripts on Xcode Cloud) I encountered the usual prob…

---

## [How to build the 5.7.1 toolchain in swift.org release-like archive layout on Ubuntu 20.04 or 22.04](https://forums.swift.org/t/how-to-build-the-5-7-1-toolchain-in-swift-org-release-like-archive-layout-on-ubuntu-20-04-or-22-04/61837)

<div class="topic-metadata">

**Author:** [@mz2](https://forums.swift.org/u/mz2)\
**Replies:** 9\
**Last updated:** [November 27, 2024, 6:10am UTC](https://forums.swift.org/t/how-to-build-the-5-7-1-toolchain-in-swift-org-release-like-archive-layout-on-ubuntu-20-04-or-22-04/61837 "2024-11-27T06:10:26Z")

</div>

Hi there! I'm stuck trying to build the most recent release version of the Swift toolchain on Linux into an archive with a similar layout as the releases available at https://swift.org . I am in need of doing this as pa…

---

## [Options.inc file not found when integrating Xcode with Ninja](https://forums.swift.org/t/options-inc-file-not-found-when-integrating-xcode-with-ninja/62253)

<div class="topic-metadata">

**Author:** [@benn](https://forums.swift.org/u/benn)\
**Replies:** 10\
**Last updated:** [October 4, 2024, 9:14pm UTC](https://forums.swift.org/t/options-inc-file-not-found-when-integrating-xcode-with-ninja/62253 "2024-10-04T21:14:05Z")

</div>

Hey everyone! I'm following the Getting Started Guide to get setup in Xcode. I've completed the Using Ninja with Xcode steps. When I run I get the following error: 'clang/Driver/Options.inc' file not found. I'm able to …

---

## [Building the Swift Project on Linux with lld instead of gold](https://forums.swift.org/t/building-the-swift-project-on-linux-with-lld-instead-of-gold/73303)

<div class="topic-metadata">

**Author:** [@itaiferber](https://forums.swift.org/u/itaiferber)\
**Replies:** 24\
**Last updated:** [August 11, 2024, 7:29pm UTC](https://forums.swift.org/t/building-the-swift-project-on-linux-with-lld-instead-of-gold/73303 "2024-08-11T19:29:56Z")

</div>

Context A few weeks ago, I announced that I had managed to package Swift 5.10.1 for Gentoo using the official binaries built for Fedora 39. Fortuitous timing, of course, because as of a few days ago, Gentoo officially no…

---

## [Building an .xctoolchain for use with Xcode](https://forums.swift.org/t/building-an-xctoolchain-for-use-with-xcode/73340)

<div class="topic-metadata">

**Author:** [@mattie](https://forums.swift.org/u/mattie)\
**Replies:** 1\
**Last updated:** [July 22, 2024, 1:15pm UTC](https://forums.swift.org/t/building-an-xctoolchain-for-use-with-xcode/73340 "2024-07-22T13:15:57Z")

</div>

Hello! My goal is to produce a compiler that I can use with Xcode. Two questions: Is it possible for me to use the results of this invocation, which I got from the Getting Started document, to run an Xcode build? util…

---

## [Linker crashes when building tools](https://forums.swift.org/t/linker-crashes-when-building-tools/68332)

<div class="topic-metadata">

**Author:** [@Karl](https://forums.swift.org/u/Karl)\
**Replies:** 5\
**Last updated:** [May 19, 2024, 11:53pm UTC](https://forums.swift.org/t/linker-crashes-when-building-tools/68332 "2024-05-19T23:53:42Z")

</div>

I think the linker is crashing when attempting to build some of the compiler repository tools. I just rebased to the latest commit on main, so it's at 36a15ceaf4230e658a9453d2f14532bb99fd5dd4, and I ran update-checkout …

---

## [Build dependent packages automatically](https://forums.swift.org/t/build-dependent-packages-automatically/69648)

<div class="topic-metadata">

**Author:** [@bisgardo](https://forums.swift.org/u/bisgardo)\
**Replies:** 2\
**Last updated:** [January 26, 2024, 3:18pm UTC](https://forums.swift.org/t/build-dependent-packages-automatically/69648 "2024-01-26T15:18:06Z")

</div>

A part of my application is written in Rust which gets compiled into an XCFramework and wrapped into its own SwiftPM package together with some Swift bridge code generated by UniFFI. My project depends on this package as…

---

## [Building Swift compiler from source fails when not using Ninja](https://forums.swift.org/t/building-swift-compiler-from-source-fails-when-not-using-ninja/54656)

<div class="topic-metadata">

**Author:** [@philipturner](https://forums.swift.org/u/philipturner)\
**Replies:** 20\
**Last updated:** [October 31, 2023, 7:55am UTC](https://forums.swift.org/t/building-swift-compiler-from-source-fails-when-not-using-ninja/54656 "2023-10-31T07:55:39Z")

</div>

I'm trying to build Swift from source using the guide at GettingStarted.md. I downloaded all of the repositories and made my first invocation to build-script using the --xcode flag. There was a failure when running tests…

---

## [Getting update-checkout failed, fix errors and try again](https://forums.swift.org/t/getting-update-checkout-failed-fix-errors-and-try-again/66315)

<div class="topic-metadata">

**Author:** [@mohanadkandil](https://forums.swift.org/u/mohanadkandil)\
**Replies:** 3\
**Last updated:** [July 24, 2023, 5:04pm UTC](https://forums.swift.org/t/getting-update-checkout-failed-fix-errors-and-try-again/66315 "2023-07-24T17:04:39Z")

</div>

I'm just new and I can't figure out this error whenever I run utils/update-checkout --clone-with-ssh Error: ======UPDATE FAILURES====== /Users/mohannedkandil/Desktop/swift-project/swift failed (ret=1): \['git', 'checko…

---

## [How to build the only the demangler (not \`libSwiftDemangle\`)?](https://forums.swift.org/t/how-to-build-the-only-the-demangler-not-libswiftdemangle/65306)

<div class="topic-metadata">

**Author:** [@jonpalmisc](https://forums.swift.org/u/jonpalmisc)\
**Replies:** 5\
**Last updated:** [June 1, 2023, 5:04pm UTC](https://forums.swift.org/t/how-to-build-the-only-the-demangler-not-libswiftdemangle/65306 "2023-06-01T17:04:46Z")

</div>

Hi all. Sorry if this is the wrong forum category, etc.—this is my first post here. Easy access to demangling is provided by libSwiftDemangle, but the exposed functions only support turning a mangled string into a deman…

---

## ["Multiple commands produce \[...\]" error when building with ALL\_BUILD schema](https://forums.swift.org/t/multiple-commands-produce-error-when-building-with-all-build-schema/64540)

<div class="topic-metadata">

**Author:** [@pedromotita](https://forums.swift.org/u/pedromotita)\
**Replies:** 1\
**Last updated:** [April 25, 2023, 12:41pm UTC](https://forums.swift.org/t/multiple-commands-produce-error-when-building-with-all-build-schema/64540 "2023-04-25T12:41:38Z")

</div>

Hello, I am following the Getting Started guide to build the swift project for the first time. I built the project with Ninja, and am trying to setup use for Xcode. But whenever I try to build the project produced by th…

---

## [Swift compiler error with xcode12.3](https://forums.swift.org/t/swift-compiler-error-with-xcode12-3/43025)

<div class="topic-metadata">

**Author:** [@liujinwakayakulie](https://forums.swift.org/u/liujinwakayakulie)\
**Replies:** 0\
**Last updated:** [December 18, 2020, 6:35am UTC](https://forums.swift.org/t/swift-compiler-error-with-xcode12-3/43025 "2020-12-18T06:35:39Z")

</div>

I'm trying to compile Swift, I am using Xcode 12.3 (release) and macOS Big Sur 11.1. I am using this command to build the Swift compiler. utils/build-script --skip-build-benchmarks \\ --skip-ios --skip-watchos --skip-…

---

## [Swift compiler error with xcode12.2](https://forums.swift.org/t/swift-compiler-error-with-xcode12-2/47073)

<div class="topic-metadata">

**Author:** [@fero2004](https://forums.swift.org/u/fero2004)\
**Replies:** 0\
**Last updated:** [April 1, 2021, 3:12am UTC](https://forums.swift.org/t/swift-compiler-error-with-xcode12-2/47073 "2021-04-01T03:12:42Z")

</div>

I compiler swift in macOS 10.15.4 , Xcode 12.2, swift version swift-5.3.1-RELEASE build-script --release-debuginfo --debug-swift --Xcode but I found this error: but none of these is a common dependency of the other(s…

---

## [Trouble compiling the compiler with sccache and xcodebuild (\`cmake -G Xcode\`)](https://forums.swift.org/t/trouble-compiling-the-compiler-with-sccache-and-xcodebuild-cmake-g-xcode/53003)

<div class="topic-metadata">

**Author:** [@JamesWidman](https://forums.swift.org/u/JamesWidman)\
**Replies:** 0\
**Last updated:** [October 23, 2021, 6:17am UTC](https://forums.swift.org/t/trouble-compiling-the-compiler-with-sccache-and-xcodebuild-cmake-g-xcode/53003 "2021-10-23T06:17:22Z")

</div>

Hi all, I followed the build instructions from GettingStarted.md, up to and including the invocation of utils/build-script, and attempted to take the "sccache-with-Xcode" route, but the resulting xcodebuild invocation i…

---

## [Xcode build failing linking swift-compatibility-symbols](https://forums.swift.org/t/xcode-build-failing-linking-swift-compatibility-symbols/63117)

<div class="topic-metadata">

**Author:** [@matthewcheok](https://forums.swift.org/u/matthewcheok)\
**Replies:** 1\
**Last updated:** [April 15, 2023, 10:01pm UTC](https://forums.swift.org/t/xcode-build-failing-linking-swift-compatibility-symbols/63117 "2023-04-15T22:01:18Z")

</div>

Setting up the workspace and project as described in Getting started guide I'm getting the following build error (gist): clang: error: no such file or directory: '/Users/matthewcheok/Documents/Projects/swift-project/bui…

---

## [Building swift in Ubuntu saying clang isn't installed (even though it is)](https://forums.swift.org/t/building-swift-in-ubuntu-saying-clang-isnt-installed-even-though-it-is/34422)

<div class="topic-metadata">

**Author:** [@augusto2112](https://forums.swift.org/u/augusto2112)\
**Replies:** 1\
**Last updated:** [April 14, 2023, 5:54pm UTC](https://forums.swift.org/t/building-swift-in-ubuntu-saying-clang-isnt-installed-even-though-it-is/34422 "2023-04-14T17:54:23Z")

</div>

I'm trying to build Swift from source using clang I also built, but the build script fails with the message: ERROR: can't find clang (please install clang-3.5 or a later version) Even though the build script correctly …

---

## [Missing include/c++/12/bits/stl\_iterator\_base\_funcs.h when building the toolchain](https://forums.swift.org/t/missing-include-c-12-bits-stl-iterator-base-funcs-h-when-building-the-toolchain/64231)

<div class="topic-metadata">

**Author:** [@wowbagger](https://forums.swift.org/u/wowbagger)\
**Replies:** 0\
**Last updated:** [April 6, 2023, 8:12pm UTC](https://forums.swift.org/t/missing-include-c-12-bits-stl-iterator-base-funcs-h-when-building-the-toolchain/64231 "2023-04-06T20:12:39Z")

</div>

I've been trying to build a trunk toolchain on Ubuntu 22.04, and it keeps failing with the error missing '#include "gcc/x86\_64-linux-gnu/12/../../../../include/c++/12/bits/stl\_iterator\_base\_funcs.h"'; 'distance' must b…

---

## [Swift Build Failure](https://forums.swift.org/t/swift-build-failure/63966)

<div class="topic-metadata">

**Author:** [@Rajveer100](https://forums.swift.org/u/Rajveer100)\
**Replies:** 9\
**Last updated:** [March 27, 2023, 10:23am UTC](https://forums.swift.org/t/swift-build-failure/63966 "2023-03-27T10:23:57Z")

</div>

Hey Everyone! I am facing issues with the initial build (i.e. utils/build-script --skip-build-benchmarks \\ --skip-ios --skip-watchos --skip-tvos --swift-darwin-supported-archs "$(uname -m)" \\ --sccache --release-deb…

---

## [Build failure with --Xcode after llvm stable/20221013 rebranch?](https://forums.swift.org/t/build-failure-with-xcode-after-llvm-stable-20221013-rebranch/63534)

<div class="topic-metadata">

**Author:** [@LucianoPAlmeida](https://forums.swift.org/u/LucianoPAlmeida)\
**Replies:** 5\
**Last updated:** [March 16, 2023, 4:21pm UTC](https://forums.swift.org/t/build-failure-with-xcode-after-llvm-stable-20221013-rebranch/63534 "2023-03-16T16:21:44Z")

</div>

Recently running utils/build-script --swift-darwin-supported-archs "$(uname -m)" --xcode is failing for me with the following error: CMake Error at cmake/modules/SwiftSharedCMakeConfig.cmake:16 (find\_package): Could n…

---

## [Some gyb'd files are missing in the generated Xcode project](https://forums.swift.org/t/some-gybd-files-are-missing-in-the-generated-xcode-project/63658)

<div class="topic-metadata">

**Author:** [@wowbagger](https://forums.swift.org/u/wowbagger)\
**Replies:** 3\
**Last updated:** [March 13, 2023, 3:35pm UTC](https://forums.swift.org/t/some-gybd-files-are-missing-in-the-generated-xcode-project/63658 "2023-03-13T15:35:50Z")

</div>

I filed a bug report on this about a month ago, but thought I'd post it here as well to reach a wider audience. So far the only 2 missing files I noticed are TokenKinds.def and Attr.def under include/swift/AST/. My work…

---

## [Generate symlinks within a SPM package of objective-c code using build plugin](https://forums.swift.org/t/generate-symlinks-within-a-spm-package-of-objective-c-code-using-build-plugin/62321)

<div class="topic-metadata">

**Author:** [@Devarshi](https://forums.swift.org/u/Devarshi)\
**Replies:** 5\
**Last updated:** [February 6, 2023, 5:08pm UTC](https://forums.swift.org/t/generate-symlinks-within-a-spm-package-of-objective-c-code-using-build-plugin/62321 "2023-02-06T17:08:35Z")

</div>

I have a SPM package of objective-c code. In order to expose its public interfaces I need to generate symlinks within include folder. I noticed that when I include the generated symlinks within the repo of package it gi…

---

## [\[Resolved\] Build-script failing with 'Environment variable CMAKE must be specified'](https://forums.swift.org/t/resolved-build-script-failing-with-environment-variable-cmake-must-be-specified/62926)

<div class="topic-metadata">

**Author:** [@anthonylatsis](https://forums.swift.org/u/anthonylatsis)\
**Replies:** 1\
**Last updated:** [February 3, 2023, 4:43am UTC](https://forums.swift.org/t/resolved-build-script-failing-with-environment-variable-cmake-must-be-specified/62926 "2023-02-03T04:43:17Z")

</div>

The command is utils/build-script --skip-build-benchmarks --skip-ios --skip-watchos --skip-tvos --swift-darwin-supported-archs="$(uname -m)" --release-debuginfo --sccache --swift-disable-dead-stripping --skip-early-swift…

---

## [\[Build\] LLVM build is now a build-script product](https://forums.swift.org/t/build-llvm-build-is-now-a-build-script-product/61921)

<div class="topic-metadata">

**Author:** [@drexin](https://forums.swift.org/u/drexin)\
**Replies:** 1\
**Last updated:** [December 8, 2022, 6:22pm UTC](https://forums.swift.org/t/build-llvm-build-is-now-a-build-script-product/61921 "2022-12-08T18:22:43Z")

</div>

As part of our ongoing efforts to improve the Swift toolchain build, I am happy to announce that LLVM is now a build-script product. PR: apple/swift#38507 This is an important step towards the creation of a more unifie…

---

## [Remove/Deprecate —xcode option from build script](https://forums.swift.org/t/remove-deprecate-xcode-option-from-build-script/59706)

<div class="topic-metadata">

**Author:** [@LucianoPAlmeida](https://forums.swift.org/u/LucianoPAlmeida)\
**Replies:** 13\
**Last updated:** [October 22, 2022, 2:00am UTC](https://forums.swift.org/t/remove-deprecate-xcode-option-from-build-script/59706 "2022-10-22T02:00:24Z")

</div>

Hey everyone, Although what the title says, the point of this thread is not say we should remove the option completely, but to open the discussion about developer experience with that building option and gather thoughts…

---

## [Build fails due to missing file (stdalign.h)](https://forums.swift.org/t/build-fails-due-to-missing-file-stdalign-h/60143)

<div class="topic-metadata">

**Author:** [@mtennes](https://forums.swift.org/u/mtennes)\
**Replies:** 3\
**Last updated:** [September 9, 2022, 4:04am UTC](https://forums.swift.org/t/build-fails-due-to-missing-file-stdalign-h/60143 "2022-09-09T04:04:52Z")

</div>

Hello, Real newbie here, since I haven't even successfully built Swift. After executing the build script for about 9 hours, it fails because it can't find stdalign.h I am trying to build swift on the following. Any help…

---

## [Xcbuild hangs when building SwiftPM from source](https://forums.swift.org/t/xcbuild-hangs-when-building-swiftpm-from-source/60197)

<div class="topic-metadata">

**Author:** [@jajadude](https://forums.swift.org/u/jajadude)\
**Replies:** 0\
**Last updated:** [September 9, 2022, 2:37am UTC](https://forums.swift.org/t/xcbuild-hangs-when-building-swiftpm-from-source/60197 "2022-09-09T02:37:43Z")

</div>

Hey guys, when I was trying to build Swift toolchain on my mac(apple silicon), I found that the build will hang at "Building SwiftPM" stage. Specifically, it stops at the swift-build command that builds the SwiftPM its…

[Next page](https://forums.swift.org/tag/build-script/77.md?match_all_tags=true&page=1&tags%5B%5D=build-script)
