From e769a29b2eb84a271cbbb8e88b55d186c0504e7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Thu, 4 Dec 2025 09:40:59 +0100 Subject: [PATCH 01/14] Add Windows build workflow --- .github/workflows/test.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0aeab56f0a..979d21282b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -58,3 +58,28 @@ jobs: path: .build - name: Run tests run: make spm_test + + spm_windows: + name: SPM, Windows, Swift ${{ matrix.swift-version }} + runs-on: windows-${{ matrix.windows-version }} + strategy: + matrix: + include: + - windows-version: 2025 + swift-version: 6.2.1 + steps: + - uses: compnerd/gha-setup-swift@main + with: + swift-version: swift-${{ matrix.swift-version }}-release + swift-build: ${{ matrix.swift-version }}-RELEASE + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + with: + persist-credentials: false + - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 + with: + key: ${{ runner.os }}-spm-${{ matrix.swift-version }}-${{ hashFiles('Package.resolved', 'Package.swift') }} + restore-keys: ${{ runner.os }}-spm-${{ matrix.swift-version }}- + path: .build + - name: Build + run: swift build --build-tests + # To be extended with test execution and linting ... From 1f91bfcf58ceefaf18b93202e93ed592c4529d06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Thu, 4 Dec 2025 09:41:04 +0100 Subject: [PATCH 02/14] Add build for ARM version --- .github/workflows/test.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 979d21282b..eb81e0c91c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,25 +60,33 @@ jobs: run: make spm_test spm_windows: - name: SPM, Windows, Swift ${{ matrix.swift-version }} + name: SPM, Windows ${{ matrix.windows-display-name }}, Swift ${{ matrix.swift-version }} runs-on: windows-${{ matrix.windows-version }} strategy: + fail-fast: false matrix: include: - windows-version: 2025 + arch: amd64 + windows-display-name: 'Server 2025' + swift-version: 6.2.1 + - windows-version: 11-arm + arch: arm64 + windows-display-name: '11 ARM' swift-version: 6.2.1 steps: - uses: compnerd/gha-setup-swift@main with: swift-version: swift-${{ matrix.swift-version }}-release swift-build: ${{ matrix.swift-version }}-RELEASE + build_arch: ${{ matrix.arch }} - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 with: persist-credentials: false - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: - key: ${{ runner.os }}-spm-${{ matrix.swift-version }}-${{ hashFiles('Package.resolved', 'Package.swift') }} - restore-keys: ${{ runner.os }}-spm-${{ matrix.swift-version }}- + key: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}-${{ hashFiles('Package.resolved', 'Package.swift') }} + restore-keys: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}- path: .build - name: Build run: swift build --build-tests From cb93807d47735147d9d59a6bf34e71db0312027a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Thu, 4 Dec 2025 09:41:10 +0100 Subject: [PATCH 03/14] Run selected tests --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eb81e0c91c..7eb01579ac 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -88,6 +88,8 @@ jobs: key: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}-${{ hashFiles('Package.resolved', 'Package.swift') }} restore-keys: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}- path: .build - - name: Build + - name: Build all targets run: swift build --build-tests + - name: Run selected tests + run: swift test --skip IntegrationTests --skip FileSystemAccessTests # To be extended with test execution and linting ... From fe31ce06c55d3a601a076d190f0f2f86bc8bf1de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Thu, 4 Dec 2025 09:41:15 +0100 Subject: [PATCH 04/14] Run Swift commands verbosely --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7eb01579ac..5c62ff5592 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -89,7 +89,7 @@ jobs: restore-keys: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}- path: .build - name: Build all targets - run: swift build --build-tests + run: swift build --build-tests --vv - name: Run selected tests - run: swift test --skip IntegrationTests --skip FileSystemAccessTests + run: swift test --vv --skip IntegrationTests --skip FileSystemAccessTests # To be extended with test execution and linting ... From 85ef4af16bcb5fe2d81ee646714a1743d692b53e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Thu, 4 Dec 2025 09:41:21 +0100 Subject: [PATCH 05/14] Build with Bazel --- .bazelrc | 25 ++++++++++++++++--------- .github/workflows/test.yml | 25 +++++++++++++++++-------- BUILD | 9 +++++++++ 3 files changed, 42 insertions(+), 17 deletions(-) diff --git a/.bazelrc b/.bazelrc index 0304307c3c..7171a8d7c3 100644 --- a/.bazelrc +++ b/.bazelrc @@ -4,16 +4,23 @@ try-import %workspace%/ci.bazelrc try-import %workspace%/user.bazelrc build --enable_platform_specific_config -build:macos --apple_crosstool_top=@local_config_apple_cc//:toolchain -build:macos --crosstool_top=@local_config_apple_cc//:toolchain -build:macos --host_crosstool_top=@local_config_apple_cc//:toolchain -build --macos_minimum_os=13.5 --host_macos_minimum_os=13.5 -build --disk_cache=~/.bazel_cache -build --experimental_remote_cache_compression -build --remote_build_event_upload=minimal -build --nolegacy_important_outputs -build --incompatible_strict_action_env +build:macos \ + --apple_crosstool_top=@local_config_apple_cc//:toolchain \ + --crosstool_top=@local_config_apple_cc//:toolchain \ + --host_crosstool_top=@local_config_apple_cc//:toolchain \ + --macos_minimum_os=13.5 --host_macos_minimum_os=13.5 + +build:windows \ + --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows-clang-cl \ + --extra_execution_platforms=//:x64_windows-clang-cl + +build \ + --disk_cache=~/.bazel_cache \ + --experimental_remote_cache_compression \ + --remote_build_event_upload=minimal \ + --nolegacy_important_outputs \ + --incompatible_strict_action_env build:release \ --compilation_mode=opt \ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5c62ff5592..0ba36cf251 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,6 +74,9 @@ jobs: arch: arm64 windows-display-name: '11 ARM' swift-version: 6.2.1 + env: + CC: clang + BAZEL_LLVM: C:\Program Files\LLVM steps: - uses: compnerd/gha-setup-swift@main with: @@ -83,13 +86,19 @@ jobs: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 with: persist-credentials: false - - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 - with: - key: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}-${{ hashFiles('Package.resolved', 'Package.swift') }} - restore-keys: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}- - path: .build - - name: Build all targets - run: swift build --build-tests --vv + - name: Apply patch + run: | + git apply --ignore-whitespace .bcr/patches/no-warnings-as-errors.patch + git update-index --assume-unchanged BUILD + - name: Build SwiftLint + run: bazel build //:swiftlint --toolchain_resolution_debug=.* - name: Run selected tests - run: swift test --vv --skip IntegrationTests --skip FileSystemAccessTests + run: > + bazel test --test_output=errors + //Tests:BuiltInRulesTests + //Tests:CoreTests + //Tests:ExtraRulesTests + //Tests:FrameworkTests + //Tests:GeneratedTests + //Tests:MacrosTests # To be extended with test execution and linting ... diff --git a/BUILD b/BUILD index 354fdfa73f..ee5e36c2e8 100644 --- a/BUILD +++ b/BUILD @@ -23,6 +23,15 @@ config_setting( }, ) +platform( + name = "x64_windows-clang-cl", + constraint_values = [ + "@platforms//cpu:x86_64", + "@platforms//os:windows", + "@bazel_tools//tools/cpp:clang-cl", + ], +) + # Targets swift_library( From e8d4e35248049cfe39fec88c309bad620bc23ae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Thu, 4 Dec 2025 09:41:28 +0100 Subject: [PATCH 06/14] Yams fix --- MODULE.bazel | 9 +++++++++ bazel/Yams.BUILD.bazel.patch | 13 +++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 bazel/Yams.BUILD.bazel.patch diff --git a/MODULE.bazel b/MODULE.bazel index a662b1076e..957d6ef809 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -17,6 +17,15 @@ bazel_dep(name = "sourcekitten", version = "0.37.2", repo_name = "SourceKittenFr bazel_dep(name = "swift_argument_parser", version = "1.6.2", repo_name = "SwiftArgumentParser") bazel_dep(name = "yams", version = "6.2.0", repo_name = "Yams") +archive_override( + module_name = "yams", + urls = ["https://github.com/jpsim/Yams/archive/refs/tags/6.2.0.tar.gz"], + strip_prefix = "Yams-6.2.0", + integrity = "sha256-UnGMXmV3iaQBXhdiDgWdd2LzYmHDvvv8E6SXe3obnQg=", + patches = ["//bazel:Yams.BUILD.bazel.patch"], + patch_strip = 1, +) + swiftlint_repos = use_extension("//bazel:repos.bzl", "swiftlint_repos_bzlmod") use_repo( swiftlint_repos, diff --git a/bazel/Yams.BUILD.bazel.patch b/bazel/Yams.BUILD.bazel.patch new file mode 100644 index 0000000000..4eba183781 --- /dev/null +++ b/bazel/Yams.BUILD.bazel.patch @@ -0,0 +1,13 @@ +diff --git a/BUILD b/BUILD +index c13d726..13ef414 100644 +--- a/BUILD ++++ b/BUILD +@@ -8,7 +8,7 @@ cc_library( + ]), + hdrs = ["Sources/CYaml/include/yaml.h"], + # Requires because of https://github.com/bazelbuild/bazel/pull/10143 otherwise host transition builds fail +- copts = ["-fPIC"], ++ copts = ["-fPIC", "-DYAML_DECLARE_STATIC"], + includes = ["Sources/CYaml/include"], + linkstatic = True, + tags = ["swift_module"], From c254904b501dd4bc1005edd8bf0d531c01de36a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Thu, 4 Dec 2025 09:41:35 +0100 Subject: [PATCH 07/14] Simplify toolchain setup --- .bazelrc | 4 ++-- .github/workflows/test.yml | 3 --- BUILD | 9 --------- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/.bazelrc b/.bazelrc index 7171a8d7c3..08e471c21e 100644 --- a/.bazelrc +++ b/.bazelrc @@ -12,8 +12,8 @@ build:macos \ --macos_minimum_os=13.5 --host_macos_minimum_os=13.5 build:windows \ - --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows-clang-cl \ - --extra_execution_platforms=//:x64_windows-clang-cl + --compiler=clang-cl \ + --action_env=BAZEL_USE_CPP_ONLY_TOOLCHAIN=1 build \ --disk_cache=~/.bazel_cache \ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0ba36cf251..3cc726aa97 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,9 +74,6 @@ jobs: arch: arm64 windows-display-name: '11 ARM' swift-version: 6.2.1 - env: - CC: clang - BAZEL_LLVM: C:\Program Files\LLVM steps: - uses: compnerd/gha-setup-swift@main with: diff --git a/BUILD b/BUILD index ee5e36c2e8..354fdfa73f 100644 --- a/BUILD +++ b/BUILD @@ -23,15 +23,6 @@ config_setting( }, ) -platform( - name = "x64_windows-clang-cl", - constraint_values = [ - "@platforms//cpu:x86_64", - "@platforms//os:windows", - "@bazel_tools//tools/cpp:clang-cl", - ], -) - # Targets swift_library( From c44ee175b03f8b6c4d3bb9b44e29cf81d57eef02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Thu, 4 Dec 2025 09:41:42 +0100 Subject: [PATCH 08/14] Remove ARM build --- .github/workflows/test.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3cc726aa97..5b42baf765 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -70,10 +70,6 @@ jobs: arch: amd64 windows-display-name: 'Server 2025' swift-version: 6.2.1 - - windows-version: 11-arm - arch: arm64 - windows-display-name: '11 ARM' - swift-version: 6.2.1 steps: - uses: compnerd/gha-setup-swift@main with: From 5cb0614fb2726060ad6174f14f4d6d0741753a55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Thu, 4 Dec 2025 09:41:49 +0100 Subject: [PATCH 09/14] Use development snapshot --- .github/workflows/test.yml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5b42baf765..3fbc5e6b72 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,7 +60,7 @@ jobs: run: make spm_test spm_windows: - name: SPM, Windows ${{ matrix.windows-display-name }}, Swift ${{ matrix.swift-version }} + name: SPM, Windows ${{ matrix.windows-display-name }} runs-on: windows-${{ matrix.windows-version }} strategy: fail-fast: false @@ -69,12 +69,13 @@ jobs: - windows-version: 2025 arch: amd64 windows-display-name: 'Server 2025' - swift-version: 6.2.1 + swift-version: development + swift-build: DEVELOPMENT-SNAPSHOT-2025-08-27-a steps: - uses: compnerd/gha-setup-swift@main with: - swift-version: swift-${{ matrix.swift-version }}-release - swift-build: ${{ matrix.swift-version }}-RELEASE + swift-version: ${{ matrix.swift-version }} + swift-build: ${{ matrix.swift-build }} build_arch: ${{ matrix.arch }} - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 with: @@ -83,15 +84,13 @@ jobs: run: | git apply --ignore-whitespace .bcr/patches/no-warnings-as-errors.patch git update-index --assume-unchanged BUILD - - name: Build SwiftLint - run: bazel build //:swiftlint --toolchain_resolution_debug=.* + - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 + with: + key: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}-${{ matrix.swift-build }}-${{ hashFiles('Package.resolved', 'Package.swift') }} + restore-keys: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}-${{ matrix.swift-build }}- + path: .build + - name: Build all targets + run: swift build --build-tests - name: Run selected tests - run: > - bazel test --test_output=errors - //Tests:BuiltInRulesTests - //Tests:CoreTests - //Tests:ExtraRulesTests - //Tests:FrameworkTests - //Tests:GeneratedTests - //Tests:MacrosTests + run: swift test --skip IntegrationTests --skip FileSystemAccessTests # To be extended with test execution and linting ... From 6bd0c00e7d3a20f0247091344aefb0d62b10fd84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Thu, 4 Dec 2025 09:41:55 +0100 Subject: [PATCH 10/14] Enable long path support --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3fbc5e6b72..a3f39e5afd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -72,6 +72,8 @@ jobs: swift-version: development swift-build: DEVELOPMENT-SNAPSHOT-2025-08-27-a steps: + - name: Enable long path support + run: reg add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f - uses: compnerd/gha-setup-swift@main with: swift-version: ${{ matrix.swift-version }} From 87322b16bde88d51fc3be1933db95ea9816ae46d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Thu, 4 Dec 2025 09:42:02 +0100 Subject: [PATCH 11/14] Skip more tests --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a3f39e5afd..5689545f32 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -94,5 +94,5 @@ jobs: - name: Build all targets run: swift build --build-tests - name: Run selected tests - run: swift test --skip IntegrationTests --skip FileSystemAccessTests + run: swift test --skip IntegrationTests --skip FileSystemAccessTests --skip FrameworkTests --skip BuiltInRulesTests # To be extended with test execution and linting ... From 0e408552b665330d5823d805a957b777d88d5b82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Thu, 4 Dec 2025 09:42:08 +0100 Subject: [PATCH 12/14] Do not apply patch --- .github/workflows/test.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5689545f32..e52de65685 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -82,10 +82,6 @@ jobs: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 with: persist-credentials: false - - name: Apply patch - run: | - git apply --ignore-whitespace .bcr/patches/no-warnings-as-errors.patch - git update-index --assume-unchanged BUILD - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: key: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}-${{ matrix.swift-build }}-${{ hashFiles('Package.resolved', 'Package.swift') }} From d0f91280b63c7dad73bab63ebb5940df7227df3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Thu, 4 Dec 2025 09:42:21 +0100 Subject: [PATCH 13/14] Re-add ARM build --- .github/workflows/test.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e52de65685..e76188953e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -62,6 +62,9 @@ jobs: spm_windows: name: SPM, Windows ${{ matrix.windows-display-name }} runs-on: windows-${{ matrix.windows-version }} + env: + SWIFT_VERSION: development + SWIFT_BUILD: DEVELOPMENT-SNAPSHOT-2025-08-27-a strategy: fail-fast: false matrix: @@ -69,23 +72,24 @@ jobs: - windows-version: 2025 arch: amd64 windows-display-name: 'Server 2025' - swift-version: development - swift-build: DEVELOPMENT-SNAPSHOT-2025-08-27-a + - windows-version: '11-arm' + arch: arm64 + windows-display-name: '11 ARM' steps: - name: Enable long path support run: reg add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f - uses: compnerd/gha-setup-swift@main with: - swift-version: ${{ matrix.swift-version }} - swift-build: ${{ matrix.swift-build }} + swift-version: ${{ env.SWIFT_VERSION }} + swift-build: ${{ env.SWIFT_BUILD }} build_arch: ${{ matrix.arch }} - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 with: persist-credentials: false - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: - key: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}-${{ matrix.swift-build }}-${{ hashFiles('Package.resolved', 'Package.swift') }} - restore-keys: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}-${{ matrix.swift-build }}- + key: windows-${{ matrix.windows-version }}-spm-${{ env.SWIFT_VERSION }}-${{ env.SWIFT_BUILD }}-${{ hashFiles('Package.resolved', 'Package.swift') }} + restore-keys: windows-${{ matrix.windows-version }}-spm-${{ env.SWIFT_VERSION }}-${{ env.SWIFT_BUILD }}- path: .build - name: Build all targets run: swift build --build-tests From 548e1a1a89e504d6c70a4050c2931800dffa0e63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Thu, 4 Dec 2025 18:58:26 +0100 Subject: [PATCH 14/14] Revert unneeded changes --- .bazelrc | 25 +++++++++---------------- MODULE.bazel | 9 --------- bazel/Yams.BUILD.bazel.patch | 13 ------------- 3 files changed, 9 insertions(+), 38 deletions(-) delete mode 100644 bazel/Yams.BUILD.bazel.patch diff --git a/.bazelrc b/.bazelrc index 08e471c21e..0304307c3c 100644 --- a/.bazelrc +++ b/.bazelrc @@ -4,23 +4,16 @@ try-import %workspace%/ci.bazelrc try-import %workspace%/user.bazelrc build --enable_platform_specific_config +build:macos --apple_crosstool_top=@local_config_apple_cc//:toolchain +build:macos --crosstool_top=@local_config_apple_cc//:toolchain +build:macos --host_crosstool_top=@local_config_apple_cc//:toolchain -build:macos \ - --apple_crosstool_top=@local_config_apple_cc//:toolchain \ - --crosstool_top=@local_config_apple_cc//:toolchain \ - --host_crosstool_top=@local_config_apple_cc//:toolchain \ - --macos_minimum_os=13.5 --host_macos_minimum_os=13.5 - -build:windows \ - --compiler=clang-cl \ - --action_env=BAZEL_USE_CPP_ONLY_TOOLCHAIN=1 - -build \ - --disk_cache=~/.bazel_cache \ - --experimental_remote_cache_compression \ - --remote_build_event_upload=minimal \ - --nolegacy_important_outputs \ - --incompatible_strict_action_env +build --macos_minimum_os=13.5 --host_macos_minimum_os=13.5 +build --disk_cache=~/.bazel_cache +build --experimental_remote_cache_compression +build --remote_build_event_upload=minimal +build --nolegacy_important_outputs +build --incompatible_strict_action_env build:release \ --compilation_mode=opt \ diff --git a/MODULE.bazel b/MODULE.bazel index 957d6ef809..a662b1076e 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -17,15 +17,6 @@ bazel_dep(name = "sourcekitten", version = "0.37.2", repo_name = "SourceKittenFr bazel_dep(name = "swift_argument_parser", version = "1.6.2", repo_name = "SwiftArgumentParser") bazel_dep(name = "yams", version = "6.2.0", repo_name = "Yams") -archive_override( - module_name = "yams", - urls = ["https://github.com/jpsim/Yams/archive/refs/tags/6.2.0.tar.gz"], - strip_prefix = "Yams-6.2.0", - integrity = "sha256-UnGMXmV3iaQBXhdiDgWdd2LzYmHDvvv8E6SXe3obnQg=", - patches = ["//bazel:Yams.BUILD.bazel.patch"], - patch_strip = 1, -) - swiftlint_repos = use_extension("//bazel:repos.bzl", "swiftlint_repos_bzlmod") use_repo( swiftlint_repos, diff --git a/bazel/Yams.BUILD.bazel.patch b/bazel/Yams.BUILD.bazel.patch deleted file mode 100644 index 4eba183781..0000000000 --- a/bazel/Yams.BUILD.bazel.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/BUILD b/BUILD -index c13d726..13ef414 100644 ---- a/BUILD -+++ b/BUILD -@@ -8,7 +8,7 @@ cc_library( - ]), - hdrs = ["Sources/CYaml/include/yaml.h"], - # Requires because of https://github.com/bazelbuild/bazel/pull/10143 otherwise host transition builds fail -- copts = ["-fPIC"], -+ copts = ["-fPIC", "-DYAML_DECLARE_STATIC"], - includes = ["Sources/CYaml/include"], - linkstatic = True, - tags = ["swift_module"],