# \#llvm

**URL:** https://forums.swift.org/tag/llvm/269.md

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

---

## [How to enable new CPU architectures for Swift?](https://forums.swift.org/t/how-to-enable-new-cpu-architectures-for-swift/87736)

<div class="topic-metadata">

**Author:** [@ColemanCDA](https://forums.swift.org/u/ColemanCDA)\
**Replies:** 2\
**Last updated:** [June 26, 2026, 5:22pm UTC](https://forums.swift.org/t/how-to-enable-new-cpu-architectures-for-swift/87736 "2026-06-26T17:22:32Z")

</div>

I am creating this post to document my experience trying to enable additional CPU architectures for Swift since 2022, and to request clarification or guidelines for future development. Back in 2022, as part of my Swift …

---

## [Swift main toolchain missing LLVM realtime sanitizer libraries](https://forums.swift.org/t/swift-main-toolchain-missing-llvm-realtime-sanitizer-libraries/82820)

<div class="topic-metadata">

**Author:** [@jcavar](https://forums.swift.org/u/jcavar)\
**Replies:** 1\
**Last updated:** [March 19, 2026, 8:31am UTC](https://forums.swift.org/t/swift-main-toolchain-missing-llvm-realtime-sanitizer-libraries/82820 "2026-03-19T08:31:33Z")

</div>

I am not sure if this is the right place to ask this question. Please redirect me if not. I downloaded the latest main Swift toolchain (org.swift.62202510171a) and tried to compile a simple C++ program with the new LLVM…

---

## [18 month old fix in llvm-project does not seem to be in current Swift?](https://forums.swift.org/t/18-month-old-fix-in-llvm-project-does-not-seem-to-be-in-current-swift/77454)

<div class="topic-metadata">

**Author:** [@carlos42421](https://forums.swift.org/u/carlos42421)\
**Replies:** 2\
**Last updated:** [January 26, 2025, 7:47am UTC](https://forums.swift.org/t/18-month-old-fix-in-llvm-project-does-not-seem-to-be-in-current-swift/77454 "2025-01-26T07:47:43Z")

</div>

I'm looking at this llvm patch: \[AVR\] Fix incorrect operands of pseudo instruction 'ROLBRd' · llvm/llvm-project@ff75a2b · GitHub and it looks like it possibly isn't in the llvm-project tree that Swift is using, which see…

---

## [Simplifying Linux-to-Darwin cross-compilation by re-enabling ld64.lld](https://forums.swift.org/t/simplifying-linux-to-darwin-cross-compilation-by-re-enabling-ld64-lld/76674)

<div class="topic-metadata">

**Author:** [@kabiroberai](https://forums.swift.org/u/kabiroberai)\
**Replies:** 5\
**Last updated:** [December 16, 2024, 9:01pm UTC](https://forums.swift.org/t/simplifying-linux-to-darwin-cross-compilation-by-re-enabling-ld64-lld/76674 "2024-12-16T21:01:40Z")

</div>

ld64.lld in the Swift Linux toolchain is incredibly useful for cross-compiling from Linux to iOS/macOS — for example, it makes it so that the Swift Darwin SDK need only ship with two files in its toolset: dsymutil and ll…

---

## [Importing LLVM c++ into swift package](https://forums.swift.org/t/importing-llvm-c-into-swift-package/72083)

<div class="topic-metadata">

**Author:** [@wheelius](https://forums.swift.org/u/wheelius)\
**Replies:** 1\
**Last updated:** [May 28, 2024, 5:22am UTC](https://forums.swift.org/t/importing-llvm-c-into-swift-package/72083 "2024-05-28T05:22:05Z")

</div>

Hey all I am pretty new to using c++ interop. I am trying to import the system LLVM headers into a swift package for a project, but can't seem to find any instructions on how to do so. The official c++ / swift interop do…

---

## [When we can expect LLVM 18.1 in Swift](https://forums.swift.org/t/when-we-can-expect-llvm-18-1-in-swift/71719)

<div class="topic-metadata">

**Author:** [@stuchlej](https://forums.swift.org/u/stuchlej)\
**Replies:** 1\
**Last updated:** [May 9, 2024, 2:56pm UTC](https://forums.swift.org/t/when-we-can-expect-llvm-18-1-in-swift/71719 "2024-05-09T14:56:58Z")

</div>

Hello, while working on a tool for Linux debugging, I've come around a need to read Thread Local Storage of the Glibc. There is an Issue on this topic and a PR on LLDB which resolves the issue. But the change arrived in…

---

## [LLVM Modules without Target Triple](https://forums.swift.org/t/llvm-modules-without-target-triple/68474)

<div class="topic-metadata">

**Author:** [@Kamator](https://forums.swift.org/u/Kamator)\
**Replies:** 0\
**Last updated:** [November 15, 2023, 9:10am UTC](https://forums.swift.org/t/llvm-modules-without-target-triple/68474 "2023-11-15T09:10:21Z")

</div>

Hey there! I am working on a project where we get LLVM IR generated from swift code that ends up being a xcode-framework. During all of that I am doing some modifications on the IR level that depend on the target archi…

---

## [Definition of clang's Default Flags](https://forums.swift.org/t/definition-of-clangs-default-flags/67840)

<div class="topic-metadata">

**Author:** [@thekief](https://forums.swift.org/u/thekief)\
**Replies:** 0\
**Last updated:** [October 13, 2023, 2:43pm UTC](https://forums.swift.org/t/definition-of-clangs-default-flags/67840 "2023-10-13T14:43:00Z")

</div>

I am currently debugging some stuff and I noticed that on macOS the clang version provided by Xcode has quite a lot of flags set by default. For example, following flags are set by default: ... -Wno-reorder-init-list \\…

---

## [Load external LLVM pass plugins via Swift frontend](https://forums.swift.org/t/load-external-llvm-pass-plugins-via-swift-frontend/67596)

<div class="topic-metadata">

**Author:** [@afrighetto](https://forums.swift.org/u/afrighetto)\
**Replies:** 2\
**Last updated:** [September 29, 2023, 7:21pm UTC](https://forums.swift.org/t/load-external-llvm-pass-plugins-via-swift-frontend/67596 "2023-09-29T19:21:17Z")

</div>

Hello, While working on our downstream project based on LLVM, we have identified the need to dynamically load LLVM passes during compilation. Apple Clang offers this possibility via -fpass-plugin option, which allows th…

---

## [Ideas for debugging a bad memory access at runtime](https://forums.swift.org/t/ideas-for-debugging-a-bad-memory-access-at-runtime/67468)

<div class="topic-metadata">

**Author:** [@jkshtj](https://forums.swift.org/u/jkshtj)\
**Replies:** 1\
**Last updated:** [September 23, 2023, 4:25pm UTC](https://forums.swift.org/t/ideas-for-debugging-a-bad-memory-access-at-runtime/67468 "2023-09-23T16:25:36Z")

</div>

I'm trying to get some guidance/ideas/suggestions on a bad runtime memory access that I have encountered. I have a SIL function x, which returns a closure y, whose signature looks as below - sil private @y : $@conventi…

---

## [Xcode ships LLVM 15 but Swift builds LLVM 16](https://forums.swift.org/t/xcode-ships-llvm-15-but-swift-builds-llvm-16/67377)

<div class="topic-metadata">

**Author:** [@jgollenz](https://forums.swift.org/u/jgollenz)\
**Replies:** 5\
**Last updated:** [September 20, 2023, 6:43pm UTC](https://forums.swift.org/t/xcode-ships-llvm-15-but-swift-builds-llvm-16/67377 "2023-09-20T18:43:35Z")

</div>

The latest Xcode 15 release ships with clang 15 /Applications/Xcode\_15.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang --version Apple clang version 15.0.0 (clang-1500.0.40.1) and LLVM 15 /…

---

## [Does Swift's ARC Utilize Objective-C ARC Intrinsics in LLVM?](https://forums.swift.org/t/does-swifts-arc-utilize-objective-c-arc-intrinsics-in-llvm/67325)

<div class="topic-metadata">

**Author:** [@qorzi](https://forums.swift.org/u/qorzi)\
**Replies:** 1\
**Last updated:** [September 17, 2023, 7:53pm UTC](https://forums.swift.org/t/does-swifts-arc-utilize-objective-c-arc-intrinsics-in-llvm/67325 "2023-09-17T19:53:49Z")

</div>

In the LLVM Language Reference Manual, there is a section on Objective-C ARC Runtime Intrinsics. It seems to exist to handle ARC-related logic in LLVM IR. I'm curious whether Swift's ARC is also processed using these OB…

---

## [Linking LLVMSupport](https://forums.swift.org/t/linking-llvmsupport/65863)

<div class="topic-metadata">

**Author:** [@Nickolas\_Pohilets](https://forums.swift.org/u/Nickolas_Pohilets)\
**Replies:** 1\
**Last updated:** [June 27, 2023, 8:59pm UTC](https://forums.swift.org/t/linking-llvmsupport/65863 "2023-06-27T20:59:55Z")

</div>

I want to use llvm::DenseSet in libswift\_Concurrency.dylib to optimise copying task-locals. Currently it is implemented using std::set, which gives O(n\*long(n)) performance. Usage of llvm::DenseSet makes it O(n) and impr…

---

## [Who can help with LLVM issue for Windows (X86\_64)](https://forums.swift.org/t/who-can-help-with-llvm-issue-for-windows-x86-64/60262)

<div class="topic-metadata">

**Author:** [@sspringer](https://forums.swift.org/u/sspringer)\
**Replies:** 0\
**Last updated:** [September 13, 2022, 3:34am UTC](https://forums.swift.org/t/who-can-help-with-llvm-issue-for-windows-x86-64/60262 "2022-09-13T03:34:29Z")

</div>

On the occasion of the release of the wonderful Swift 5.7 version I would like to ask if anyone could help with this LLVM "gap" (there is also an according Swift bug entry) to make async/await work reliably on Windows (X…

---

## [Swift compiler optimization](https://forums.swift.org/t/swift-compiler-optimization/58081)

<div class="topic-metadata">

**Author:** [@superstudent](https://forums.swift.org/u/superstudent)\
**Replies:** 4\
**Last updated:** [June 14, 2022, 12:21pm UTC](https://forums.swift.org/t/swift-compiler-optimization/58081 "2022-06-14T12:21:35Z")

</div>

For a project I am currently using the swift compiler front end to generate LLVM IR. I need to analyze the IR to find run time dependencies between variable read/writes with the end goal of finding parallelism. For this…

---

## [Swift 5.3 - stdint not found when building parts of llvm?](https://forums.swift.org/t/swift-5-3-stdint-not-found-when-building-parts-of-llvm/56270)

<div class="topic-metadata">

**Author:** [@carlos42421](https://forums.swift.org/u/carlos42421)\
**Replies:** 0\
**Last updated:** [March 27, 2022, 6:40pm UTC](https://forums.swift.org/t/swift-5-3-stdint-not-found-when-building-parts-of-llvm/56270 "2022-03-27T18:40:15Z")

</div>

Hi, I'm building on macOS Monterey 12.2.1 (21D62) with Xcode 13.2.1 (13C100). I follow a slightly odd build process. After getting all the relevant repos with utils/update-checkout., I use the build script utils/build-s…

---

## [Swift 5.6 SIL / LLVM Regression](https://forums.swift.org/t/swift-5-6-sil-llvm-regression/56028)

<div class="topic-metadata">

**Author:** [@ColemanCDA](https://forums.swift.org/u/ColemanCDA)\
**Replies:** 1\
**Last updated:** [March 26, 2022, 5:17pm UTC](https://forums.swift.org/t/swift-5-6-sil-llvm-regression/56028 "2022-03-26T17:17:04Z")

</div>

Something at the SIL and LLVM level is broken and generating invalid binaries. The Armv7 situation is worse, a simple hello world program that compiled with 5.5.3 now crashes with bus error. With Swift 5.5.3 I was able t…

---

## [LLVM version and keeping original variable names](https://forums.swift.org/t/llvm-version-and-keeping-original-variable-names/55822)

<div class="topic-metadata">

**Author:** [@superstudent](https://forums.swift.org/u/superstudent)\
**Replies:** 0\
**Last updated:** [March 9, 2022, 11:17pm UTC](https://forums.swift.org/t/llvm-version-and-keeping-original-variable-names/55822 "2022-03-09T23:17:36Z")

</div>

Hello, I am working on a project for which I need to compile swift to llvm ir and then run an analysis pass on it. For this, it would be great if in the ir I could keep the actual names of the variables. With clang I c…

---

## [LLVM-Symbolizer not working](https://forums.swift.org/t/llvm-symbolizer-not-working/54669)

<div class="topic-metadata">

**Author:** [@philipturner](https://forums.swift.org/u/philipturner)\
**Replies:** 0\
**Last updated:** [January 17, 2022, 1:58pm UTC](https://forums.swift.org/t/llvm-symbolizer-not-working/54669 "2022-01-17T13:58:47Z")

</div>

The tool "llvm-symbolizer" is supposed to turn memory addresses into line numbers and paths to source code files. Whenever there is a crash trace, it's supposed to activate and convert everything in the stack trace into …

---

## [Major Compile Performance Regression Swift 5.6](https://forums.swift.org/t/major-compile-performance-regression-swift-5-6/54604)

<div class="topic-metadata">

**Author:** [@rnantes](https://forums.swift.org/u/rnantes)\
**Replies:** 5\
**Last updated:** [January 15, 2022, 10:53am UTC](https://forums.swift.org/t/major-compile-performance-regression-swift-5-6/54604 "2022-01-15T10:53:24Z")

</div>

Hi, I'm posting this for greater visibility on this bug. There seems to be a major compile speed regression when compiling postgres-nio using the latest Swift 5.6 Development toolchain. I am seeing ~67 min compile tim…

---

## [Can CF\_RETURNS\_RETAINED be used on C function pointer return values bridged to Swift?](https://forums.swift.org/t/can-cf-returns-retained-be-used-on-c-function-pointer-return-values-bridged-to-swift/53079)

<div class="topic-metadata">

**Author:** [@vanvoorden](https://forums.swift.org/u/vanvoorden)\
**Replies:** 0\
**Last updated:** [October 26, 2021, 9:33pm UTC](https://forums.swift.org/t/can-cf-returns-retained-be-used-on-c-function-pointer-return-values-bridged-to-swift/53079 "2021-10-26T21:33:25Z")

</div>

https://developer.apple.com/documentation/swift/imported\_c\_and\_objective-c\_apis/working\_with\_core\_foundation\_types If we define a C function that returns a CFType, Swift can (sometimes) bridge the memory management sema…

---

## [State of Swift/LLVM Passes](https://forums.swift.org/t/state-of-swift-llvm-passes/39210)

<div class="topic-metadata">

**Author:** [@solidak](https://forums.swift.org/u/solidak)\
**Replies:** 6\
**Last updated:** [August 11, 2020, 3:17pm UTC](https://forums.swift.org/t/state-of-swift-llvm-passes/39210 "2020-08-11T15:17:28Z")

</div>

Hey guys. I have a couple of questions to understand how to navigate the Swift codebase and the state of LLVM passes here. Pardon the super newbie questions :) Which LLVM version is Swift (let's say 5.2) based on? I ha…

---

## [Swift-llbuild: warning: ignoring broken symlink](https://forums.swift.org/t/swift-llbuild-warning-ignoring-broken-symlink/38057)

<div class="topic-metadata">

**Author:** [@rderik](https://forums.swift.org/u/rderik)\
**Replies:** 2\
**Last updated:** [July 1, 2020, 2:10am UTC](https://forums.swift.org/t/swift-llbuild-warning-ignoring-broken-symlink/38057 "2020-07-01T02:10:02Z")

</div>

Hi everyone, I'm getting a weird warning when using the SPM. When I build my Swift package (A very simple test package) I get the following warning: 'llbuild' /Users/derik/Desktop/ap/.build/checkouts/swift-llbuild: war…

---

## [Swift 5.2 Compiler Error "conflicting debug info for argument". How do debug?](https://forums.swift.org/t/swift-5-2-compiler-error-conflicting-debug-info-for-argument-how-do-debug/35094)

<div class="topic-metadata">

**Author:** [@matt](https://forums.swift.org/u/matt)\
**Replies:** 6\
**Last updated:** [June 24, 2020, 1:55am UTC](https://forums.swift.org/t/swift-5-2-compiler-error-conflicting-debug-info-for-argument-how-do-debug/35094 "2020-06-24T01:55:08Z")

</div>

Since upgrading to Swift 5.2 with Xcode 11.4, I’m having a strange compile error: Command failed due to signal: Abort trap: 6 conflicting debug info for argument call void @llvm.dbg.value(metadata %objc\_object\* %0, me…

---

## [Embedding libswiftFrontEnd](https://forums.swift.org/t/embedding-libswiftfrontend/33437)

<div class="topic-metadata">

**Author:** [@tdermendjiev](https://forums.swift.org/u/tdermendjiev)\
**Replies:** 0\
**Last updated:** [February 4, 2020, 8:56pm UTC](https://forums.swift.org/t/embedding-libswiftfrontend/33437 "2020-02-04T20:56:26Z")

</div>

I am building a command line tool in C++ which I need to link against libswiftFrontEnd (and not only). Of course it depends on other libraries that are not linked so I am getting "Undefined symbols..." error. Is there so…

---

## [No RELEASE-5.1.1 of the forked LLVM-project?](https://forums.swift.org/t/no-release-5-1-1-of-the-forked-llvm-project/30368)

<div class="topic-metadata">

**Author:** [@Ron\_Olson](https://forums.swift.org/u/Ron_Olson)\
**Replies:** 5\
**Last updated:** [November 5, 2019, 7:10pm UTC](https://forums.swift.org/t/no-release-5-1-1-of-the-forked-llvm-project/30368 "2019-11-05T19:10:09Z")

</div>

Hey all- I started digging more into this bug report and despite my initial misgivings, have been successful at adding sourcekit-lsp to the packaged version of Swift for Fedora 5.1.1. I have some reservations about it, …

---

## [Swift build problem x86\_64, arm64, arm7 (Swift 5.1)](https://forums.swift.org/t/swift-build-problem-x86-64-arm64-arm7-swift-5-1/27595)

<div class="topic-metadata">

**Author:** [@SpectralDragon](https://forums.swift.org/u/SpectralDragon)\
**Replies:** 2\
**Last updated:** [August 4, 2019, 9:28pm UTC](https://forums.swift.org/t/swift-build-problem-x86-64-arm64-arm7-swift-5-1/27595 "2019-08-04T21:28:40Z")

</div>

When I trying build swift, I got the next error message: Undefined symbols for architecture x86\_64: "\_\_\_isOSVersionAtLeast", referenced from: swift::initializeProtocolLookup() in ImageInspectionMachO.cpp.o …
