Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ bazel_dep(name = "rules_shell", version = "0.3.0")
bazel_dep(name = "platforms", version = "0.0.9")
bazel_dep(name = "protobuf", version = "27.0", repo_name = "com_google_protobuf")
bazel_dep(name = "nlohmann_json", version = "3.6.1", repo_name = "com_github_nlohmann_json")
bazel_dep(name = "abseil-cpp", version = "20250127.0")
bazel_dep(name = "re2", version = "2024-07-02")
bazel_dep(
name = "swift_argument_parser",
version = "1.3.1.2",
Expand Down
2 changes: 1 addition & 1 deletion doc/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ that use the toolchain.
| <a id="SwiftToolchainInfo-package_configurations"></a>package_configurations | A list of `SwiftPackageConfigurationInfo` providers that specify additional compilation configuration options that are applied to targets on a per-package basis. |
| <a id="SwiftToolchainInfo-requested_features"></a>requested_features | `List` of `string`s. Features that should be implicitly enabled by default for targets built using this toolchain, unless overridden by the user by listing their negation in the `features` attribute of a target/package or in the `--features` command line flag.<br><br>These features determine various compilation and debugging behaviors of the Swift build rules, and they are also passed to the C++ APIs used when linking (so features defined in CROSSTOOL may be used here). |
| <a id="SwiftToolchainInfo-root_dir"></a>root_dir | `String`. The workspace-relative root directory of the toolchain. |
| <a id="SwiftToolchainInfo-swift_worker"></a>swift_worker | `File`. The executable representing the worker executable used to invoke the compiler and other Swift tools (for both incremental and non-incremental compiles). |
| <a id="SwiftToolchainInfo-swift_worker"></a>swift_worker | `File`. The executable that wraps Swift compiler invocations. |
| <a id="SwiftToolchainInfo-test_configuration"></a>test_configuration | `Struct` containing the following fields:<br><br>* `binary_name`: A template string used to compute the name of the output binary for `swift_test` rules. Any occurrences of the string `"{name}"` will be substituted by the name of the target.<br><br>* `env`: A `dict` of environment variables to be set when running tests that were built with this toolchain.<br><br>* `execution_requirements`: A `dict` of execution requirements for tests that were built with this toolchain.<br><br>* `objc_test_discovery`: A Boolean value indicating whether test targets should discover tests dynamically using the Objective-C runtime.<br><br>* `test_linking_contexts`: A list of `CcLinkingContext`s that provide additional flags to use when linking test binaries.<br><br>This is used, for example, with Xcode-based toolchains to ensure that the `xctest` helper and coverage tools are found in the correct developer directory when running tests. |
| <a id="SwiftToolchainInfo-tool_configs"></a>tool_configs | This field is an internal implementation detail of the build rules. |
| <a id="SwiftToolchainInfo-unsupported_features"></a>unsupported_features | `List` of `string`s. Features that should be implicitly disabled by default for targets built using this toolchain, unless overridden by the user by listing them in the `features` attribute of a target/package or in the `--features` command line flag.<br><br>These features determine various compilation and debugging behaviors of the Swift build rules, and they are also passed to the C++ APIs used when linking (so features defined in CROSSTOOL may be used here). |
Expand Down
7 changes: 3 additions & 4 deletions swift/internal/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ bzl_library(
":feature_names",
":features",
":module_maps",
":optimization",
":utils",
":vfsoverlay",
":wmo",
"//swift:providers",
"@bazel_skylib//lib:paths",
"@bazel_skylib//lib:sets",
Expand Down Expand Up @@ -314,9 +314,8 @@ bzl_library(
)

bzl_library(
name = "wmo",
srcs = ["wmo.bzl"],
visibility = ["//swift:__subpackages__"],
name = "optimization",
srcs = ["optimization.bzl"],
deps = [
":feature_names",
],
Expand Down
15 changes: 13 additions & 2 deletions swift/internal/action_names.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,17 @@
SWIFT_ACTION_AUTOLINK_EXTRACT = "SwiftAutolinkExtract"

# Compiles one or more `.swift` source files into a `.swiftmodule` and
# object files.
# object files. This is the legacy mode that emits all outputs from a single
# driver invocation.
SWIFT_ACTION_COMPILE = "SwiftCompile"

# Emits the object files and other per-source-file outputs for a a batch of
# `.swift` source files in a module.
SWIFT_ACTION_COMPILE_CODEGEN = "SwiftCompileCodegen"

# Compiles one or more `.swift` source files into a `.swiftmodule`.
SWIFT_ACTION_COMPILE_MODULE = "SwiftCompileModule"

# Compiles a `.swiftinterface` file into a `.swiftmodule` file.
SWIFT_ACTION_COMPILE_MODULE_INTERFACE = "SwiftCompileModuleInterface"

Expand Down Expand Up @@ -54,6 +62,8 @@ def all_action_names():
return (
SWIFT_ACTION_AUTOLINK_EXTRACT,
SWIFT_ACTION_COMPILE,
SWIFT_ACTION_COMPILE_CODEGEN,
SWIFT_ACTION_COMPILE_MODULE,
SWIFT_ACTION_COMPILE_MODULE_INTERFACE,
SWIFT_ACTION_DERIVE_FILES,
SWIFT_ACTION_DUMP_AST,
Expand All @@ -67,5 +77,6 @@ def all_compile_action_names():
"""Returns all actions that compile source files."""
return [
SWIFT_ACTION_COMPILE,
SWIFT_ACTION_COMPILE_MODULE_INTERFACE,
SWIFT_ACTION_COMPILE_CODEGEN,
SWIFT_ACTION_COMPILE_MODULE,
]
Loading