Immutable
release. Only release title and notes can be modified.
Breaking changes
- Removed
WORKSPACEsupport - Drop bazel 7 support
- Remove
swift.vfs_overlay(useswift.use_explicit_swift_module_mapinstead) by @keith in #1781
New features
- Add opt-in support for explicit modules, see the docs for usage.
- Add opt-in layering check, enable with
--features=swift.layering_check_swift - Add Hermetic Swift Toolchain Support with Bzlmod Extension by @ma-oli in #1630
- Add
swift.emit_localized_stringsfeature for compiler string extraction by @jpsim in #1776
Other notable changes
- Fix issues building on some Linux versions by @luispadron in #1633
- Dont pass -file-prefix-map with Xcode path remap on Linux by @luispadron in #1634
- remove WORKSPACE support by @aaronsky in #1613
- Cherry-pick: start refactoring the Swift build APIs to remove the C++ toolchain as a dependency of the Swift toolchain. by @luispadron in #1635
- Updates swift_argument_parser version by @csmulhern in #1636
- Add missing Swift 6.2 upcoming features for v6 mode by @luispadron in #1637
- Fix executing tests by @marekcirkos in #1639
- Update
const_protocols_to_gather.jsonto latest by @kntkymt in #1641 - chore: update main CI for latest Bazel by @luispadron in #1644
- Update protobuf dependency version to 33.4 for Bazel 9 by @luispadron in #1647
- Refactor toolchains to avoid eagerly evaluating autoconfig repo by @dzbarsky in #1651
- Fix
datapropagation to underlying libs for mixed libraries by @luispadron in #1654 - Update protobuf to 34.0 for Bazel 9 by @luispadron in #1656
- Update BCR presubmit for Bazel 9 & rolling releases and drop Bazel 7 by @luispadron in #1658
- use prebuilt proto toolchain from protobuf@34.0 by @aaronsky in #1660
- Revert "Use apple constraints over config_setting_group in select (#1… by @ma-oli in #1665
- Update swift-syntax for bazel 9.x support by @keith in #1666
- fix(toolchain): preserve -target flag when sdkroot is set by @ma-oli in #1662
- Only use
-Xcc -working-directory -Xcc .when emitting PCM files, not when compiling Swift code that consumes them. by @luispadron in #1663 - test(toolchain): add toolchains unit tests by @ma-oli in #1667
- Fix empty target_system_name by @thii in #1668
- Add Hermetic Swift Toolchain Support with Bzlmod Extension by @ma-oli in #1630
- Avoid emitting
-LNoneindeveloper_dirs_linkoptson Linux by @bc-lee in #1670 - Explicitly pass .swiftmodule and .swiftinterface files as action inputs by @adincebic in #1583
- Pass
--incompatible_enable_proto_toolchain_resolutionfor BCR builds by @adincebic in #1678 - Use CC toolchain from rules_cc in tests by @adincebic in #1680
- Remove the extra coverage file support. by @keith in #1682
- Remove _cc_toolchain attr by @keith in #1681
- Add flag_aliases for swiftcopt by @keith in #1683
- Update comment for -coverage-prefix-pwd-is-canonical by @kirillyakimovich in #1646
- Make sure gazelle is up to date on CI by @keith in #1688
- chore: Remove getattr for Bazel 6 compatibility fallback in target tr… by @manojmahapatra in #1689
- Update buildifier by @keith in #1690
- Remove repo name from flag_alias for now by @keith in #1693
- Fix more bzl_library visibility by @keith in #1692
- Update some bazelrc flags by @keith in #1696
- Add linux support to tools/swift-releases by @keith in #1699
- Fix is exec config for 9.0.0 by @keith in #1698
- Improve linux failure message by @keith in #1704
- Fix argv[0] with process spawning by @keith in #1700
- Partially fix swiftly usage by @keith in #1701
- Add --check_direct_dependencies=off by @keith in #1702
- Fix new warning when building modules by @keith in #1697
- Add clang_module to precompile_clang_module return by @keith in #1707
- Add support for user.bazelrc by @keith in #1706
- Cherry pick some swiftinterface compile fixes by @keith in #1705
- Fix missing bzl_library dep by @keith in #1708
- Remove old docs symbols by @keith in #1709
- Extract swift version on linux by @keith in #1710
- Improve docs setup by @keith in #1711
- Disable warnings from creating system PCMs by @keith in #1714
- Remove -disable-implicit-swift-modules by @keith in #1713
- Pass additional_swiftc_copts to PCM compiles by @keith in #1715
- Embed PCM paths in swiftmodules for explicit modules by @keith in #1716
- Disable clang warning about relocated PCMs by @keith in #1717
- Pass --target through -Xcc by @keith in #1718
- Skip clangModuleMapPath for system modules by @keith in #1684
- Add test/transitions.bzl by @keith in #1720
- Add action config for swiftinterface to swift_toolchain by @keith in #1722
- Add explicit module support by @keith in #1687
- Add clang-format pre-commit hook by @keith in #1724
- Add arm64e to scanner by @keith in #1726
- Add swift_verify_test rule by @keith in #1727
- Add explicit module app extension test by @keith in #1728
- Parallelize more scanning by @keith in #1729
- Remove old pcm_file API by @keith in #1723
- drop bazel 7 support by @aaronsky in #1730
- Use all_compile_action_names when possible by @keith in #1725
- Fix clang-format by @keith in #1734
- Add more SwiftInfo to system_module_group by @keith in #1732
- Add verify test for add_default_precompiled_modules by @keith in #1731
- Add separate sdk toolchain type by @keith in #1733
- Parse /usr/include/module.modulemap for explicit modules by @keith in #1735
- Add cross import overlay handling by @keith in #1737
- Remove XCTest specific linker flags by @keith in #1740
- Add error for objc pcm with explicit modules by @keith in #1739
- Handle cross import overlays from transitive deps by @keith in #1742
- Fix linking cross module overlays without use_explicit_swift_module_map by @keith in #1743
- Remove absolute path to Xcode from rpaths by @keith in #1741
- Don't drop -target from swiftinterface files by @keith in #1746
- Use developer dir symlink for swiftinterfaces by @keith in #1747
- Update pre-commit hooks by @keith in #1748
- Handle -v in the worker by @keith in #1750
- Remove duplicated variables in proto code by @keith in #1752
- Fix test observer warnings-as-errors build by @AttilaTheFun in #1754
- docs: add standalone Swift toolchain guide by @ma-oli in #1755
- Cleanup argument parser label by @keith in #1756
- Add -prefix-serialized-debugging-options by @keith in #1757
- Always enable -no-clang-module-breadcrumbs by @keith in #1758
- Fix the test observer's handling of suites in more recent version of swift-testing. by @keith in #1760
- Factor out the computation of the entry point name for binary rules into its own helper function. by @keith in #1763
- Stop using
-Xfrontendfor-module-alias. by @keith in #1765 - Add the ability to ban compiler flags by prefix. by @keith in #1769
- Move the C++ toolchain into its own execution group by @keith in #1759
- Unconditionally add the
testingmacro plugin subdirectory to compile actions. by @keith in #1772 - Only disable parse_headers when calling cc_common.compile on a set of headers that include the Swift generated header. by @keith in #1773
- Remove supports Swift 6 feature by @keith in #1771
- Add a mechanism to pass through arbitrary flags to other tools that the Swift worker invokes, and apply it to the generated header rewriter. by @keith in #1774
- Unify early exit for now tests behavior by @keith in #1761
- Wording adjustments by @keith in #1762
- Make the presence of a
swift_overlayimply the same thing as theauto_modulehint if no otherswift_interop_hintis provided. by @keith in #1766 - Add some upstream worker libs by @keith in #1775
- Add a
feature_configurationargument toderive_swift_module_name. by @keith in #1764 - Add direct_swift_infos to SwiftInteropInfo by @keith in #1767
- Allow a target using
create_swift_interop_infoto supply a different compilation context for Swift module map generation than the one that it propagates in itsCcInfo. by @keith in #1770 - Clean up some features that are no longer needed. by @keith in #1778
- Remove logic that re-exports specific dependency attributes from
swift_clang_module_aspectthat is no longer used. by @keith in #1777 - Add swift.emit_localized_strings feature for compiler string extraction by @jpsim in #1776
- Refactor argument parsing in worker by @keith in #1779
- Implement swift layering check by @keith in #1780
- Remove swift.vfs_overlay by @keith in #1781
- Pass job_env through to hermetic pcm logic by @keith in #1784
- Add docs on explicit modules precompiled frameworks by @keith in #1786
- Use -swift-module-file for explicit modules by @keith in #1787
- Fix symlinks to developer dir by @keith in #1791
- Revert "Use -swift-module-file for explicit modules (#1787)" by @keith in #1789
- Update explicit module docs by @keith in #1795
- Add GitHub actions job for Xcode 26.4 tests by @keith in #1790
- Use new GA workflow for releases by @keith in #1797
- Remove unused configurator by @keith in #1792
- Pass -disallow-implicit-swift-modules with explicit modules + deps by @keith in #1788
- Only pass system pcms through explicit json file by @keith in #1794
- Remove -fmodule-file when using explicit json file by @keith in #1799
- Stop using repo_name by @adincebic in #1753
- Fix linux host with explicit modules by @keith in #1800
- Fix BareSlashRegexLiterals warning by @keith in #1801
- Update lldb explicit module docs by @keith in #1802
- Propagate testonly to mixed language headers by @brentleyjones in #1803
- Scope -clang-target to explicit modules by @keith in #1804
- Add docs to bcr releases by @keith in #1805
- Fix swift_overlay using wrong features variable by @keith in #1806
- Create ready for review PR on BCR by @adincebic in #1808
- Mark explicit modules module extension as reproducible by @keith in #1810
- Allow suppression aspect hints to override rules by @keith in #1811
- Remove test specific bzl_library targets by @keith in #1812
- Add top level example by @keith in #1814
- use a perl script for mixed_language_module_map_extender by @alex-ameen in #1624
- Add swift_binary(linkshared = True) for shared libraries by @AttilaTheFun in #1820
- Add shared framework for Swift SDK cross-compilation toolchains by @AttilaTheFun in #1821
- Move developer dir remapping to features by @keith in #1825
- Format embedded BUILD tpl by @keith in #1823
- Support cross-compiling to Android with a Swift SDK by @AttilaTheFun in #1818
- Remove file_prefix_map disable from embedded setup by @keith in #1824
- Ignore examples for bzl_library generation by @keith in #1826
- Build and test Swift natively on a Windows host by @AttilaTheFun in #1819
- Support cross-compiling to WebAssembly with a Swift SDK by @AttilaTheFun in #1817
- Link libdispatch for Swift Concurrency on Android by @AttilaTheFun in #1830
- Correctly forward external_include_paths to swift compiler by @DoDoENT in #1829
- Rename toolchain template BUILD file by @keith in #1836
- Remove unnecessary renaming in load statements by @keith in #1832
- Remove for_bazel_tests by @keith in #1831
- Remove @mattrobmattrob from CODEOWNERS by @mattrobmattrob in #1837
- Update bazel_features by @keith in #1838
- Remove depsets from many linkopts uses by @keith in #1839
- Move non_module_deps into MODULE.bazel by @keith in #1846
- Remove swift fragment conditional by @keith in #1848
- Stop using bazel_features for extension_metadata by @keith in #1841
- Move xcode_swift_toolchain out of local repo by @keith in #1845
- Export bzl file for docs by @keith in #1844
- Remove explicit apple_support use_extension by @keith in #1840
- Move swift shas to json files by @keith in #1834
- Update Swift release metadata by @github-actions[bot] in #1849
- Cancel github actions test jobs on the same PR by @keith in #1847
- Expand target list on CI by @keith in #1843
- Add rules_python flags for remote exec by @keith in #1854
- Move wasm templating to separate BUILD file by @keith in #1835
- Fix missing runfiles for proto rules by @keith in #1855
- Fix WMO num-threads detection by @qyang-nj in #1856
- Fix incorrect triple for Android by @keith in #1859
- Remove -objc_abi_version linker flag by @keith in #1862
- Remove Xcode rpaths for non macOS binaries by @keith in #1864
- Improve hermetic toolchain support, add static stdlib support by @keith in #1853
- Fix pre-commit formatting by @keith in #1868
- Fix -verify with remote exec by @keith in #1867
- Use HEAD rules_android for CI by @keith in #1869
- Remove toolchain_name from sdk module extensions by @keith in #1833
- Move android templating to separate BUILD file by @keith in #1863
- Scope linkopts logic to wasm by @keith in #1865
- Fix multiple archive_overrides by @keith in #1871
- Fix symbolgraph extraction with explicit modules by @keith in #1870
- Add missing repo name to docs by @keith in #1872
- fix(mixed_language_library): Include own source files in code coverage file info by @amorde in #1874
- Fix spaces in defines by @keith in #1877
- Add a test for mixed_language_coverage instrumented files by @keith in #1875
- Don't generate macOS target toolchain from hermetic toolchains by @keith in #1876
- Gate the direct SwiftInfo pass-throughs on the layering features by @mauriciogg in #1879
- Move dev dependencies into MODULE.bazel by @keith in #1882
- Delete unused worker proto by @keith in #1883
- Update include to avoid musl warning by @keith in #1888
- Fix an error from
-Wsign-compareby @Yannic in #1889 - Add more known bad modules for Xcode 27 by @keith in #1890
- Add opt-in direct compiler plugin loading by @markvasiv in #1891
- Add -disable-sandbox to module interface action by @keith in #1892
- Add target label to layering check violation message by @adincebic in #1893
- Export Swift binary from standalone toolchain by @adincebic in #1896
- Stop emitting
.swiftsourceinfoif not explicitly requested by @adincebic in #1895
New Contributors
- @marekcirkos made their first contribution in #1639
- @bc-lee made their first contribution in #1670
- @manojmahapatra made their first contribution in #1689
- @alex-ameen made their first contribution in #1624
- @DoDoENT made their first contribution in #1829
- @amorde made their first contribution in #1874
- @mauriciogg made their first contribution in #1879
- @Yannic made their first contribution in #1889
- @markvasiv made their first contribution in #1891
Full Changelog: 3.6.1...4.0.1
This release is compatible with Bazel 8.x LTS, 9.x LTS, and rolling releases.
MODULE.bazel Snippet
bazel_dep(name = "rules_swift", version = "4.0.1")