From 764ea1871abe9830b87d8dda09936fa2c4a4c8c5 Mon Sep 17 00:00:00 2001 From: Ruri <888mfvjygb@privaterelay.appleid.com> Date: Wed, 22 Jul 2026 16:32:41 +0800 Subject: [PATCH 01/16] Update workflow to create LLVM.xcframework archive --- .github/workflows/main.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6b0b0ffe..9c18f5a9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,16 +22,18 @@ jobs: timeout-minutes: 1200 steps: - uses: actions/checkout@v3 + with: + submodules: true - run: | make all - - name: create CoreCompiler framework archive - run: tar -cJf CoreCompiler.framework.tar.xz CoreCompiler.framework + - name: create LLVM.xcframework archive + run: tar -cJf LLVM.xcframework.tar.xz LLVM.xcframework - name: create CoreCompilerSupportLibs archive run: tar -cJf CoreCompilerSupportLibs.tar.xz CoreCompilerSupportLibs - uses: actions/upload-artifact@v4 with: - name: CoreCompiler.framework - path: CoreCompiler.framework.tar.xz + name: LLVM.xcframework + path: LLVM.xcframework.tar.xz - uses: actions/upload-artifact@v4 with: name: CoreCompilerSupportLibs From 4513f8de0913f0df279b6aefea00d5a461ec75bf Mon Sep 17 00:00:00 2001 From: Ruri <888mfvjygb@privaterelay.appleid.com> Date: Wed, 22 Jul 2026 16:37:19 +0800 Subject: [PATCH 02/16] Refactor Swift toolchain build process in Makefile Removed the creation of a symbolic link for llvm-macosx-x86_64 and updated the Swift toolchain build command. --- Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 9514b92c..ef3ed63a 100644 --- a/Makefile +++ b/Makefile @@ -25,10 +25,8 @@ swift: perl -i -0pe 's|(// Swift LLVM fork downstream change start\n)(.*?)(// Swift LLVM fork downstream change end\n)|$$1/* NYXIAN: apple lies, lld works fine for MachO\n$$2*/\n$$3|s' \ llvm-project/lld/MachO/InputFiles.cpp -build/LLVMClangSwift_iphoneos/llvm-macosx-x86_64: - mkdir -p build/LLVMClangSwift_iphoneos; cd build/LLVMClangSwift_iphoneos; ln -sfn llvm-macosx-arm64 llvm-macosx-x86_64 -.SwiftToolchain-iphoneos: swift build/LLVMClangSwift_iphoneos/llvm-macosx-x86_64 +.SwiftToolchain-iphoneos: swift $(call log_info,building iOS-native swift toolchain ($(SWIFT_BRANCH))) SWIFT_BRANCH="$(SWIFT_BRANCH)" SWIFT_SOURCE_DIR="$(SWIFT_SOURCE_DIR)" Scripts/build-swift-toolchain.sh build touch .SwiftToolchain-iphoneos From 2c3cf375e4677af2c300acd258a89230a5928603 Mon Sep 17 00:00:00 2001 From: Ruri <888mfvjygb@privaterelay.appleid.com> Date: Wed, 22 Jul 2026 16:40:21 +0800 Subject: [PATCH 03/16] Update build-swift-toolchain.sh --- Scripts/build-swift-toolchain.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Scripts/build-swift-toolchain.sh b/Scripts/build-swift-toolchain.sh index 3e1964cd..7c902f1f 100755 --- a/Scripts/build-swift-toolchain.sh +++ b/Scripts/build-swift-toolchain.sh @@ -165,8 +165,7 @@ copy_ios_install() { local build_dir="${SWIFT_BUILD_ROOT}/${SWIFT_BUILD_SUBDIR}" local install_prefix="Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr" local candidates=( - "${build_dir}/intermediate-install/iphoneos-arm64/${install_prefix}" - "${build_dir}/toolchain-macosx-arm64/${install_prefix}" + "${build_dir}/intermediate-install/iphoneos-arm64/${install_prefix}" ) local swift_build="${build_dir}/swift-iphoneos-arm64" local llvm_build="${build_dir}/llvm-iphoneos-arm64" From 736907a7aa603c2f9f4dab1781b2747bb45fd338 Mon Sep 17 00:00:00 2001 From: Ruri <888mfvjygb@privaterelay.appleid.com> Date: Wed, 22 Jul 2026 16:45:14 +0800 Subject: [PATCH 04/16] Update compiler target for iOS 16.0 --- Scripts/swift-ios-toolchain-presets.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Scripts/swift-ios-toolchain-presets.ini b/Scripts/swift-ios-toolchain-presets.ini index b110ffb1..470a4038 100644 --- a/Scripts/swift-ios-toolchain-presets.ini +++ b/Scripts/swift-ios-toolchain-presets.ini @@ -23,8 +23,8 @@ extra-cmake-options= -DLLVM_ENABLE_ASSERTIONS=OFF -DLLVM_ENABLE_RTTI:BOOL=ON -DLLVM_ENABLE_EH:BOOL=OFF - -DCMAKE_C_COMPILER_TARGET=arm64-apple-darwin - -DCMAKE_CXX_COMPILER_TARGET=arm64-apple-darwin + -DCMAKE_C_COMPILER_TARGET=arm64-apple-ios16.0 + -DCMAKE_CXX_COMPILER_TARGET=arm64-apple-ios16.0 build-toolchain-only=1 build-stdlib-deployment-targets= @@ -43,4 +43,4 @@ swift-include-tests=0 darwin-deployment-version-ios=16.0 darwin-crash-reporter-client=1 llvm-install-components=llvm-ar;llvm-nm;llvm-ranlib;llvm-cov;llvm-profdata;llvm-objdump;llvm-objcopy;llvm-symbolizer;IndexStore;clang;clang-resource-headers;builtins;runtimes;libclang;LTO;clang-features-file;lld -host-target=macosx-arm64 +host-target=iphoneos-arm64 From ee43f91516f02f5f24be851c5308ed8a53659300 Mon Sep 17 00:00:00 2001 From: Ruri <888mfvjygb@privaterelay.appleid.com> Date: Wed, 22 Jul 2026 16:50:04 +0800 Subject: [PATCH 05/16] Add workflow_dispatch trigger to main.yml --- .github/workflows/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9c18f5a9..2e4d22a7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,8 @@ name: Build LLVM XCFrameworks for Release -on: [push] +on: + push: + workflow_dispatch: + jobs: prepare-build-tools: runs-on: macos-latest From ea871107a466134ba966c5fcb3f6bec2fa21906d Mon Sep 17 00:00:00 2001 From: Ruri <888mfvjygb@privaterelay.appleid.com> Date: Wed, 22 Jul 2026 17:09:24 +0800 Subject: [PATCH 06/16] Change compiler target from iOS to macOS --- Scripts/swift-ios-toolchain-presets.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Scripts/swift-ios-toolchain-presets.ini b/Scripts/swift-ios-toolchain-presets.ini index 470a4038..b110ffb1 100644 --- a/Scripts/swift-ios-toolchain-presets.ini +++ b/Scripts/swift-ios-toolchain-presets.ini @@ -23,8 +23,8 @@ extra-cmake-options= -DLLVM_ENABLE_ASSERTIONS=OFF -DLLVM_ENABLE_RTTI:BOOL=ON -DLLVM_ENABLE_EH:BOOL=OFF - -DCMAKE_C_COMPILER_TARGET=arm64-apple-ios16.0 - -DCMAKE_CXX_COMPILER_TARGET=arm64-apple-ios16.0 + -DCMAKE_C_COMPILER_TARGET=arm64-apple-darwin + -DCMAKE_CXX_COMPILER_TARGET=arm64-apple-darwin build-toolchain-only=1 build-stdlib-deployment-targets= @@ -43,4 +43,4 @@ swift-include-tests=0 darwin-deployment-version-ios=16.0 darwin-crash-reporter-client=1 llvm-install-components=llvm-ar;llvm-nm;llvm-ranlib;llvm-cov;llvm-profdata;llvm-objdump;llvm-objcopy;llvm-symbolizer;IndexStore;clang;clang-resource-headers;builtins;runtimes;libclang;LTO;clang-features-file;lld -host-target=iphoneos-arm64 +host-target=macosx-arm64 From 304fe9ac574aa7c754f7508a8a89c644b56f9a6f Mon Sep 17 00:00:00 2001 From: Ruri <888mfvjygb@privaterelay.appleid.com> Date: Tue, 28 Jul 2026 07:53:34 +0800 Subject: [PATCH 07/16] Update GitHub Actions workflow for macOS and Xcode Updated macOS versions for build jobs and added steps to show installed Xcodes and select Xcode versions. --- .github/workflows/main.yml | 73 ++++++++++++++++++++++++++++++++++---- 1 file changed, 66 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2e4d22a7..7fb51fec 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,42 +1,101 @@ name: Build LLVM XCFrameworks for Release + on: push: workflow_dispatch: jobs: prepare-build-tools: - runs-on: macos-latest - if: ${{ false }} + runs-on: macos-26 + steps: - uses: actions/checkout@v3 - - run: ./build-tools.sh + + - name: Show available Xcodes + run: | + echo "===== Installed Xcodes =====" + ls /Applications | grep Xcode || true + echo + xcodebuild -version || true + + - name: Select Xcode (prefer 26.0) + run: | + if [ -d /Applications/Xcode_26.5.app ]; then + sudo xcode-select -s /Applications/Xcode_26.5.app/Contents/Developer + fi + + echo "===== Current Xcode =====" + xcodebuild -version + echo + echo "===== SDK =====" + xcrun --sdk iphoneos --show-sdk-version + echo + echo "===== Clang =====" + clang --version + - run: | - curl -OL https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-mac.zip - unzip ninja-mac.zip - mv ninja tools/bin + mkdir -p tools/bin + + curl -s \ + -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ + "https://api.github.com/repos/ninja-build/ninja/actions/runs/30174578673/artifacts" \ + | jq -r '.artifacts[] | select(.name=="ninja-binary-archives") | .archive_download_url' \ + | xargs curl -L \ + -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ + -o outer.zip + + unzip -o outer.zip + unzip -o ninja-mac.zip -d tools/bin + chmod +x tools/bin/ninja + - run: tar -cJf tools.tar.xz tools/ + - uses: actions/upload-artifact@v4 with: name: tools path: tools.tar.xz build-llvm: - runs-on: macos-latest + needs: prepare-build-tools + + runs-on: macos-15 + timeout-minutes: 1200 + steps: - uses: actions/checkout@v3 with: submodules: true + + - name: Select Xcode (prefer 26.0) + run: | + if [ -d /Applications/Xcode_26.0.app ]; then + sudo xcode-select -s /Applications/Xcode_26.0.app/Contents/Developer + fi + + echo "===== Current Xcode =====" + xcodebuild -version + echo + echo "===== SDK =====" + xcrun --sdk iphoneos --show-sdk-version + echo + echo "===== Clang =====" + clang --version + - run: | make all + - name: create LLVM.xcframework archive run: tar -cJf LLVM.xcframework.tar.xz LLVM.xcframework + - name: create CoreCompilerSupportLibs archive run: tar -cJf CoreCompilerSupportLibs.tar.xz CoreCompilerSupportLibs + - uses: actions/upload-artifact@v4 with: name: LLVM.xcframework path: LLVM.xcframework.tar.xz + - uses: actions/upload-artifact@v4 with: name: CoreCompilerSupportLibs From b511419106519091452cd48d3db3ee607951ee75 Mon Sep 17 00:00:00 2001 From: Ruri <888mfvjygb@privaterelay.appleid.com> Date: Tue, 28 Jul 2026 07:54:39 +0800 Subject: [PATCH 08/16] Enable LLVM modules in iOS toolchain presets --- Scripts/swift-ios-toolchain-presets.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/swift-ios-toolchain-presets.ini b/Scripts/swift-ios-toolchain-presets.ini index b110ffb1..a6aa15f1 100644 --- a/Scripts/swift-ios-toolchain-presets.ini +++ b/Scripts/swift-ios-toolchain-presets.ini @@ -37,7 +37,7 @@ build-swift-libexec=0 build-runtime-with-host-compiler=0 skip-build-benchmarks llvm-include-tests=0 -llvm-enable-modules=0 +llvm-enable-modules=1 build-swift-examples=0 swift-include-tests=0 darwin-deployment-version-ios=16.0 From 0fc884769eab193eea149d01288b33588eca650f Mon Sep 17 00:00:00 2001 From: Ruri <888mfvjygb@privaterelay.appleid.com> Date: Tue, 28 Jul 2026 07:57:09 +0800 Subject: [PATCH 09/16] Update Xcode selection to prefer version 26.5 --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7fb51fec..55326608 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -69,8 +69,8 @@ jobs: - name: Select Xcode (prefer 26.0) run: | - if [ -d /Applications/Xcode_26.0.app ]; then - sudo xcode-select -s /Applications/Xcode_26.0.app/Contents/Developer + if [ -d /Applications/Xcode_26.5.app ]; then + sudo xcode-select -s /Applications/Xcode_26.5.app/Contents/Developer fi echo "===== Current Xcode =====" From c1ed79af0f67ebb556fad815b187b75bb86e838c Mon Sep 17 00:00:00 2001 From: Ruri <888mfvjygb@privaterelay.appleid.com> Date: Tue, 28 Jul 2026 08:08:27 +0800 Subject: [PATCH 10/16] Update macOS runner version to macos-26 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 55326608..07577e57 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -58,7 +58,7 @@ jobs: build-llvm: needs: prepare-build-tools - runs-on: macos-15 + runs-on: macos-26 timeout-minutes: 1200 From b2f4a9054cbc02f38d9f159f8f2698e8e7102fe9 Mon Sep 17 00:00:00 2001 From: Ruri <888mfvjygb@privaterelay.appleid.com> Date: Tue, 28 Jul 2026 08:28:01 +0800 Subject: [PATCH 11/16] Update Xcode selection in workflow to prefer 26.4 --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 07577e57..f59f0c5b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,8 +20,8 @@ jobs: - name: Select Xcode (prefer 26.0) run: | - if [ -d /Applications/Xcode_26.5.app ]; then - sudo xcode-select -s /Applications/Xcode_26.5.app/Contents/Developer + if [ -d /Applications/Xcode_26.4.app ]; then + sudo xcode-select -s /Applications/Xcode_26.4.app/Contents/Developer fi echo "===== Current Xcode =====" @@ -69,8 +69,8 @@ jobs: - name: Select Xcode (prefer 26.0) run: | - if [ -d /Applications/Xcode_26.5.app ]; then - sudo xcode-select -s /Applications/Xcode_26.5.app/Contents/Developer + if [ -d /Applications/Xcode_26.4.app ]; then + sudo xcode-select -s /Applications/Xcode_26.4.app/Contents/Developer fi echo "===== Current Xcode =====" From a709f94ffe66a93ebfdbf61a3637a9fd572cab0c Mon Sep 17 00:00:00 2001 From: Ruri <888mfvjygb@privaterelay.appleid.com> Date: Tue, 28 Jul 2026 08:51:48 +0800 Subject: [PATCH 12/16] Update Xcode selection to prefer version 26.3 --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f59f0c5b..312b16c9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,8 +20,8 @@ jobs: - name: Select Xcode (prefer 26.0) run: | - if [ -d /Applications/Xcode_26.4.app ]; then - sudo xcode-select -s /Applications/Xcode_26.4.app/Contents/Developer + if [ -d /Applications/Xcode_26.3.app ]; then + sudo xcode-select -s /Applications/Xcode_26.3.app/Contents/Developer fi echo "===== Current Xcode =====" @@ -69,8 +69,8 @@ jobs: - name: Select Xcode (prefer 26.0) run: | - if [ -d /Applications/Xcode_26.4.app ]; then - sudo xcode-select -s /Applications/Xcode_26.4.app/Contents/Developer + if [ -d /Applications/Xcode_26.3.app ]; then + sudo xcode-select -s /Applications/Xcode_26.3.app/Contents/Developer fi echo "===== Current Xcode =====" From 048ff34a92203128d60a17553143886e79af211f Mon Sep 17 00:00:00 2001 From: Ruri <888mfvjygb@privaterelay.appleid.com> Date: Tue, 28 Jul 2026 09:12:27 +0800 Subject: [PATCH 13/16] Update Xcode selection logic in workflow --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 312b16c9..3adcb0cf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,8 +20,8 @@ jobs: - name: Select Xcode (prefer 26.0) run: | - if [ -d /Applications/Xcode_26.3.app ]; then - sudo xcode-select -s /Applications/Xcode_26.3.app/Contents/Developer + if [ -d /Applications/Xcode_26.2.app ]; then + sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer fi echo "===== Current Xcode =====" @@ -69,8 +69,8 @@ jobs: - name: Select Xcode (prefer 26.0) run: | - if [ -d /Applications/Xcode_26.3.app ]; then - sudo xcode-select -s /Applications/Xcode_26.3.app/Contents/Developer + if [ -d /Applications/Xcode_26.2.app ]; then + sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer fi echo "===== Current Xcode =====" From be66bcd07e0e3e5679191de879d337e2366089a3 Mon Sep 17 00:00:00 2001 From: Ruri <888mfvjygb@privaterelay.appleid.com> Date: Tue, 28 Jul 2026 09:35:44 +0800 Subject: [PATCH 14/16] Update Xcode selection logic in workflow --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3adcb0cf..959e62ad 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,8 +20,8 @@ jobs: - name: Select Xcode (prefer 26.0) run: | - if [ -d /Applications/Xcode_26.2.app ]; then - sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer + if [ -d /Applications/Xcode_26.1.app ]; then + sudo xcode-select -s /Applications/Xcode_26.1.app/Contents/Developer fi echo "===== Current Xcode =====" @@ -69,8 +69,8 @@ jobs: - name: Select Xcode (prefer 26.0) run: | - if [ -d /Applications/Xcode_26.2.app ]; then - sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer + if [ -d /Applications/Xcode_26.1.app ]; then + sudo xcode-select -s /Applications/Xcode_26.1.app/Contents/Developer fi echo "===== Current Xcode =====" From bf6a9441b539b8b8d4d3865b5e332800c256b6eb Mon Sep 17 00:00:00 2001 From: Ruri <888mfvjygb@privaterelay.appleid.com> Date: Tue, 28 Jul 2026 12:55:01 +0800 Subject: [PATCH 15/16] Update Xcode version selection in workflow --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 959e62ad..07577e57 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,8 +20,8 @@ jobs: - name: Select Xcode (prefer 26.0) run: | - if [ -d /Applications/Xcode_26.1.app ]; then - sudo xcode-select -s /Applications/Xcode_26.1.app/Contents/Developer + if [ -d /Applications/Xcode_26.5.app ]; then + sudo xcode-select -s /Applications/Xcode_26.5.app/Contents/Developer fi echo "===== Current Xcode =====" @@ -69,8 +69,8 @@ jobs: - name: Select Xcode (prefer 26.0) run: | - if [ -d /Applications/Xcode_26.1.app ]; then - sudo xcode-select -s /Applications/Xcode_26.1.app/Contents/Developer + if [ -d /Applications/Xcode_26.5.app ]; then + sudo xcode-select -s /Applications/Xcode_26.5.app/Contents/Developer fi echo "===== Current Xcode =====" From 26608cee65a8bcf34241c020ccd5ef1f68480708 Mon Sep 17 00:00:00 2001 From: Ruri <888mfvjygb@privaterelay.appleid.com> Date: Tue, 28 Jul 2026 12:57:13 +0800 Subject: [PATCH 16/16] Disable LLVM modules in iOS toolchain presets --- Scripts/swift-ios-toolchain-presets.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/swift-ios-toolchain-presets.ini b/Scripts/swift-ios-toolchain-presets.ini index a6aa15f1..b110ffb1 100644 --- a/Scripts/swift-ios-toolchain-presets.ini +++ b/Scripts/swift-ios-toolchain-presets.ini @@ -37,7 +37,7 @@ build-swift-libexec=0 build-runtime-with-host-compiler=0 skip-build-benchmarks llvm-include-tests=0 -llvm-enable-modules=1 +llvm-enable-modules=0 build-swift-examples=0 swift-include-tests=0 darwin-deployment-version-ios=16.0