11load ("@rules_rust//rust:defs.bzl" , "rust_binary" , "rust_library" , "rust_test" )
2+ load (":swift_runtime.bzl" , "swift_runtime_libs" )
23load (":xcode_transition.bzl" , "xcode_transition_swift_library" )
34
45package (default_visibility = ["//visibility:public" ])
56
7+ swift_runtime_libs (
8+ name = "swift_runtime_libs" ,
9+ toolchain = "@swift_toolchain_ubuntu24.04//:files" ,
10+ )
11+
612# Targets in this package require a Swift toolchain (Linux or macOS).
713# `select()` gives us OR-of-OSes; other platforms get marked incompatible
814# so `bazel build/test //...` skips them cleanly.
@@ -50,7 +56,7 @@ rust_binary(
5056 # `xcode_swift_toolchain`).
5157 data = select ({
5258 "@platforms//os:macos" : [],
53- "@platforms//os:linux" : ["@swift_toolchain_ubuntu24.04//:files " ],
59+ "@platforms//os:linux" : [":swift_runtime_libs " ],
5460 }),
5561 edition = "2024" ,
5662 target_compatible_with = _SWIFT_SUPPORTED_PLATFORMS ,
@@ -63,7 +69,7 @@ rust_test(
6369 crate = ":swift_syntax_rs" ,
6470 data = select ({
6571 "@platforms//os:macos" : [],
66- "@platforms//os:linux" : ["@swift_toolchain_ubuntu24.04//:files " ],
72+ "@platforms//os:linux" : [":swift_runtime_libs " ],
6773 }),
6874 edition = "2024" ,
6975 target_compatible_with = _SWIFT_SUPPORTED_PLATFORMS ,
0 commit comments