From 9b371cd6e1e47494d019feb08d6bdd38d0f04a30 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Fri, 10 Jul 2026 11:25:07 -0700 Subject: [PATCH 01/25] Use hermetic toolchain on Linux CI --- .bazelci/presubmit.yml | 35 +---------------------------------- MODULE.bazel | 5 +++-- 2 files changed, 4 insertions(+), 36 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 1e5c5e379..6a7b2443f 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -9,19 +9,8 @@ x_defaults: - "//..." test_targets: - "//..." - linux_environment: &linux_environment - platform: ubuntu2204 - environment: - SWIFT_VERSION: "6.3.3" - SWIFT_HOME: "$HOME/swift-$SWIFT_VERSION" - PATH: "$SWIFT_HOME/usr/bin:$PATH" linux_common: &linux_common - <<: *linux_environment - build_flags: &linux_flags - # On Linux, we look for Swift toolchain binaries on the path. We may be - # able to change this when we start auto-downloading toolchains (see - # https://github.com/bazelbuild/rules_swift/issues/4). - - "--action_env=PATH" + platform: ubuntu2204 build_targets: - "//..." - "-//examples/apple/..." @@ -29,12 +18,6 @@ x_defaults: test_targets: - "//..." - "-//examples/apple/..." - # The following tests require Swift >5.8. - - "-//test:const_values_empty_const_values_multiple_files" - - "-//test:const_values_empty_const_values_single_file" - - "-//test:const_values_expected_argv" - - "-//test:const_values_wmo_single_values_file" - - "-//test:output_file_map_default" windows_common: &windows_common platform: windows build_targets: @@ -75,28 +58,16 @@ tasks: ubuntu2204_latest: name: "Current LTS" bazel: latest - shell_commands: - - "echo --- Downloading and extracting Swift $SWIFT_VERSION to $SWIFT_HOME" - - "mkdir $SWIFT_HOME" - - "curl https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2204/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04.tar.gz | tar xvz --strip-components=1 -C $SWIFT_HOME" <<: *linux_common ubuntu2204_rolling: name: "Latest rolling" bazel: rolling - shell_commands: - - "echo --- Downloading and extracting Swift $SWIFT_VERSION to $SWIFT_HOME" - - "mkdir $SWIFT_HOME" - - "curl https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2204/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04.tar.gz | tar xvz --strip-components=1 -C $SWIFT_HOME" <<: *linux_common ubuntu2204_last_green: name: "Last Green Bazel" bazel: last_green - shell_commands: - - "echo --- Downloading and extracting Swift $SWIFT_VERSION to $SWIFT_HOME" - - "mkdir $SWIFT_HOME" - - "curl https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2204/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04.tar.gz | tar xvz --strip-components=1 -C $SWIFT_HOME" <<: *linux_common windows: @@ -129,10 +100,6 @@ tasks: name: "Doc tests" bazel: latest <<: *linux_environment - shell_commands: - - "echo --- Downloading and extracting Swift $SWIFT_VERSION to $SWIFT_HOME" - - "mkdir $SWIFT_HOME" - - "curl https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2204/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04.tar.gz | tar xvz --strip-components=1 -C $SWIFT_HOME" test_targets: - "doc/..." diff --git a/MODULE.bazel b/MODULE.bazel index 6b6a74319..e2d216567 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -145,8 +145,6 @@ http_archive( urls = ["https://github.com/MobileNativeFoundation/index-import/releases/download/6.1.0.1/index-import.tar.gz"], ) -register_toolchains("//swift/toolchains:all") - system_sdk = use_extension("//swift:extensions.bzl", "system_sdk") system_sdk.configure_sdks( # NOTE: This doesn't apply to downstream repos @@ -212,11 +210,14 @@ register_toolchains( "@swift_toolchain//:cc_toolchain_embedded_ubuntu22.04-aarch64", "@swift_toolchain//:cc_toolchain_embedded_xcode", "@swift_toolchain//:swift_toolchain_embedded_ubuntu22.04", + "@swift_toolchain//:swift_toolchain_exec_ubuntu22.04", "@swift_toolchain//:swift_toolchain_embedded_ubuntu22.04-aarch64", "@swift_toolchain//:swift_toolchain_embedded_xcode", dev_dependency = True, ) +register_toolchains("//swift/toolchains:all") + include("//examples/cross_compilation/android_app:android.MODULE.bazel") include("//examples/cross_compilation/wasm:wasm.MODULE.bazel") From 61a3305f67fece1a468cd246510ea8fe091c7868 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Fri, 10 Jul 2026 11:27:01 -0700 Subject: [PATCH 02/25] plat --- .bazelci/presubmit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 6a7b2443f..471f064a0 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -99,7 +99,7 @@ tasks: doc_tests: name: "Doc tests" bazel: latest - <<: *linux_environment + platform: ubuntu2204 test_targets: - "doc/..." From 376cddd71fd557d8853fe85a904e4390f7d00636 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Fri, 10 Jul 2026 11:28:40 -0700 Subject: [PATCH 03/25] more cleanup --- .bazelci/presubmit.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 471f064a0..75b1fdaca 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -14,7 +14,6 @@ x_defaults: build_targets: - "//..." - "-//examples/apple/..." - test_flags: *linux_flags test_targets: - "//..." - "-//examples/apple/..." From 6fceb3605e9adf55dc96c2a4f17af9113beef9ca Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Fri, 10 Jul 2026 11:31:19 -0700 Subject: [PATCH 04/25] fix binaries --- swift/swift_binary.bzl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/swift/swift_binary.bzl b/swift/swift_binary.bzl index dfac5ec74..ecd8dd289 100644 --- a/swift/swift_binary.bzl +++ b/swift/swift_binary.bzl @@ -256,6 +256,9 @@ def _swift_binary_impl(ctx): collect_data = True, collect_default = True, files = ctx.files.data, + transitive_files = depset( + transitive = [toolchains.swift.runtime], + ), ), ), coverage_common.instrumented_files_info( From cf6f31c039d175662e394f5ee1eb8cf4c686f120 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Fri, 10 Jul 2026 11:50:36 -0700 Subject: [PATCH 05/25] Use CcInfo for shared libs to fix rpath issues --- swift/internal/extensions/toolchain.BUILD | 4 +- swift/providers.bzl | 4 -- swift/swift_binary.bzl | 3 -- swift/swift_test.bzl | 3 -- swift/toolchains/swift_toolchain.bzl | 54 +++++++++++++--------- swift/toolchains/xcode_swift_toolchain.bzl | 1 - 6 files changed, 35 insertions(+), 34 deletions(-) diff --git a/swift/internal/extensions/toolchain.BUILD b/swift/internal/extensions/toolchain.BUILD index eb0ce8973..922ac671c 100644 --- a/swift/internal/extensions/toolchain.BUILD +++ b/swift/internal/extensions/toolchain.BUILD @@ -235,8 +235,8 @@ swift_toolchain( parsed_version = "{swift_version}", runtime = glob( [ - "usr/lib/swift/**/*.dylib", # On MacOS - "usr/lib/swift/**/*.so", # On Linux + "usr/lib/swift/linux/*.so", + "usr/lib/swift/macosx/*.dylib", ], allow_empty = True, ), diff --git a/swift/providers.bzl b/swift/providers.bzl index ff5d84a98..f9f1f5db5 100644 --- a/swift/providers.bzl +++ b/swift/providers.bzl @@ -440,10 +440,6 @@ Swift build rules, and they are also passed to the C++ APIs used when linking """, "root_dir": """\ `String`. The workspace-relative root directory of the toolchain. -""", - "runtime": """\ -`List` of `File`s. Files required at runtime by compiled executables. They will -be added to the input root at execution time. """, "swift_worker": """\ `File`. The executable representing the worker executable used to invoke the diff --git a/swift/swift_binary.bzl b/swift/swift_binary.bzl index ecd8dd289..dfac5ec74 100644 --- a/swift/swift_binary.bzl +++ b/swift/swift_binary.bzl @@ -256,9 +256,6 @@ def _swift_binary_impl(ctx): collect_data = True, collect_default = True, files = ctx.files.data, - transitive_files = depset( - transitive = [toolchains.swift.runtime], - ), ), ), coverage_common.instrumented_files_info( diff --git a/swift/swift_test.bzl b/swift/swift_test.bzl index 25cd3d8a9..214175292 100644 --- a/swift/swift_test.bzl +++ b/swift/swift_test.bzl @@ -516,9 +516,6 @@ def _swift_test_impl(ctx): collect_data = True, collect_default = True, files = ctx.files.data, - transitive_files = depset( - transitive = [toolchains.swift.runtime], - ), ), ), OutputGroupInfo( diff --git a/swift/toolchains/swift_toolchain.bzl b/swift/toolchains/swift_toolchain.bzl index 12f101dba..a71fcfec0 100644 --- a/swift/toolchains/swift_toolchain.bzl +++ b/swift/toolchains/swift_toolchain.bzl @@ -390,8 +390,7 @@ def _swift_unix_linkopts_cc_info( os, toolchain_label, toolchain_root, - additional_inputs, - additional_rpaths): + additional_inputs): """Returns a `CcInfo` containing flags that should be passed to the linker. The provider returned by this function will be used as an implicit @@ -406,8 +405,6 @@ def _swift_unix_linkopts_cc_info( owner of the linker input propagating the flags. toolchain_root: The toolchain's root directory. additional_inputs: depset of File objects to add to link actions. - additional_rpaths: list of additional RPATH to add at link time. - Returns: A `CcInfo` provider that will provide linker flags to binaries that depend on Swift targets. @@ -434,9 +431,6 @@ def _swift_unix_linkopts_cc_info( "-ldl", runtime_object_path, "-static-libgcc", - ] + [ - "-Wl,-rpath,{}".format(rpath) - for rpath in additional_rpaths ] return CcInfo( @@ -482,6 +476,32 @@ def _swift_sdk_linkopts_cc_info( ), ) +def _runtime_cc_info(ctx, cc_toolchain): + """Returns linker metadata for shared libraries required at runtime.""" + feature_configuration = cc_common.configure_features( + ctx = ctx, + cc_toolchain = cc_toolchain, + ) + libraries = [ + cc_common.create_library_to_link( + actions = ctx.actions, + cc_toolchain = cc_toolchain, + dynamic_library = runtime, + feature_configuration = feature_configuration, + ) + for runtime in ctx.files.runtime + ] + return CcInfo( + linking_context = cc_common.create_linking_context( + linker_inputs = depset([ + cc_common.create_linker_input( + owner = ctx.label, + libraries = depset(libraries), + ), + ]), + ), + ) + def _entry_point_linkopts_provider(*, entry_point_name): """Returns linkopts to customize the entry point of a binary.""" return struct( @@ -551,7 +571,6 @@ def _swift_toolchain_impl(ctx): sdkroot = _resolve_sdkroot(ctx, cc_toolchain) - additional_rpaths = [] if ctx.attr.swift_tools: if ctx.attr.swift_executable: fail("`swift_executable` and `swift_tools` cannot be used concurrently. " + @@ -564,15 +583,6 @@ def _swift_toolchain_impl(ctx): toolchain_root = paths.dirname(ctx.attr.swift_tools[SwiftToolsInfo].swift_driver.dirname) - # When swift binaries / tests built with a hermetic toolchain gets executed, they need the - # swift standard libs in their runfiles, along with an RPATH to access them. - additional_rpaths.append( - "{}/lib/swift/{}".format( - paths.dirname(paths.dirname(ctx.attr.swift_tools[SwiftToolsInfo].swift_driver.short_path)), - ctx.attr.os, - ), - ) - if ctx.attr.os == "windows": swift_linkopts_cc_info = _swift_windows_linkopts_cc_info( ctx.attr.arch, @@ -611,7 +621,6 @@ def _swift_toolchain_impl(ctx): ctx.label, toolchain_root, ctx.attr.swift_tools[SwiftToolsInfo].additional_inputs if ctx.attr.swift_tools else [], - additional_rpaths, ) swiftcopts = [] @@ -710,7 +719,10 @@ def _swift_toolchain_impl(ctx): ), implicit_deps_providers = collect_implicit_deps_providers( [], - additional_cc_infos = [swift_linkopts_cc_info], + additional_cc_infos = [ + swift_linkopts_cc_info, + _runtime_cc_info(ctx, cc_toolchain), + ], ), package_configurations = [ target[SwiftPackageConfigurationInfo] @@ -718,7 +730,6 @@ def _swift_toolchain_impl(ctx): ], requested_features = requested_features, root_dir = toolchain_root, - runtime = depset(ctx.files.runtime), system_modules = collect_implicit_deps_providers([]), implicit_system_modules = collect_implicit_deps_providers([]), swift_worker = ctx.attr._worker[DefaultInfo].files_to_run, @@ -799,7 +810,7 @@ configuration options that are applied to targets on a per-package basis. "root": attr.string(), "runtime": attr.label_list( doc = """\ -List of files to carry over as test data to swift executables and tests. +Shared libraries that should be added to the linking context of Swift targets. """, allow_files = True, ), @@ -902,6 +913,7 @@ The version of XCTest that the toolchain packages. }, ), doc = "Represents a Swift compiler toolchain.", + fragments = ["cpp"], toolchains = use_cc_toolchain(), implementation = _swift_toolchain_impl, ) diff --git a/swift/toolchains/xcode_swift_toolchain.bzl b/swift/toolchains/xcode_swift_toolchain.bzl index d61ee4b56..de6c5ae61 100644 --- a/swift/toolchains/xcode_swift_toolchain.bzl +++ b/swift/toolchains/xcode_swift_toolchain.bzl @@ -956,7 +956,6 @@ def _xcode_swift_toolchain_impl(ctx): for target in ctx.attr.package_configurations ], requested_features = requested_features, - runtime = depset(), system_modules = collect_implicit_deps_providers( [ctx.attr.system_modules] if ctx.attr.system_modules else [], ), From a31d9a37659a7550dd899b1ac2862ecd5a2b2f04 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Fri, 10 Jul 2026 11:55:07 -0700 Subject: [PATCH 06/25] doc --- doc/providers.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/providers.md b/doc/providers.md index 238aacb6d..502e22fb4 100644 --- a/doc/providers.md +++ b/doc/providers.md @@ -268,9 +268,9 @@ SwiftToolchainInfo(action_configsconst_protocols_to_gather, cross_import_overlays, debug_outputs_provider, developer_dirs, entry_point_linkopts_provider, feature_allowlists, generated_header_module_implicit_deps_providers, implicit_deps_providers, - module_aliases, package_configurations, requested_features, root_dir, runtime, - swift_worker, system_modules, implicit_system_modules, test_configuration, - tool_configs, unsupported_features) + module_aliases, package_configurations, requested_features, root_dir, swift_worker, + system_modules, implicit_system_modules, test_configuration, tool_configs, + unsupported_features) Propagates information about a Swift toolchain to compilation and linking rules @@ -296,7 +296,6 @@ that use the toolchain. | package_configurations | A list of `SwiftPackageConfigurationInfo` providers that specify additional compilation configuration options that are applied to targets on a per-package basis. | | 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.

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). | | root_dir | `String`. The workspace-relative root directory of the toolchain. | -| runtime | `List` of `File`s. Files required at runtime by compiled executables. They will be added to the input root at execution time. | | 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). | | system_modules | A `struct` with the following fields, which represent providers from targets that should be added as implicit dependencies of any compilation or linking target:

* `cc_infos`: A list of `CcInfo` providers from targets specified as the toolchain's implicit dependencies.

* `swift_infos`: A list of `SwiftInfo` providers from targets specified as the toolchain's implicit dependencies.

For ease of use, this field is never `None`; it will always be a valid `struct` containing the fields described above, even if those lists are empty. | | implicit_system_modules | A `struct` with in the same shape as `system_modules` for the system modules that every Swift compilation implicitly requires. | From 3106390c39db935875efb876cd7a96210b66addb Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Fri, 10 Jul 2026 12:00:19 -0700 Subject: [PATCH 07/25] add missing features --- swift/internal/extensions/toolchain.BUILD | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/swift/internal/extensions/toolchain.BUILD b/swift/internal/extensions/toolchain.BUILD index 922ac671c..c5326e1c9 100644 --- a/swift/internal/extensions/toolchain.BUILD +++ b/swift/internal/extensions/toolchain.BUILD @@ -227,6 +227,12 @@ swift_toolchain( "swift._supports_upcoming_features", "swift.no_embed_debug_module", "swift.use_autolink_extract", + "swift.lld_gc_workaround", + "swift.use_module_wrap", + # TODO: This should be removed so that private headers can be used with + # explicit modules, but the build targets for CgRPC need to be cleaned up + # first because they contain C++ code. + "swift.module_map_no_private_headers", ], os = select({ "@platforms//os:linux": "linux", From 64bebd07236b3675bbd8a3d3ae371017e88b39da Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Fri, 10 Jul 2026 15:28:20 -0700 Subject: [PATCH 08/25] attempt to use custom linux toolchain --- MODULE.bazel | 12 +++++ swift/internal/extensions/toolchain.BUILD | 58 ++++++++++++++++++++++- swift/internal/extensions/toolchains.bzl | 21 +++++++- 3 files changed, 89 insertions(+), 2 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index e2d216567..555d766cf 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -207,6 +207,7 @@ register_toolchains( # Anyway, for now we will need to update this every time we update the CI environment. Contributors might also # have to update this list if they're testing on a different Linux distribution. "@swift_toolchain//:cc_toolchain_embedded_ubuntu22.04", + "@swift_toolchain//:cc_toolchain_exec_ubuntu22.04", "@swift_toolchain//:cc_toolchain_embedded_ubuntu22.04-aarch64", "@swift_toolchain//:cc_toolchain_embedded_xcode", "@swift_toolchain//:swift_toolchain_embedded_ubuntu22.04", @@ -241,3 +242,14 @@ single_version_override( patch_strip = 1, patches = ["//third_party/patches:stardoc-revert-load-statements-in-docs.patch"], ) + +# FIXME: Delete after testing + +archive_override( + module_name = "apple_support", + integrity = "sha256-0P41hmvfBnWQwTKNteNnat6byDHlan9B8AdJaprp/Ek=", + strip_prefix = "apple_support-17c7248ee2f4f21b2d1f3668d88e4f40d9453220", + urls = [ + "https://github.com/bazelbuild/apple_support/archive/17c7248ee2f4f21b2d1f3668d88e4f40d9453220.tar.gz", + ], +) diff --git a/swift/internal/extensions/toolchain.BUILD b/swift/internal/extensions/toolchain.BUILD index c5326e1c9..f533409e9 100644 --- a/swift/internal/extensions/toolchain.BUILD +++ b/swift/internal/extensions/toolchain.BUILD @@ -1,4 +1,6 @@ +load("@apple_support//toolchain:cc_toolchain.bzl", apple_cc_toolchain = "cc_toolchain") load("@rules_cc//cc/toolchains:args.bzl", "cc_args") +load("@rules_cc//cc/toolchains:feature.bzl", "cc_feature") load("@rules_cc//cc/toolchains:make_variable.bzl", "cc_make_variable") load("@rules_cc//cc/toolchains:tool.bzl", "cc_tool") load("@rules_cc//cc/toolchains:tool_map.bzl", "cc_tool_map") @@ -76,12 +78,32 @@ cc_tool( cc_tool( name = "clang", src = "usr/bin/clang", + data = [":swift_sdk_linker_inputs"], tags = ["manual"], ) cc_tool( name = "clang++", src = "usr/bin/clang++", + data = [":swift_sdk_linker_inputs"], + tags = ["manual"], +) + +cc_tool( + name = "llvm_cov", + src = "usr/bin/llvm-cov", + tags = ["manual"], +) + +cc_tool( + name = "llvm_objcopy", + src = "usr/bin/llvm-objcopy", + tags = ["manual"], +) + +cc_tool( + name = "llvm_profdata", + src = "usr/bin/llvm-profdata", tags = ["manual"], ) @@ -93,10 +115,44 @@ cc_tool_map( "@rules_cc//cc/toolchains/actions:assembly_actions": ":clang", "@rules_cc//cc/toolchains/actions:c_compile": ":clang", "@rules_cc//cc/toolchains/actions:cpp_compile_actions": ":clang++", - "@rules_cc//cc/toolchains/actions:link_actions": ":clang", + "@rules_cc//cc/toolchains/actions:link_actions": ":clang++", + "@rules_cc//cc/toolchains/actions:llvm_cov": ":llvm_cov", + "@rules_cc//cc/toolchains/actions:llvm_profdata": ":llvm_profdata", + "@rules_cc//cc/toolchains/actions:objcopy_embed_data": ":llvm_objcopy", + "@rules_cc//cc/toolchains/actions:strip": ":llvm_objcopy", }, ) +cc_args( + name = "non_hermetic_sysroot_args", + actions = [ + "@rules_cc//cc/toolchains/actions:link_actions", + "@rules_cc//cc/toolchains/actions:compile_actions", + ], + allowlist_absolute_include_directories = [ + "/usr/include", + "/usr/local/include", + ], +) + +cc_feature( + name = "non_hermetic_sysroot", + args = [":non_hermetic_sysroot_args"], + feature_name = "sysroot", +) + +apple_cc_toolchain( + name = "cc_toolchain_exec", + module_map = None, + supports_header_parsing = False, + sysroot_feature = ":non_hermetic_sysroot", + target = select({ + "@platforms//cpu:aarch64": "aarch64-unknown-linux-gnu", + "@platforms//cpu:x86_64": "x86_64-unknown-linux-gnu", + }), + tool_map = ":all_tools", +) + ### Make variables ### # Used in _swift_toolchain_impl() in swift/toolchain/swift_toolchain.bzl cc_make_variable( diff --git a/swift/internal/extensions/toolchains.bzl b/swift/internal/extensions/toolchains.bzl index cb6916ba7..f67617b9a 100644 --- a/swift/internal/extensions/toolchains.bzl +++ b/swift/internal/extensions/toolchains.bzl @@ -43,6 +43,18 @@ toolchain( """ +_CC_EXEC_TOOLCHAIN_PLATFORM = """ +# C++ exec toolchain from repository: `{toolchain_repository}` +toolchain( + name = "cc_toolchain_exec_{platform}", + exec_compatible_with = {exec_compatible_with}, + target_compatible_with = {exec_compatible_with}, + toolchain = "@{toolchain_repository}//:cc_toolchain_exec", + toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", + visibility = ["//visibility:public"], +) +""" + _SDK_TOOLCHAIN_PLATFORM = """ # Swift SDK toolchain from repository: `{sdk_repository}` toolchain( @@ -94,11 +106,18 @@ def _exec_compatible_with_for_platform(platform): ] def toolchains_for_platform(platform, toolchain_repository): - return _TOOLCHAIN_PLATFORM.format( + content = _TOOLCHAIN_PLATFORM.format( exec_compatible_with = _exec_compatible_with_for_platform(platform), platform = platform, toolchain_repository = toolchain_repository, ) + if platform != "xcode": + content += _CC_EXEC_TOOLCHAIN_PLATFORM.format( + exec_compatible_with = _exec_compatible_with_for_platform(platform), + platform = platform, + toolchain_repository = toolchain_repository, + ) + return content def android_sdk_toolchains_for_platform(platform, sdk_repository, archs): """Returns Swift `toolchain` declarations for an Android Swift SDK. From 8ed03ea0a14da2f3162bf069b5b0dca1cce19e75 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Fri, 10 Jul 2026 16:09:00 -0700 Subject: [PATCH 09/25] try heremetic version --- MODULE.bazel | 21 + swift/internal/extensions/toolchain.BUILD | 17 +- .../extensions/ubuntu22.04_sysroot.lock.json | 797 ++++++++++++++++++ .../bazel-linux-packages-bazel-9.patch | 24 + 4 files changed, 850 insertions(+), 9 deletions(-) create mode 100644 swift/internal/extensions/ubuntu22.04_sysroot.lock.json create mode 100644 third_party/patches/bazel-linux-packages-bazel-9.patch diff --git a/MODULE.bazel b/MODULE.bazel index 555d766cf..59dd4649a 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -9,6 +9,7 @@ module( bazel_dep(name = "abseil-cpp", version = "20250814.1") bazel_dep(name = "apple_support", version = "2.6.1") +bazel_dep(name = "bazel_linux_packages", version = "0.3.1") bazel_dep(name = "bazel_features", version = "1.51.0") bazel_dep(name = "bazel_skylib", version = "1.7.1") bazel_dep(name = "nlohmann_json", version = "3.12.0.bcr.1") @@ -18,6 +19,19 @@ bazel_dep(name = "rules_cc", version = "0.2.14") bazel_dep(name = "rules_shell", version = "0.3.0") bazel_dep(name = "swift_argument_parser", version = "1.7.0") +apt = use_extension("@bazel_linux_packages//apt:extensions.bzl", "apt") +apt.ubuntu( + name = "swift_linux_sysroot", + lockfile = "//swift/internal/extensions:ubuntu22.04_sysroot.lock.json", + packages = [ + "libc6-dev", + "libstdc++-11-dev", + "linux-libc-dev", + ], + suites = ["jammy"], +) +use_repo(apt, "swift_linux_sysroot") + swift_autoconfiguration = use_repo_rule("//swift/internal:swift_autoconfiguration.bzl", "swift_autoconfiguration") swift_autoconfiguration(name = "rules_swift_local_config") @@ -253,3 +267,10 @@ archive_override( "https://github.com/bazelbuild/apple_support/archive/17c7248ee2f4f21b2d1f3668d88e4f40d9453220.tar.gz", ], ) + +single_version_override( + module_name = "bazel_linux_packages", + patch_strip = 1, + patches = ["//third_party/patches:bazel-linux-packages-bazel-9.patch"], + version = "0.3.1", +) diff --git a/swift/internal/extensions/toolchain.BUILD b/swift/internal/extensions/toolchain.BUILD index f533409e9..92ad23abd 100644 --- a/swift/internal/extensions/toolchain.BUILD +++ b/swift/internal/extensions/toolchain.BUILD @@ -5,6 +5,7 @@ load("@rules_cc//cc/toolchains:make_variable.bzl", "cc_make_variable") load("@rules_cc//cc/toolchains:tool.bzl", "cc_tool") load("@rules_cc//cc/toolchains:tool_map.bzl", "cc_tool_map") load("@rules_cc//cc/toolchains:toolchain.bzl", "cc_toolchain") +load("@rules_cc//cc/toolchains/args:sysroot.bzl", "cc_sysroot") load("@rules_swift//swift/toolchains:swift_toolchain.bzl", "swift_toolchain") load("@rules_swift//swift/toolchains:swift_tools.bzl", "swift_tools") @@ -123,21 +124,19 @@ cc_tool_map( }, ) -cc_args( - name = "non_hermetic_sysroot_args", +cc_sysroot( + name = "linux_sysroot_args", actions = [ "@rules_cc//cc/toolchains/actions:link_actions", "@rules_cc//cc/toolchains/actions:compile_actions", ], - allowlist_absolute_include_directories = [ - "/usr/include", - "/usr/local/include", - ], + data = ["@swift_linux_sysroot//:root"], + sysroot = "@swift_linux_sysroot//:root", ) cc_feature( - name = "non_hermetic_sysroot", - args = [":non_hermetic_sysroot_args"], + name = "linux_sysroot", + args = [":linux_sysroot_args"], feature_name = "sysroot", ) @@ -145,7 +144,7 @@ apple_cc_toolchain( name = "cc_toolchain_exec", module_map = None, supports_header_parsing = False, - sysroot_feature = ":non_hermetic_sysroot", + sysroot_feature = ":linux_sysroot", target = select({ "@platforms//cpu:aarch64": "aarch64-unknown-linux-gnu", "@platforms//cpu:x86_64": "x86_64-unknown-linux-gnu", diff --git a/swift/internal/extensions/ubuntu22.04_sysroot.lock.json b/swift/internal/extensions/ubuntu22.04_sysroot.lock.json new file mode 100644 index 000000000..a8c3b9bcc --- /dev/null +++ b/swift/internal/extensions/ubuntu22.04_sysroot.lock.json @@ -0,0 +1,797 @@ +{ + "input_data": { + "architectures": [ + "amd64" + ], + "packages": [ + "libc6-dev", + "libstdc++-11-dev", + "linux-libc-dev" + ], + "sources": [ + { + "architectures": [ + "amd64" + ], + "components": [ + "main" + ], + "suites": [ + "jammy" + ], + "uri": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z" + } + ] + }, + "packages": [ + { + "arch": "amd64", + "dependencies": [], + "key": "debconf_1.5.79ubuntu1_amd64", + "name": "debconf", + "sha256": "395a65b3a9539304391456d4d0e5531f4249f297b6e67eb0fcaf2ff77ddc3dc3", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/d/debconf/debconf_1.5.79ubuntu1_all.deb", + "version": "1.5.79ubuntu1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "dpkg_1.21.1ubuntu2_amd64", + "name": "dpkg", + "sha256": "457a683c3209ac30338461b0f3f7641879a4ce15adff15fbcbc20f3430d0c84b", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/d/dpkg/dpkg_1.21.1ubuntu2_amd64.deb", + "version": "1.21.1ubuntu2" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "gcc-11-base_11.2.0-19ubuntu1_amd64", + "name": "gcc-11-base", + "sha256": "db854b9af0f94eded5039830177f57a5b2d529f76e2b5b0de8ec0b26f7aedc83", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-11/gcc-11-base_11.2.0-19ubuntu1_amd64.deb", + "version": "11.2.0-19ubuntu1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "gcc-12-base_12-20220319-1ubuntu1_amd64", + "name": "gcc-12-base", + "sha256": "37990a768ecb1b40ce87c12fb7c7994877bb1256bde286c8e9bf5d4b51a17ca9", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/gcc-12-base_12-20220319-1ubuntu1_amd64.deb", + "version": "12-20220319-1ubuntu1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libacl1_2.3.1-1_amd64", + "name": "libacl1", + "sha256": "4db2c64ec74f673ed022e92cce7b83d0cbe0b779e02ca60a56ba59ae07754e05", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/a/acl/libacl1_2.3.1-1_amd64.deb", + "version": "2.3.1-1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libasan6_11.2.0-19ubuntu1_amd64", + "name": "libasan6", + "sha256": "94d9f1889bdec4aef6a37f8afd84346e1bcdaa65c158f5647b09781c1f4401e4", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-11/libasan6_11.2.0-19ubuntu1_amd64.deb", + "version": "11.2.0-19ubuntu1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libatomic1_12-20220319-1ubuntu1_amd64", + "name": "libatomic1", + "sha256": "38ca3edf9a5f7e0a8ee143b65b2671903427de607afd8de9d9fc8aff63844dc6", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/libatomic1_12-20220319-1ubuntu1_amd64.deb", + "version": "12-20220319-1ubuntu1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libbz2-1.0_1.0.8-5build1_amd64", + "name": "libbz2-1.0", + "sha256": "3bfeaf4259eadbb7faa09feee86cd6cad172cd95907d7465afd0eb5aebb5433f", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/b/bzip2/libbz2-1.0_1.0.8-5build1_amd64.deb", + "version": "1.0.8-5build1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libc-dev-bin_2.35-0ubuntu3_amd64", + "name": "libc-dev-bin", + "sha256": "cddecdf2fd0c1632295cb44b5031ae5f0d992541c7dc0ff7b62a5eea61dc2a05", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/glibc/libc-dev-bin_2.35-0ubuntu3_amd64.deb", + "version": "2.35-0ubuntu3" + }, + { + "arch": "amd64", + "dependencies": [ + { + "key": "debconf_1.5.79ubuntu1_amd64", + "name": "debconf", + "version": "1.5.79ubuntu1" + }, + { + "key": "dpkg_1.21.1ubuntu2_amd64", + "name": "dpkg", + "version": "1.21.1ubuntu2" + }, + { + "key": "gcc-12-base_12-20220319-1ubuntu1_amd64", + "name": "gcc-12-base", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libacl1_2.3.1-1_amd64", + "name": "libacl1", + "version": "2.3.1-1" + }, + { + "key": "libbz2-1.0_1.0.8-5build1_amd64", + "name": "libbz2-1.0", + "version": "1.0.8-5build1" + }, + { + "key": "libc-dev-bin_2.35-0ubuntu3_amd64", + "name": "libc-dev-bin", + "version": "2.35-0ubuntu3" + }, + { + "key": "libc6_2.35-0ubuntu3_amd64", + "name": "libc6", + "version": "2.35-0ubuntu3" + }, + { + "key": "libcom-err2_1.46.5-2ubuntu1_amd64", + "name": "libcom-err2", + "version": "1.46.5-2ubuntu1" + }, + { + "key": "libcrypt-dev_1-4.4.27-1_amd64", + "name": "libcrypt-dev", + "version": "1:4.4.27-1" + }, + { + "key": "libcrypt1_1-4.4.27-1_amd64", + "name": "libcrypt1", + "version": "1:4.4.27-1" + }, + { + "key": "libgcc-s1_12-20220319-1ubuntu1_amd64", + "name": "libgcc-s1", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libgssapi-krb5-2_1.19.2-2_amd64", + "name": "libgssapi-krb5-2", + "version": "1.19.2-2" + }, + { + "key": "libk5crypto3_1.19.2-2_amd64", + "name": "libk5crypto3", + "version": "1.19.2-2" + }, + { + "key": "libkeyutils1_1.6.1-2ubuntu3_amd64", + "name": "libkeyutils1", + "version": "1.6.1-2ubuntu3" + }, + { + "key": "libkrb5-3_1.19.2-2_amd64", + "name": "libkrb5-3", + "version": "1.19.2-2" + }, + { + "key": "libkrb5support0_1.19.2-2_amd64", + "name": "libkrb5support0", + "version": "1.19.2-2" + }, + { + "key": "liblzma5_5.2.5-2ubuntu1_amd64", + "name": "liblzma5", + "version": "5.2.5-2ubuntu1" + }, + { + "key": "libnsl-dev_1.3.0-2build2_amd64", + "name": "libnsl-dev", + "version": "1.3.0-2build2" + }, + { + "key": "libnsl2_1.3.0-2build2_amd64", + "name": "libnsl2", + "version": "1.3.0-2build2" + }, + { + "key": "libpcre2-8-0_10.39-3build1_amd64", + "name": "libpcre2-8-0", + "version": "10.39-3build1" + }, + { + "key": "libselinux1_3.3-1build2_amd64", + "name": "libselinux1", + "version": "3.3-1build2" + }, + { + "key": "libssl3_3.0.2-0ubuntu1_amd64", + "name": "libssl3", + "version": "3.0.2-0ubuntu1" + }, + { + "key": "libtirpc-common_1.3.2-2build1_amd64", + "name": "libtirpc-common", + "version": "1.3.2-2build1" + }, + { + "key": "libtirpc-dev_1.3.2-2build1_amd64", + "name": "libtirpc-dev", + "version": "1.3.2-2build1" + }, + { + "key": "libtirpc3_1.3.2-2build1_amd64", + "name": "libtirpc3", + "version": "1.3.2-2build1" + }, + { + "key": "libzstd1_1.4.8-p-dfsg-3build1_amd64", + "name": "libzstd1", + "version": "1.4.8+dfsg-3build1" + }, + { + "key": "linux-libc-dev_5.15.0-25.25_amd64", + "name": "linux-libc-dev", + "version": "5.15.0-25.25" + }, + { + "key": "perl-base_5.34.0-3ubuntu1_amd64", + "name": "perl-base", + "version": "5.34.0-3ubuntu1" + }, + { + "key": "rpcsvc-proto_1.4.2-0ubuntu6_amd64", + "name": "rpcsvc-proto", + "version": "1.4.2-0ubuntu6" + }, + { + "key": "tar_1.34-p-dfsg-1build3_amd64", + "name": "tar", + "version": "1.34+dfsg-1build3" + }, + { + "key": "zlib1g_1-1.2.11.dfsg-2ubuntu9_amd64", + "name": "zlib1g", + "version": "1:1.2.11.dfsg-2ubuntu9" + } + ], + "key": "libc6-dev_2.35-0ubuntu3_amd64", + "name": "libc6-dev", + "sha256": "cc37cab5c60bcfe4bbf289a8002f369949a41ed46e8b51a0503a001099370c56", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/glibc/libc6-dev_2.35-0ubuntu3_amd64.deb", + "version": "2.35-0ubuntu3" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libc6_2.35-0ubuntu3_amd64", + "name": "libc6", + "sha256": "ea9a27e0ebdd0cfc9c750d94f8074f3a35d1f97dcc77ae04c370fb498a6b6db2", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/glibc/libc6_2.35-0ubuntu3_amd64.deb", + "version": "2.35-0ubuntu3" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libcom-err2_1.46.5-2ubuntu1_amd64", + "name": "libcom-err2", + "sha256": "fee39a879c6f2f08a7f522c75ad71e18ee6ffafe056fb781336a7dd001ecd7a4", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/e/e2fsprogs/libcom-err2_1.46.5-2ubuntu1_amd64.deb", + "version": "1.46.5-2ubuntu1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libcrypt-dev_1-4.4.27-1_amd64", + "name": "libcrypt-dev", + "sha256": "a79be2f6e45823dcc09e04d5e98c88ec88d07d5b8895d05b875a8ade8b345efa", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libx/libxcrypt/libcrypt-dev_4.4.27-1_amd64.deb", + "version": "1:4.4.27-1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libcrypt1_1-4.4.27-1_amd64", + "name": "libcrypt1", + "sha256": "3fa566e9f861a08736cbc5a97562d9d6e4f0c00450fbeafcb6d7583423b04a98", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libx/libxcrypt/libcrypt1_4.4.27-1_amd64.deb", + "version": "1:4.4.27-1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libgcc-11-dev_11.2.0-19ubuntu1_amd64", + "name": "libgcc-11-dev", + "sha256": "adae5a301c7899c1bce8ae26b5423716a47e516df25c09d6d536607bc34853bc", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-11/libgcc-11-dev_11.2.0-19ubuntu1_amd64.deb", + "version": "11.2.0-19ubuntu1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libgcc-s1_12-20220319-1ubuntu1_amd64", + "name": "libgcc-s1", + "sha256": "c9a93721431be07557c810d7e1b24c3b3c51f398334ded104362a68a415b9e61", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/libgcc-s1_12-20220319-1ubuntu1_amd64.deb", + "version": "12-20220319-1ubuntu1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libgomp1_12-20220319-1ubuntu1_amd64", + "name": "libgomp1", + "sha256": "8627999dd5f3d38473774ce7924a62af9a2840b2238bc52611e38257bc140b5d", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/libgomp1_12-20220319-1ubuntu1_amd64.deb", + "version": "12-20220319-1ubuntu1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libgssapi-krb5-2_1.19.2-2_amd64", + "name": "libgssapi-krb5-2", + "sha256": "53b3c8d2599974e378416f3e837b6bf89db7e155a52aaa6761789242fa9098f6", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/k/krb5/libgssapi-krb5-2_1.19.2-2_amd64.deb", + "version": "1.19.2-2" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libitm1_12-20220319-1ubuntu1_amd64", + "name": "libitm1", + "sha256": "c65a94c151396c542c10b8a4c2df943fb2bf07a90329e152596d521d9ece390c", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/libitm1_12-20220319-1ubuntu1_amd64.deb", + "version": "12-20220319-1ubuntu1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libk5crypto3_1.19.2-2_amd64", + "name": "libk5crypto3", + "sha256": "8419e78a643e9414c8c90605829fb492157eac87b87c0edc1cd900f285487385", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/k/krb5/libk5crypto3_1.19.2-2_amd64.deb", + "version": "1.19.2-2" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libkeyutils1_1.6.1-2ubuntu3_amd64", + "name": "libkeyutils1", + "sha256": "940daf78ee0229549b4eabc92ffd79dd038ed96a44e2e912305a23540cf22a0a", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/k/keyutils/libkeyutils1_1.6.1-2ubuntu3_amd64.deb", + "version": "1.6.1-2ubuntu3" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libkrb5-3_1.19.2-2_amd64", + "name": "libkrb5-3", + "sha256": "e0f9cbd7d6e9fccd8559a82a48b1dadbd98889840710546c35067b0269f612ee", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/k/krb5/libkrb5-3_1.19.2-2_amd64.deb", + "version": "1.19.2-2" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libkrb5support0_1.19.2-2_amd64", + "name": "libkrb5support0", + "sha256": "4736410375e20692050b7b587113e72d23bb04a6d9beea89282bc9a002629056", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/k/krb5/libkrb5support0_1.19.2-2_amd64.deb", + "version": "1.19.2-2" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "liblsan0_12-20220319-1ubuntu1_amd64", + "name": "liblsan0", + "sha256": "ee4dc708420b554d8cc1385f3c2a2d2917187b22c0d796eda46c8d52c09a81c1", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/liblsan0_12-20220319-1ubuntu1_amd64.deb", + "version": "12-20220319-1ubuntu1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "liblzma5_5.2.5-2ubuntu1_amd64", + "name": "liblzma5", + "sha256": "8f1c46e7d3f5102a5e4fdca7c949728a343ba71c2a7c124118df2c13d4c444f7", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/x/xz-utils/liblzma5_5.2.5-2ubuntu1_amd64.deb", + "version": "5.2.5-2ubuntu1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libnsl-dev_1.3.0-2build2_amd64", + "name": "libnsl-dev", + "sha256": "e93aa448fe708a4bbfcc40b2a8cab6f5f88896174a301caab2719f734e08a621", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libn/libnsl/libnsl-dev_1.3.0-2build2_amd64.deb", + "version": "1.3.0-2build2" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libnsl2_1.3.0-2build2_amd64", + "name": "libnsl2", + "sha256": "cfeef478f96ace59617f4f93c2497776b98a33c99bf3602af46844ccf9cba9d3", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libn/libnsl/libnsl2_1.3.0-2build2_amd64.deb", + "version": "1.3.0-2build2" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libpcre2-8-0_10.39-3build1_amd64", + "name": "libpcre2-8-0", + "sha256": "166e1162c3e86facf11bd31a3e10ffa67641f9ac295bc8e72e6cdfc494fc64c3", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/p/pcre2/libpcre2-8-0_10.39-3build1_amd64.deb", + "version": "10.39-3build1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libquadmath0_12-20220319-1ubuntu1_amd64", + "name": "libquadmath0", + "sha256": "6051a22852840dad9a846b8ac18b051089868646677a00cd422175e1e6dfce3b", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/libquadmath0_12-20220319-1ubuntu1_amd64.deb", + "version": "12-20220319-1ubuntu1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libselinux1_3.3-1build2_amd64", + "name": "libselinux1", + "sha256": "b96c6b40ee2388bd51341cb11c0f1d5bcca29b9180b6e3a77a06b881f2913f7e", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libs/libselinux/libselinux1_3.3-1build2_amd64.deb", + "version": "3.3-1build2" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libssl3_3.0.2-0ubuntu1_amd64", + "name": "libssl3", + "sha256": "11a83260542e05aebbbafce9164d594287d2584be80972e08708528fe06f80d3", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/o/openssl/libssl3_3.0.2-0ubuntu1_amd64.deb", + "version": "3.0.2-0ubuntu1" + }, + { + "arch": "amd64", + "dependencies": [ + { + "key": "debconf_1.5.79ubuntu1_amd64", + "name": "debconf", + "version": "1.5.79ubuntu1" + }, + { + "key": "dpkg_1.21.1ubuntu2_amd64", + "name": "dpkg", + "version": "1.21.1ubuntu2" + }, + { + "key": "gcc-11-base_11.2.0-19ubuntu1_amd64", + "name": "gcc-11-base", + "version": "11.2.0-19ubuntu1" + }, + { + "key": "gcc-12-base_12-20220319-1ubuntu1_amd64", + "name": "gcc-12-base", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libacl1_2.3.1-1_amd64", + "name": "libacl1", + "version": "2.3.1-1" + }, + { + "key": "libasan6_11.2.0-19ubuntu1_amd64", + "name": "libasan6", + "version": "11.2.0-19ubuntu1" + }, + { + "key": "libatomic1_12-20220319-1ubuntu1_amd64", + "name": "libatomic1", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libbz2-1.0_1.0.8-5build1_amd64", + "name": "libbz2-1.0", + "version": "1.0.8-5build1" + }, + { + "key": "libc-dev-bin_2.35-0ubuntu3_amd64", + "name": "libc-dev-bin", + "version": "2.35-0ubuntu3" + }, + { + "key": "libc6-dev_2.35-0ubuntu3_amd64", + "name": "libc6-dev", + "version": "2.35-0ubuntu3" + }, + { + "key": "libc6_2.35-0ubuntu3_amd64", + "name": "libc6", + "version": "2.35-0ubuntu3" + }, + { + "key": "libcom-err2_1.46.5-2ubuntu1_amd64", + "name": "libcom-err2", + "version": "1.46.5-2ubuntu1" + }, + { + "key": "libcrypt-dev_1-4.4.27-1_amd64", + "name": "libcrypt-dev", + "version": "1:4.4.27-1" + }, + { + "key": "libcrypt1_1-4.4.27-1_amd64", + "name": "libcrypt1", + "version": "1:4.4.27-1" + }, + { + "key": "libgcc-11-dev_11.2.0-19ubuntu1_amd64", + "name": "libgcc-11-dev", + "version": "11.2.0-19ubuntu1" + }, + { + "key": "libgcc-s1_12-20220319-1ubuntu1_amd64", + "name": "libgcc-s1", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libgomp1_12-20220319-1ubuntu1_amd64", + "name": "libgomp1", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libgssapi-krb5-2_1.19.2-2_amd64", + "name": "libgssapi-krb5-2", + "version": "1.19.2-2" + }, + { + "key": "libitm1_12-20220319-1ubuntu1_amd64", + "name": "libitm1", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libk5crypto3_1.19.2-2_amd64", + "name": "libk5crypto3", + "version": "1.19.2-2" + }, + { + "key": "libkeyutils1_1.6.1-2ubuntu3_amd64", + "name": "libkeyutils1", + "version": "1.6.1-2ubuntu3" + }, + { + "key": "libkrb5-3_1.19.2-2_amd64", + "name": "libkrb5-3", + "version": "1.19.2-2" + }, + { + "key": "libkrb5support0_1.19.2-2_amd64", + "name": "libkrb5support0", + "version": "1.19.2-2" + }, + { + "key": "liblsan0_12-20220319-1ubuntu1_amd64", + "name": "liblsan0", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "liblzma5_5.2.5-2ubuntu1_amd64", + "name": "liblzma5", + "version": "5.2.5-2ubuntu1" + }, + { + "key": "libnsl-dev_1.3.0-2build2_amd64", + "name": "libnsl-dev", + "version": "1.3.0-2build2" + }, + { + "key": "libnsl2_1.3.0-2build2_amd64", + "name": "libnsl2", + "version": "1.3.0-2build2" + }, + { + "key": "libpcre2-8-0_10.39-3build1_amd64", + "name": "libpcre2-8-0", + "version": "10.39-3build1" + }, + { + "key": "libquadmath0_12-20220319-1ubuntu1_amd64", + "name": "libquadmath0", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libselinux1_3.3-1build2_amd64", + "name": "libselinux1", + "version": "3.3-1build2" + }, + { + "key": "libssl3_3.0.2-0ubuntu1_amd64", + "name": "libssl3", + "version": "3.0.2-0ubuntu1" + }, + { + "key": "libstdc-p--p-6_12-20220319-1ubuntu1_amd64", + "name": "libstdc++6", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libtirpc-common_1.3.2-2build1_amd64", + "name": "libtirpc-common", + "version": "1.3.2-2build1" + }, + { + "key": "libtirpc-dev_1.3.2-2build1_amd64", + "name": "libtirpc-dev", + "version": "1.3.2-2build1" + }, + { + "key": "libtirpc3_1.3.2-2build1_amd64", + "name": "libtirpc3", + "version": "1.3.2-2build1" + }, + { + "key": "libtsan0_11.2.0-19ubuntu1_amd64", + "name": "libtsan0", + "version": "11.2.0-19ubuntu1" + }, + { + "key": "libubsan1_12-20220319-1ubuntu1_amd64", + "name": "libubsan1", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libzstd1_1.4.8-p-dfsg-3build1_amd64", + "name": "libzstd1", + "version": "1.4.8+dfsg-3build1" + }, + { + "key": "linux-libc-dev_5.15.0-25.25_amd64", + "name": "linux-libc-dev", + "version": "5.15.0-25.25" + }, + { + "key": "perl-base_5.34.0-3ubuntu1_amd64", + "name": "perl-base", + "version": "5.34.0-3ubuntu1" + }, + { + "key": "rpcsvc-proto_1.4.2-0ubuntu6_amd64", + "name": "rpcsvc-proto", + "version": "1.4.2-0ubuntu6" + }, + { + "key": "tar_1.34-p-dfsg-1build3_amd64", + "name": "tar", + "version": "1.34+dfsg-1build3" + }, + { + "key": "zlib1g_1-1.2.11.dfsg-2ubuntu9_amd64", + "name": "zlib1g", + "version": "1:1.2.11.dfsg-2ubuntu9" + } + ], + "key": "libstdc-p--p--11-dev_11.2.0-19ubuntu1_amd64", + "name": "libstdc++-11-dev", + "sha256": "9bf057085dbce0f9b06157df34ca55819d8f5c0262cd7de1eac7515b5138a8a2", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-11/libstdc++-11-dev_11.2.0-19ubuntu1_amd64.deb", + "version": "11.2.0-19ubuntu1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libstdc-p--p-6_12-20220319-1ubuntu1_amd64", + "name": "libstdc++6", + "sha256": "035cfe195ddf3a091abbc0c323285772ccbdbb2fb75279e44a0915748b4e5726", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/libstdc++6_12-20220319-1ubuntu1_amd64.deb", + "version": "12-20220319-1ubuntu1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libtirpc-common_1.3.2-2build1_amd64", + "name": "libtirpc-common", + "sha256": "a2746e8c1ae8b1ced2312304e8bd5e3aaabd504377480e743b0edff7b96da6fa", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libt/libtirpc/libtirpc-common_1.3.2-2build1_all.deb", + "version": "1.3.2-2build1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libtirpc-dev_1.3.2-2build1_amd64", + "name": "libtirpc-dev", + "sha256": "771c4e77f06c306b55759d88d5efc64fd438e79a8001a6e107311b193b065564", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libt/libtirpc/libtirpc-dev_1.3.2-2build1_amd64.deb", + "version": "1.3.2-2build1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libtirpc3_1.3.2-2build1_amd64", + "name": "libtirpc3", + "sha256": "e5af8cc79ce2cd14a716922f7936d2a7c26d1e90642aaa7810afe4fcdc1cf2dc", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libt/libtirpc/libtirpc3_1.3.2-2build1_amd64.deb", + "version": "1.3.2-2build1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libtsan0_11.2.0-19ubuntu1_amd64", + "name": "libtsan0", + "sha256": "b3cae0deabbc5fef8a665f51ecc69eb812c97a6fc234b7971ea70d0d365238a1", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-11/libtsan0_11.2.0-19ubuntu1_amd64.deb", + "version": "11.2.0-19ubuntu1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libubsan1_12-20220319-1ubuntu1_amd64", + "name": "libubsan1", + "sha256": "695665a5619339d23152a7358dafbf44569a9c19afd127b2b9d4ce53d65d07f2", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/libubsan1_12-20220319-1ubuntu1_amd64.deb", + "version": "12-20220319-1ubuntu1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libzstd1_1.4.8-p-dfsg-3build1_amd64", + "name": "libzstd1", + "sha256": "ae7db00ce8b093e50c994518b90203544e063b4bc574836a048bb142b950b2c9", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libz/libzstd/libzstd1_1.4.8+dfsg-3build1_amd64.deb", + "version": "1.4.8+dfsg-3build1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "linux-libc-dev_5.15.0-25.25_amd64", + "name": "linux-libc-dev", + "sha256": "1b2a93020593c9e94a25f750ce442da5a6e8ff48a20f52cec92dfc3fa35336d8", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/l/linux/linux-libc-dev_5.15.0-25.25_amd64.deb", + "version": "5.15.0-25.25" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "perl-base_5.34.0-3ubuntu1_amd64", + "name": "perl-base", + "sha256": "1af46dbc6b00bbcff8b5e72eeedbb2bafdec48bf0d470ce461c1e453c2ecdfe8", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/p/perl/perl-base_5.34.0-3ubuntu1_amd64.deb", + "version": "5.34.0-3ubuntu1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "rpcsvc-proto_1.4.2-0ubuntu6_amd64", + "name": "rpcsvc-proto", + "sha256": "447c6d8f7624a3d728a12232440d3f10e6e53bbf60cc202b7beb8a3bc9f7acc9", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/r/rpcsvc-proto/rpcsvc-proto_1.4.2-0ubuntu6_amd64.deb", + "version": "1.4.2-0ubuntu6" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "tar_1.34-p-dfsg-1build3_amd64", + "name": "tar", + "sha256": "d6e4ef9e5793a271764209047ebb78970404b035fd1490cb513302744cfe9a25", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/t/tar/tar_1.34+dfsg-1build3_amd64.deb", + "version": "1.34+dfsg-1build3" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "zlib1g_1-1.2.11.dfsg-2ubuntu9_amd64", + "name": "zlib1g", + "sha256": "52449467942cc943d651fd16867014e9339f3657935fc09b75b3347aa5a78066", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/z/zlib/zlib1g_1.2.11.dfsg-2ubuntu9_amd64.deb", + "version": "1:1.2.11.dfsg-2ubuntu9" + } + ], + "version": 2 +} \ No newline at end of file diff --git a/third_party/patches/bazel-linux-packages-bazel-9.patch b/third_party/patches/bazel-linux-packages-bazel-9.patch new file mode 100644 index 000000000..6c53af618 --- /dev/null +++ b/third_party/patches/bazel-linux-packages-bazel-9.patch @@ -0,0 +1,24 @@ +diff --git a/MODULE.bazel b/MODULE.bazel +index 7c85d01..256bed2 100644 +--- a/MODULE.bazel ++++ b/MODULE.bazel +@@ -10,5 +10,6 @@ bazel_dep(name = "platforms", version = "1.0.0") + bazel_dep(name = "bazel_skylib", version = "1.8.1") + bazel_dep(name = "bazel_lib", version = "3.1.0") + bazel_dep(name = "jq.bzl", version = "0.4.0") ++bazel_dep(name = "rules_shell", version = "0.3.0") + + deb_archive = use_repo_rule("//internal:deb.bzl", "deb_archive") +diff --git a/apt/private/deb_download.bzl b/apt/private/deb_download.bzl +index a9a4e9b..cf3b103 100644 +--- a/apt/private/deb_download.bzl ++++ b/apt/private/deb_download.bzl +@@ -52,6 +52,8 @@ def _get_input_data_with_sources(rctx): + return input_data + + _INDEX_BUILD_TMPL = """ ++load("@rules_shell//shell:sh_binary.bzl", "sh_binary") ++ + filegroup( + name = "lockfile", + srcs = ["lock.json"], From d6a1072af2a22f27f7f31c6368528c856e73db1d Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Fri, 10 Jul 2026 16:27:25 -0700 Subject: [PATCH 10/25] add libz --- MODULE.bazel | 6 +- swift/internal/extensions/toolchain.BUILD | 4 +- .../extensions/ubuntu22.04_sysroot.lock.json | 173 +++++++++++++++++- 3 files changed, 178 insertions(+), 5 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 59dd4649a..691eb933b 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -19,18 +19,20 @@ bazel_dep(name = "rules_cc", version = "0.2.14") bazel_dep(name = "rules_shell", version = "0.3.0") bazel_dep(name = "swift_argument_parser", version = "1.7.0") +# Regenerate lockfile: bazel run @swift_ubuntu22.04_sysroot//:lock apt = use_extension("@bazel_linux_packages//apt:extensions.bzl", "apt") apt.ubuntu( - name = "swift_linux_sysroot", + name = "swift_ubuntu22.04_sysroot", lockfile = "//swift/internal/extensions:ubuntu22.04_sysroot.lock.json", packages = [ "libc6-dev", "libstdc++-11-dev", "linux-libc-dev", + "zlib1g-dev", ], suites = ["jammy"], ) -use_repo(apt, "swift_linux_sysroot") +use_repo(apt, "swift_ubuntu22.04_sysroot") swift_autoconfiguration = use_repo_rule("//swift/internal:swift_autoconfiguration.bzl", "swift_autoconfiguration") diff --git a/swift/internal/extensions/toolchain.BUILD b/swift/internal/extensions/toolchain.BUILD index 92ad23abd..c1130258f 100644 --- a/swift/internal/extensions/toolchain.BUILD +++ b/swift/internal/extensions/toolchain.BUILD @@ -130,8 +130,8 @@ cc_sysroot( "@rules_cc//cc/toolchains/actions:link_actions", "@rules_cc//cc/toolchains/actions:compile_actions", ], - data = ["@swift_linux_sysroot//:root"], - sysroot = "@swift_linux_sysroot//:root", + data = ["@swift_ubuntu22.04_sysroot//:root"], + sysroot = "@swift_ubuntu22.04_sysroot//:root", ) cc_feature( diff --git a/swift/internal/extensions/ubuntu22.04_sysroot.lock.json b/swift/internal/extensions/ubuntu22.04_sysroot.lock.json index a8c3b9bcc..d5c554473 100644 --- a/swift/internal/extensions/ubuntu22.04_sysroot.lock.json +++ b/swift/internal/extensions/ubuntu22.04_sysroot.lock.json @@ -6,7 +6,8 @@ "packages": [ "libc6-dev", "libstdc++-11-dev", - "linux-libc-dev" + "linux-libc-dev", + "zlib1g-dev" ], "sources": [ { @@ -783,6 +784,176 @@ "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/t/tar/tar_1.34+dfsg-1build3_amd64.deb", "version": "1.34+dfsg-1build3" }, + { + "arch": "amd64", + "dependencies": [ + { + "key": "debconf_1.5.79ubuntu1_amd64", + "name": "debconf", + "version": "1.5.79ubuntu1" + }, + { + "key": "dpkg_1.21.1ubuntu2_amd64", + "name": "dpkg", + "version": "1.21.1ubuntu2" + }, + { + "key": "gcc-12-base_12-20220319-1ubuntu1_amd64", + "name": "gcc-12-base", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libacl1_2.3.1-1_amd64", + "name": "libacl1", + "version": "2.3.1-1" + }, + { + "key": "libbz2-1.0_1.0.8-5build1_amd64", + "name": "libbz2-1.0", + "version": "1.0.8-5build1" + }, + { + "key": "libc-dev-bin_2.35-0ubuntu3_amd64", + "name": "libc-dev-bin", + "version": "2.35-0ubuntu3" + }, + { + "key": "libc6-dev_2.35-0ubuntu3_amd64", + "name": "libc6-dev", + "version": "2.35-0ubuntu3" + }, + { + "key": "libc6_2.35-0ubuntu3_amd64", + "name": "libc6", + "version": "2.35-0ubuntu3" + }, + { + "key": "libcom-err2_1.46.5-2ubuntu1_amd64", + "name": "libcom-err2", + "version": "1.46.5-2ubuntu1" + }, + { + "key": "libcrypt-dev_1-4.4.27-1_amd64", + "name": "libcrypt-dev", + "version": "1:4.4.27-1" + }, + { + "key": "libcrypt1_1-4.4.27-1_amd64", + "name": "libcrypt1", + "version": "1:4.4.27-1" + }, + { + "key": "libgcc-s1_12-20220319-1ubuntu1_amd64", + "name": "libgcc-s1", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libgssapi-krb5-2_1.19.2-2_amd64", + "name": "libgssapi-krb5-2", + "version": "1.19.2-2" + }, + { + "key": "libk5crypto3_1.19.2-2_amd64", + "name": "libk5crypto3", + "version": "1.19.2-2" + }, + { + "key": "libkeyutils1_1.6.1-2ubuntu3_amd64", + "name": "libkeyutils1", + "version": "1.6.1-2ubuntu3" + }, + { + "key": "libkrb5-3_1.19.2-2_amd64", + "name": "libkrb5-3", + "version": "1.19.2-2" + }, + { + "key": "libkrb5support0_1.19.2-2_amd64", + "name": "libkrb5support0", + "version": "1.19.2-2" + }, + { + "key": "liblzma5_5.2.5-2ubuntu1_amd64", + "name": "liblzma5", + "version": "5.2.5-2ubuntu1" + }, + { + "key": "libnsl-dev_1.3.0-2build2_amd64", + "name": "libnsl-dev", + "version": "1.3.0-2build2" + }, + { + "key": "libnsl2_1.3.0-2build2_amd64", + "name": "libnsl2", + "version": "1.3.0-2build2" + }, + { + "key": "libpcre2-8-0_10.39-3build1_amd64", + "name": "libpcre2-8-0", + "version": "10.39-3build1" + }, + { + "key": "libselinux1_3.3-1build2_amd64", + "name": "libselinux1", + "version": "3.3-1build2" + }, + { + "key": "libssl3_3.0.2-0ubuntu1_amd64", + "name": "libssl3", + "version": "3.0.2-0ubuntu1" + }, + { + "key": "libtirpc-common_1.3.2-2build1_amd64", + "name": "libtirpc-common", + "version": "1.3.2-2build1" + }, + { + "key": "libtirpc-dev_1.3.2-2build1_amd64", + "name": "libtirpc-dev", + "version": "1.3.2-2build1" + }, + { + "key": "libtirpc3_1.3.2-2build1_amd64", + "name": "libtirpc3", + "version": "1.3.2-2build1" + }, + { + "key": "libzstd1_1.4.8-p-dfsg-3build1_amd64", + "name": "libzstd1", + "version": "1.4.8+dfsg-3build1" + }, + { + "key": "linux-libc-dev_5.15.0-25.25_amd64", + "name": "linux-libc-dev", + "version": "5.15.0-25.25" + }, + { + "key": "perl-base_5.34.0-3ubuntu1_amd64", + "name": "perl-base", + "version": "5.34.0-3ubuntu1" + }, + { + "key": "rpcsvc-proto_1.4.2-0ubuntu6_amd64", + "name": "rpcsvc-proto", + "version": "1.4.2-0ubuntu6" + }, + { + "key": "tar_1.34-p-dfsg-1build3_amd64", + "name": "tar", + "version": "1.34+dfsg-1build3" + }, + { + "key": "zlib1g_1-1.2.11.dfsg-2ubuntu9_amd64", + "name": "zlib1g", + "version": "1:1.2.11.dfsg-2ubuntu9" + } + ], + "key": "zlib1g-dev_1-1.2.11.dfsg-2ubuntu9_amd64", + "name": "zlib1g-dev", + "sha256": "ddbadadcbfe2669de79eabac36a990f0f1666bb86a87d1a9cd56fd72620ca2db", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/z/zlib/zlib1g-dev_1.2.11.dfsg-2ubuntu9_amd64.deb", + "version": "1:1.2.11.dfsg-2ubuntu9" + }, { "arch": "amd64", "dependencies": [], From ca66a6cf29b618d05cba02ab74a2c40d52ad608c Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Mon, 13 Jul 2026 09:54:19 -0700 Subject: [PATCH 11/25] pic --- swift/internal/extensions/toolchain.BUILD | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/swift/internal/extensions/toolchain.BUILD b/swift/internal/extensions/toolchain.BUILD index c1130258f..465eaf369 100644 --- a/swift/internal/extensions/toolchain.BUILD +++ b/swift/internal/extensions/toolchain.BUILD @@ -79,6 +79,9 @@ cc_tool( cc_tool( name = "clang", src = "usr/bin/clang", + capabilities = [ + "@rules_cc//cc/toolchains/capabilities:supports_pic", + ], data = [":swift_sdk_linker_inputs"], tags = ["manual"], ) @@ -86,6 +89,9 @@ cc_tool( cc_tool( name = "clang++", src = "usr/bin/clang++", + capabilities = [ + "@rules_cc//cc/toolchains/capabilities:supports_pic", + ], data = [":swift_sdk_linker_inputs"], tags = ["manual"], ) From 684168579f0a97b8a4e03b2da57ac1b2d410ae60 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Mon, 13 Jul 2026 10:03:54 -0700 Subject: [PATCH 12/25] don't always enable --- MODULE.bazel | 6 +++--- swift/internal/extensions/toolchain.BUILD | 6 ------ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 691eb933b..c07a3da72 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -263,10 +263,10 @@ single_version_override( archive_override( module_name = "apple_support", - integrity = "sha256-0P41hmvfBnWQwTKNteNnat6byDHlan9B8AdJaprp/Ek=", - strip_prefix = "apple_support-17c7248ee2f4f21b2d1f3668d88e4f40d9453220", + integrity = "sha256-RhALzZ4bWjKzplgyAfD1CsbAmO7c7jqJCe0e3EgVKjg=", + strip_prefix = "apple_support-01f8e8c3bba02ee7aede51935580e90c1c744f08", urls = [ - "https://github.com/bazelbuild/apple_support/archive/17c7248ee2f4f21b2d1f3668d88e4f40d9453220.tar.gz", + "https://github.com/bazelbuild/apple_support/archive/01f8e8c3bba02ee7aede51935580e90c1c744f08.tar.gz", ], ) diff --git a/swift/internal/extensions/toolchain.BUILD b/swift/internal/extensions/toolchain.BUILD index 465eaf369..c1130258f 100644 --- a/swift/internal/extensions/toolchain.BUILD +++ b/swift/internal/extensions/toolchain.BUILD @@ -79,9 +79,6 @@ cc_tool( cc_tool( name = "clang", src = "usr/bin/clang", - capabilities = [ - "@rules_cc//cc/toolchains/capabilities:supports_pic", - ], data = [":swift_sdk_linker_inputs"], tags = ["manual"], ) @@ -89,9 +86,6 @@ cc_tool( cc_tool( name = "clang++", src = "usr/bin/clang++", - capabilities = [ - "@rules_cc//cc/toolchains/capabilities:supports_pic", - ], data = [":swift_sdk_linker_inputs"], tags = ["manual"], ) From 39f1a0e92adb9a93c3011daadeb636606aa90618 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Mon, 13 Jul 2026 10:13:50 -0700 Subject: [PATCH 13/25] bump --- MODULE.bazel | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index c07a3da72..e6803d7ba 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -263,10 +263,10 @@ single_version_override( archive_override( module_name = "apple_support", - integrity = "sha256-RhALzZ4bWjKzplgyAfD1CsbAmO7c7jqJCe0e3EgVKjg=", - strip_prefix = "apple_support-01f8e8c3bba02ee7aede51935580e90c1c744f08", + integrity = "sha256-4YQ7nCqSJ4QcfTF8RLDRQseKtfFS1MTtWKnLlS3bg/U=", + strip_prefix = "apple_support-c268c90e7d1efe0d656081e29b11ab05ada9bdda", urls = [ - "https://github.com/bazelbuild/apple_support/archive/01f8e8c3bba02ee7aede51935580e90c1c744f08.tar.gz", + "https://github.com/bazelbuild/apple_support/archive/c268c90e7d1efe0d656081e29b11ab05ada9bdda.tar.gz", ], ) From 9b463b9f8c92aed8c39244db9f7f1ab4b6200178 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Mon, 13 Jul 2026 10:20:57 -0700 Subject: [PATCH 14/25] only ubuntu --- swift/internal/extensions/toolchains.bzl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/swift/internal/extensions/toolchains.bzl b/swift/internal/extensions/toolchains.bzl index f67617b9a..359395580 100644 --- a/swift/internal/extensions/toolchains.bzl +++ b/swift/internal/extensions/toolchains.bzl @@ -111,7 +111,14 @@ def toolchains_for_platform(platform, toolchain_repository): platform = platform, toolchain_repository = toolchain_repository, ) - if platform != "xcode": + + # TODO: Expand based on sysroot compatibility, maybe we should allow users to pass them + if platform in ( + "ubuntu22.04", + "ubuntu22.04-aarch64", + "ubuntu24.04", + "ubuntu24.04-aarch64", + ): content += _CC_EXEC_TOOLCHAIN_PLATFORM.format( exec_compatible_with = _exec_compatible_with_for_platform(platform), platform = platform, From d62f59f54460e8a4d21cec89fb971e837e09bd52 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Tue, 21 Jul 2026 13:15:35 -0700 Subject: [PATCH 15/25] bump version --- MODULE.bazel | 9 +------ .../bazel-linux-packages-bazel-9.patch | 24 ------------------- 2 files changed, 1 insertion(+), 32 deletions(-) delete mode 100644 third_party/patches/bazel-linux-packages-bazel-9.patch diff --git a/MODULE.bazel b/MODULE.bazel index e6803d7ba..de6041a28 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -9,7 +9,7 @@ module( bazel_dep(name = "abseil-cpp", version = "20250814.1") bazel_dep(name = "apple_support", version = "2.6.1") -bazel_dep(name = "bazel_linux_packages", version = "0.3.1") +bazel_dep(name = "bazel_linux_packages", version = "0.4.1") bazel_dep(name = "bazel_features", version = "1.51.0") bazel_dep(name = "bazel_skylib", version = "1.7.1") bazel_dep(name = "nlohmann_json", version = "3.12.0.bcr.1") @@ -269,10 +269,3 @@ archive_override( "https://github.com/bazelbuild/apple_support/archive/c268c90e7d1efe0d656081e29b11ab05ada9bdda.tar.gz", ], ) - -single_version_override( - module_name = "bazel_linux_packages", - patch_strip = 1, - patches = ["//third_party/patches:bazel-linux-packages-bazel-9.patch"], - version = "0.3.1", -) diff --git a/third_party/patches/bazel-linux-packages-bazel-9.patch b/third_party/patches/bazel-linux-packages-bazel-9.patch deleted file mode 100644 index 6c53af618..000000000 --- a/third_party/patches/bazel-linux-packages-bazel-9.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/MODULE.bazel b/MODULE.bazel -index 7c85d01..256bed2 100644 ---- a/MODULE.bazel -+++ b/MODULE.bazel -@@ -10,5 +10,6 @@ bazel_dep(name = "platforms", version = "1.0.0") - bazel_dep(name = "bazel_skylib", version = "1.8.1") - bazel_dep(name = "bazel_lib", version = "3.1.0") - bazel_dep(name = "jq.bzl", version = "0.4.0") -+bazel_dep(name = "rules_shell", version = "0.3.0") - - deb_archive = use_repo_rule("//internal:deb.bzl", "deb_archive") -diff --git a/apt/private/deb_download.bzl b/apt/private/deb_download.bzl -index a9a4e9b..cf3b103 100644 ---- a/apt/private/deb_download.bzl -+++ b/apt/private/deb_download.bzl -@@ -52,6 +52,8 @@ def _get_input_data_with_sources(rctx): - return input_data - - _INDEX_BUILD_TMPL = """ -+load("@rules_shell//shell:sh_binary.bzl", "sh_binary") -+ - filegroup( - name = "lockfile", - srcs = ["lock.json"], From e3b92b2a7c65c5314d00215996fda3711aeef724 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Tue, 21 Jul 2026 13:38:00 -0700 Subject: [PATCH 16/25] arm sysroot --- MODULE.bazel | 23 +- swift/internal/extensions/toolchain.BUILD | 44 +- .../ubuntu22.04_aarch64_sysroot.lock.json | 968 ++++++++++++++++++ 3 files changed, 1028 insertions(+), 7 deletions(-) create mode 100644 swift/internal/extensions/ubuntu22.04_aarch64_sysroot.lock.json diff --git a/MODULE.bazel b/MODULE.bazel index de6041a28..f9471e437 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -19,10 +19,13 @@ bazel_dep(name = "rules_cc", version = "0.2.14") bazel_dep(name = "rules_shell", version = "0.3.0") bazel_dep(name = "swift_argument_parser", version = "1.7.0") -# Regenerate lockfile: bazel run @swift_ubuntu22.04_sysroot//:lock +# Regenerate lockfiles with: +# bazel run @swift_ubuntu22.04_sysroot//:lock +# bazel run @swift_ubuntu22.04_aarch64_sysroot//:lock apt = use_extension("@bazel_linux_packages//apt:extensions.bzl", "apt") apt.ubuntu( name = "swift_ubuntu22.04_sysroot", + architectures = ["amd64"], lockfile = "//swift/internal/extensions:ubuntu22.04_sysroot.lock.json", packages = [ "libc6-dev", @@ -32,7 +35,23 @@ apt.ubuntu( ], suites = ["jammy"], ) -use_repo(apt, "swift_ubuntu22.04_sysroot") +apt.ubuntu( + name = "swift_ubuntu22.04_aarch64_sysroot", + architectures = ["arm64"], + lockfile = "//swift/internal/extensions:ubuntu22.04_aarch64_sysroot.lock.json", + packages = [ + "libc6-dev", + "libstdc++-11-dev", + "linux-libc-dev", + "zlib1g-dev", + ], + suites = ["jammy"], +) +use_repo( + apt, + "swift_ubuntu22.04_aarch64_sysroot", + "swift_ubuntu22.04_sysroot", +) swift_autoconfiguration = use_repo_rule("//swift/internal:swift_autoconfiguration.bzl", "swift_autoconfiguration") diff --git a/swift/internal/extensions/toolchain.BUILD b/swift/internal/extensions/toolchain.BUILD index c1130258f..1a2bc0e95 100644 --- a/swift/internal/extensions/toolchain.BUILD +++ b/swift/internal/extensions/toolchain.BUILD @@ -1,4 +1,4 @@ -load("@apple_support//toolchain:cc_toolchain.bzl", apple_cc_toolchain = "cc_toolchain") +load("@apple_support//toolchain:cc_toolchain.bzl", apple_support_cc_toolchain = "cc_toolchain") load("@rules_cc//cc/toolchains:args.bzl", "cc_args") load("@rules_cc//cc/toolchains:feature.bzl", "cc_feature") load("@rules_cc//cc/toolchains:make_variable.bzl", "cc_make_variable") @@ -125,22 +125,56 @@ cc_tool_map( ) cc_sysroot( - name = "linux_sysroot_args", + name = "linux_aarch64_sysroot_args", + actions = [ + "@rules_cc//cc/toolchains/actions:link_actions", + "@rules_cc//cc/toolchains/actions:compile_actions", + ], + data = ["@swift_ubuntu22.04_aarch64_sysroot//:root"], + sysroot = "@swift_ubuntu22.04_aarch64_sysroot//:root", + tags = ["manual"], + visibility = ["//visibility:private"], +) + +cc_feature( + name = "linux_aarch64_sysroot", + args = [":linux_aarch64_sysroot_args"], + feature_name = "sysroot", + tags = ["manual"], + visibility = ["//visibility:private"], +) + +cc_sysroot( + name = "linux_x86_64_sysroot_args", actions = [ "@rules_cc//cc/toolchains/actions:link_actions", "@rules_cc//cc/toolchains/actions:compile_actions", ], data = ["@swift_ubuntu22.04_sysroot//:root"], sysroot = "@swift_ubuntu22.04_sysroot//:root", + tags = ["manual"], + visibility = ["//visibility:private"], ) cc_feature( - name = "linux_sysroot", - args = [":linux_sysroot_args"], + name = "linux_x86_64_sysroot", + args = [":linux_x86_64_sysroot_args"], feature_name = "sysroot", + tags = ["manual"], + visibility = ["//visibility:private"], +) + +alias( + name = "linux_sysroot", + actual = select({ + "@platforms//cpu:aarch64": ":linux_aarch64_sysroot", + "@platforms//cpu:x86_64": ":linux_x86_64_sysroot", + }), + tags = ["manual"], + visibility = ["//visibility:private"], ) -apple_cc_toolchain( +apple_support_cc_toolchain( name = "cc_toolchain_exec", module_map = None, supports_header_parsing = False, diff --git a/swift/internal/extensions/ubuntu22.04_aarch64_sysroot.lock.json b/swift/internal/extensions/ubuntu22.04_aarch64_sysroot.lock.json new file mode 100644 index 000000000..c3b3065e0 --- /dev/null +++ b/swift/internal/extensions/ubuntu22.04_aarch64_sysroot.lock.json @@ -0,0 +1,968 @@ +{ + "input_data": { + "architectures": [ + "arm64" + ], + "packages": [ + "libc6-dev", + "libstdc++-11-dev", + "linux-libc-dev", + "zlib1g-dev" + ], + "sources": [ + { + "architectures": [ + "arm64" + ], + "components": [ + "main" + ], + "suites": [ + "jammy" + ], + "uri": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z" + } + ] + }, + "packages": [ + { + "arch": "arm64", + "dependencies": [], + "key": "debconf_1.5.79ubuntu1_arm64", + "name": "debconf", + "sha256": "395a65b3a9539304391456d4d0e5531f4249f297b6e67eb0fcaf2ff77ddc3dc3", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/d/debconf/debconf_1.5.79ubuntu1_all.deb", + "version": "1.5.79ubuntu1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "dpkg_1.21.1ubuntu2_arm64", + "name": "dpkg", + "sha256": "d89a8b9a77ab893ff02bc794e84dbcc4729b84011f7170f6998bb1acee421274", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/d/dpkg/dpkg_1.21.1ubuntu2_arm64.deb", + "version": "1.21.1ubuntu2" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "gcc-11-base_11.2.0-19ubuntu1_arm64", + "name": "gcc-11-base", + "sha256": "aa7cf600950715d8ab9c5eaee72700055ce5ccf741c48617ef0e7a9762992b5d", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-11/gcc-11-base_11.2.0-19ubuntu1_arm64.deb", + "version": "11.2.0-19ubuntu1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "gcc-12-base_12-20220319-1ubuntu1_arm64", + "name": "gcc-12-base", + "sha256": "5c6e7eb37d4e088e930b2119b0fbd4baf0bef59a2cf9aff4503573d60ddeef29", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/gcc-12-base_12-20220319-1ubuntu1_arm64.deb", + "version": "12-20220319-1ubuntu1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libacl1_2.3.1-1_arm64", + "name": "libacl1", + "sha256": "328e91b2d6e8ee44ad669fc7276b74f208bc781baf1ecdd7dbf5f092f8b41712", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/a/acl/libacl1_2.3.1-1_arm64.deb", + "version": "2.3.1-1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libasan6_11.2.0-19ubuntu1_arm64", + "name": "libasan6", + "sha256": "d16c5f39926e471c4af08a16a1c1990c05b18f5f61dfad8bd430388175bc1359", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-11/libasan6_11.2.0-19ubuntu1_arm64.deb", + "version": "11.2.0-19ubuntu1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libatomic1_12-20220319-1ubuntu1_arm64", + "name": "libatomic1", + "sha256": "cad7d920e727ca5db7bb1d396c205a4f27435971c8121590726c8b80cfdc55d9", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/libatomic1_12-20220319-1ubuntu1_arm64.deb", + "version": "12-20220319-1ubuntu1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libbz2-1.0_1.0.8-5build1_arm64", + "name": "libbz2-1.0", + "sha256": "30fe3f2d662bb1c87a4b77e5b8f17a67dfcadfec319d0da2ece6cba98f9f8cb5", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/b/bzip2/libbz2-1.0_1.0.8-5build1_arm64.deb", + "version": "1.0.8-5build1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libc-dev-bin_2.35-0ubuntu3_arm64", + "name": "libc-dev-bin", + "sha256": "b86ef82ee4eddb805c5933babf30831d1cce42b4a2fe9cef7d25bda3b8dc0a0b", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/glibc/libc-dev-bin_2.35-0ubuntu3_arm64.deb", + "version": "2.35-0ubuntu3" + }, + { + "arch": "arm64", + "dependencies": [ + { + "key": "debconf_1.5.79ubuntu1_arm64", + "name": "debconf", + "version": "1.5.79ubuntu1" + }, + { + "key": "dpkg_1.21.1ubuntu2_arm64", + "name": "dpkg", + "version": "1.21.1ubuntu2" + }, + { + "key": "gcc-12-base_12-20220319-1ubuntu1_arm64", + "name": "gcc-12-base", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libacl1_2.3.1-1_arm64", + "name": "libacl1", + "version": "2.3.1-1" + }, + { + "key": "libbz2-1.0_1.0.8-5build1_arm64", + "name": "libbz2-1.0", + "version": "1.0.8-5build1" + }, + { + "key": "libc-dev-bin_2.35-0ubuntu3_arm64", + "name": "libc-dev-bin", + "version": "2.35-0ubuntu3" + }, + { + "key": "libc6_2.35-0ubuntu3_arm64", + "name": "libc6", + "version": "2.35-0ubuntu3" + }, + { + "key": "libcom-err2_1.46.5-2ubuntu1_arm64", + "name": "libcom-err2", + "version": "1.46.5-2ubuntu1" + }, + { + "key": "libcrypt-dev_1-4.4.27-1_arm64", + "name": "libcrypt-dev", + "version": "1:4.4.27-1" + }, + { + "key": "libcrypt1_1-4.4.27-1_arm64", + "name": "libcrypt1", + "version": "1:4.4.27-1" + }, + { + "key": "libgcc-s1_12-20220319-1ubuntu1_arm64", + "name": "libgcc-s1", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libgssapi-krb5-2_1.19.2-2_arm64", + "name": "libgssapi-krb5-2", + "version": "1.19.2-2" + }, + { + "key": "libk5crypto3_1.19.2-2_arm64", + "name": "libk5crypto3", + "version": "1.19.2-2" + }, + { + "key": "libkeyutils1_1.6.1-2ubuntu3_arm64", + "name": "libkeyutils1", + "version": "1.6.1-2ubuntu3" + }, + { + "key": "libkrb5-3_1.19.2-2_arm64", + "name": "libkrb5-3", + "version": "1.19.2-2" + }, + { + "key": "libkrb5support0_1.19.2-2_arm64", + "name": "libkrb5support0", + "version": "1.19.2-2" + }, + { + "key": "liblzma5_5.2.5-2ubuntu1_arm64", + "name": "liblzma5", + "version": "5.2.5-2ubuntu1" + }, + { + "key": "libnsl-dev_1.3.0-2build2_arm64", + "name": "libnsl-dev", + "version": "1.3.0-2build2" + }, + { + "key": "libnsl2_1.3.0-2build2_arm64", + "name": "libnsl2", + "version": "1.3.0-2build2" + }, + { + "key": "libpcre2-8-0_10.39-3build1_arm64", + "name": "libpcre2-8-0", + "version": "10.39-3build1" + }, + { + "key": "libselinux1_3.3-1build2_arm64", + "name": "libselinux1", + "version": "3.3-1build2" + }, + { + "key": "libssl3_3.0.2-0ubuntu1_arm64", + "name": "libssl3", + "version": "3.0.2-0ubuntu1" + }, + { + "key": "libtirpc-common_1.3.2-2build1_arm64", + "name": "libtirpc-common", + "version": "1.3.2-2build1" + }, + { + "key": "libtirpc-dev_1.3.2-2build1_arm64", + "name": "libtirpc-dev", + "version": "1.3.2-2build1" + }, + { + "key": "libtirpc3_1.3.2-2build1_arm64", + "name": "libtirpc3", + "version": "1.3.2-2build1" + }, + { + "key": "libzstd1_1.4.8-p-dfsg-3build1_arm64", + "name": "libzstd1", + "version": "1.4.8+dfsg-3build1" + }, + { + "key": "linux-libc-dev_5.15.0-25.25_arm64", + "name": "linux-libc-dev", + "version": "5.15.0-25.25" + }, + { + "key": "perl-base_5.34.0-3ubuntu1_arm64", + "name": "perl-base", + "version": "5.34.0-3ubuntu1" + }, + { + "key": "rpcsvc-proto_1.4.2-0ubuntu6_arm64", + "name": "rpcsvc-proto", + "version": "1.4.2-0ubuntu6" + }, + { + "key": "tar_1.34-p-dfsg-1build3_arm64", + "name": "tar", + "version": "1.34+dfsg-1build3" + }, + { + "key": "zlib1g_1-1.2.11.dfsg-2ubuntu9_arm64", + "name": "zlib1g", + "version": "1:1.2.11.dfsg-2ubuntu9" + } + ], + "key": "libc6-dev_2.35-0ubuntu3_arm64", + "name": "libc6-dev", + "sha256": "2f254d6e843e413d549f407362885171c285f08383bb7e9392da855810ff78fd", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/glibc/libc6-dev_2.35-0ubuntu3_arm64.deb", + "version": "2.35-0ubuntu3" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libc6_2.35-0ubuntu3_arm64", + "name": "libc6", + "sha256": "b1206b51690a810efc701e1d311e0ac5fd9a9f0f8e216585362512d805d261af", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/glibc/libc6_2.35-0ubuntu3_arm64.deb", + "version": "2.35-0ubuntu3" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libcom-err2_1.46.5-2ubuntu1_arm64", + "name": "libcom-err2", + "sha256": "07f5b417e636610c83d95e408f55ca6e2e8cf44649b8cd7c6dcab2c8078b6214", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/e/e2fsprogs/libcom-err2_1.46.5-2ubuntu1_arm64.deb", + "version": "1.46.5-2ubuntu1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libcrypt-dev_1-4.4.27-1_arm64", + "name": "libcrypt-dev", + "sha256": "17805b64d386655edca4aafbf01e6b89bd3b9a35cde7a31da964dd766ad9c5b6", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libx/libxcrypt/libcrypt-dev_4.4.27-1_arm64.deb", + "version": "1:4.4.27-1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libcrypt1_1-4.4.27-1_arm64", + "name": "libcrypt1", + "sha256": "fb5f8d59de95bbb118a635e83e2a92077e13c6d297980dae3119df057bf88111", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libx/libxcrypt/libcrypt1_4.4.27-1_arm64.deb", + "version": "1:4.4.27-1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libgcc-11-dev_11.2.0-19ubuntu1_arm64", + "name": "libgcc-11-dev", + "sha256": "ce742ecc7426fb2dd0bfc86365a7419a5c7e2aaed9c3faad9e400a1f1f7e89b1", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-11/libgcc-11-dev_11.2.0-19ubuntu1_arm64.deb", + "version": "11.2.0-19ubuntu1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libgcc-s1_12-20220319-1ubuntu1_arm64", + "name": "libgcc-s1", + "sha256": "b6e9a39b0ef3302053734e3a5e52ef12151566bb42d625feab7a502b3071c13b", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/libgcc-s1_12-20220319-1ubuntu1_arm64.deb", + "version": "12-20220319-1ubuntu1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libgomp1_12-20220319-1ubuntu1_arm64", + "name": "libgomp1", + "sha256": "c1719335234ccdef7558e97b37b1f6baf069911ce2f26d2789336051a7c929cd", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/libgomp1_12-20220319-1ubuntu1_arm64.deb", + "version": "12-20220319-1ubuntu1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libgssapi-krb5-2_1.19.2-2_arm64", + "name": "libgssapi-krb5-2", + "sha256": "2d254fe8e03ce9cb375649cb3eb7a1dc2ffb9fd906eb01c2077679c3283d9343", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/k/krb5/libgssapi-krb5-2_1.19.2-2_arm64.deb", + "version": "1.19.2-2" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libhwasan0_12-20220319-1ubuntu1_arm64", + "name": "libhwasan0", + "sha256": "417397b8ff93f0d9c20f6326a50ba707385475967e4a5e88f9ba5b5c10bdabe0", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/libhwasan0_12-20220319-1ubuntu1_arm64.deb", + "version": "12-20220319-1ubuntu1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libitm1_12-20220319-1ubuntu1_arm64", + "name": "libitm1", + "sha256": "ca09b62b719c47f7acf3374b51ba02989a2004ab30e7acc0712fec78af2f149a", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/libitm1_12-20220319-1ubuntu1_arm64.deb", + "version": "12-20220319-1ubuntu1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libk5crypto3_1.19.2-2_arm64", + "name": "libk5crypto3", + "sha256": "638a6cf1624d045d0df1e0d693c349ea7c60cfa571f8ee05573b621d36a047ae", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/k/krb5/libk5crypto3_1.19.2-2_arm64.deb", + "version": "1.19.2-2" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libkeyutils1_1.6.1-2ubuntu3_arm64", + "name": "libkeyutils1", + "sha256": "fc26b34c487ea5187585ee0f2c67c738b97e8bae434cca4b546d86743b9e6c80", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/k/keyutils/libkeyutils1_1.6.1-2ubuntu3_arm64.deb", + "version": "1.6.1-2ubuntu3" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libkrb5-3_1.19.2-2_arm64", + "name": "libkrb5-3", + "sha256": "1c638ecff15987115408c4b16715ee1bdb5fe2acf9b15146566f3cbafbe13c6c", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/k/krb5/libkrb5-3_1.19.2-2_arm64.deb", + "version": "1.19.2-2" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libkrb5support0_1.19.2-2_arm64", + "name": "libkrb5support0", + "sha256": "379e96322c8288bdc6355c487e07a8bad82bc990ac75011e4f6e475603bede59", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/k/krb5/libkrb5support0_1.19.2-2_arm64.deb", + "version": "1.19.2-2" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "liblsan0_12-20220319-1ubuntu1_arm64", + "name": "liblsan0", + "sha256": "640f037dd93f2b49b5920a8b43feadc2290948daa9cdee3f653bc7f894e8a8fa", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/liblsan0_12-20220319-1ubuntu1_arm64.deb", + "version": "12-20220319-1ubuntu1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "liblzma5_5.2.5-2ubuntu1_arm64", + "name": "liblzma5", + "sha256": "21f64a20db61954e19ecdd2641d9aace2617b2bf3d55267184e2405d4bd65fdb", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/x/xz-utils/liblzma5_5.2.5-2ubuntu1_arm64.deb", + "version": "5.2.5-2ubuntu1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libnsl-dev_1.3.0-2build2_arm64", + "name": "libnsl-dev", + "sha256": "4a111ee814455ebf4db3be9caec555752315048cb5ec9c4c076fe3f00da22ec9", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libn/libnsl/libnsl-dev_1.3.0-2build2_arm64.deb", + "version": "1.3.0-2build2" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libnsl2_1.3.0-2build2_arm64", + "name": "libnsl2", + "sha256": "ab2e58eed36da75635f248fad08a2dd3fbe92c9d1f5e44eb68a99db083e9a9c3", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libn/libnsl/libnsl2_1.3.0-2build2_arm64.deb", + "version": "1.3.0-2build2" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libpcre2-8-0_10.39-3build1_arm64", + "name": "libpcre2-8-0", + "sha256": "ea4b84517ececbbafb3745a38e5af8af14ad9c993664fd07617c7d3a0e135cae", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/p/pcre2/libpcre2-8-0_10.39-3build1_arm64.deb", + "version": "10.39-3build1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libselinux1_3.3-1build2_arm64", + "name": "libselinux1", + "sha256": "3a0726b2174a40fa28e74712867aa6e40d3d725543e8f668af9e9e59a28c817c", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libs/libselinux/libselinux1_3.3-1build2_arm64.deb", + "version": "3.3-1build2" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libssl3_3.0.2-0ubuntu1_arm64", + "name": "libssl3", + "sha256": "9af0616c9fbb2c843892b203bc3306587ced1555be24dff154c768cdf27dfe2a", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/o/openssl/libssl3_3.0.2-0ubuntu1_arm64.deb", + "version": "3.0.2-0ubuntu1" + }, + { + "arch": "arm64", + "dependencies": [ + { + "key": "debconf_1.5.79ubuntu1_arm64", + "name": "debconf", + "version": "1.5.79ubuntu1" + }, + { + "key": "dpkg_1.21.1ubuntu2_arm64", + "name": "dpkg", + "version": "1.21.1ubuntu2" + }, + { + "key": "gcc-11-base_11.2.0-19ubuntu1_arm64", + "name": "gcc-11-base", + "version": "11.2.0-19ubuntu1" + }, + { + "key": "gcc-12-base_12-20220319-1ubuntu1_arm64", + "name": "gcc-12-base", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libacl1_2.3.1-1_arm64", + "name": "libacl1", + "version": "2.3.1-1" + }, + { + "key": "libasan6_11.2.0-19ubuntu1_arm64", + "name": "libasan6", + "version": "11.2.0-19ubuntu1" + }, + { + "key": "libatomic1_12-20220319-1ubuntu1_arm64", + "name": "libatomic1", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libbz2-1.0_1.0.8-5build1_arm64", + "name": "libbz2-1.0", + "version": "1.0.8-5build1" + }, + { + "key": "libc-dev-bin_2.35-0ubuntu3_arm64", + "name": "libc-dev-bin", + "version": "2.35-0ubuntu3" + }, + { + "key": "libc6-dev_2.35-0ubuntu3_arm64", + "name": "libc6-dev", + "version": "2.35-0ubuntu3" + }, + { + "key": "libc6_2.35-0ubuntu3_arm64", + "name": "libc6", + "version": "2.35-0ubuntu3" + }, + { + "key": "libcom-err2_1.46.5-2ubuntu1_arm64", + "name": "libcom-err2", + "version": "1.46.5-2ubuntu1" + }, + { + "key": "libcrypt-dev_1-4.4.27-1_arm64", + "name": "libcrypt-dev", + "version": "1:4.4.27-1" + }, + { + "key": "libcrypt1_1-4.4.27-1_arm64", + "name": "libcrypt1", + "version": "1:4.4.27-1" + }, + { + "key": "libgcc-11-dev_11.2.0-19ubuntu1_arm64", + "name": "libgcc-11-dev", + "version": "11.2.0-19ubuntu1" + }, + { + "key": "libgcc-s1_12-20220319-1ubuntu1_arm64", + "name": "libgcc-s1", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libgomp1_12-20220319-1ubuntu1_arm64", + "name": "libgomp1", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libgssapi-krb5-2_1.19.2-2_arm64", + "name": "libgssapi-krb5-2", + "version": "1.19.2-2" + }, + { + "key": "libhwasan0_12-20220319-1ubuntu1_arm64", + "name": "libhwasan0", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libitm1_12-20220319-1ubuntu1_arm64", + "name": "libitm1", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libk5crypto3_1.19.2-2_arm64", + "name": "libk5crypto3", + "version": "1.19.2-2" + }, + { + "key": "libkeyutils1_1.6.1-2ubuntu3_arm64", + "name": "libkeyutils1", + "version": "1.6.1-2ubuntu3" + }, + { + "key": "libkrb5-3_1.19.2-2_arm64", + "name": "libkrb5-3", + "version": "1.19.2-2" + }, + { + "key": "libkrb5support0_1.19.2-2_arm64", + "name": "libkrb5support0", + "version": "1.19.2-2" + }, + { + "key": "liblsan0_12-20220319-1ubuntu1_arm64", + "name": "liblsan0", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "liblzma5_5.2.5-2ubuntu1_arm64", + "name": "liblzma5", + "version": "5.2.5-2ubuntu1" + }, + { + "key": "libnsl-dev_1.3.0-2build2_arm64", + "name": "libnsl-dev", + "version": "1.3.0-2build2" + }, + { + "key": "libnsl2_1.3.0-2build2_arm64", + "name": "libnsl2", + "version": "1.3.0-2build2" + }, + { + "key": "libpcre2-8-0_10.39-3build1_arm64", + "name": "libpcre2-8-0", + "version": "10.39-3build1" + }, + { + "key": "libselinux1_3.3-1build2_arm64", + "name": "libselinux1", + "version": "3.3-1build2" + }, + { + "key": "libssl3_3.0.2-0ubuntu1_arm64", + "name": "libssl3", + "version": "3.0.2-0ubuntu1" + }, + { + "key": "libstdc-p--p-6_12-20220319-1ubuntu1_arm64", + "name": "libstdc++6", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libtirpc-common_1.3.2-2build1_arm64", + "name": "libtirpc-common", + "version": "1.3.2-2build1" + }, + { + "key": "libtirpc-dev_1.3.2-2build1_arm64", + "name": "libtirpc-dev", + "version": "1.3.2-2build1" + }, + { + "key": "libtirpc3_1.3.2-2build1_arm64", + "name": "libtirpc3", + "version": "1.3.2-2build1" + }, + { + "key": "libtsan0_11.2.0-19ubuntu1_arm64", + "name": "libtsan0", + "version": "11.2.0-19ubuntu1" + }, + { + "key": "libubsan1_12-20220319-1ubuntu1_arm64", + "name": "libubsan1", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libzstd1_1.4.8-p-dfsg-3build1_arm64", + "name": "libzstd1", + "version": "1.4.8+dfsg-3build1" + }, + { + "key": "linux-libc-dev_5.15.0-25.25_arm64", + "name": "linux-libc-dev", + "version": "5.15.0-25.25" + }, + { + "key": "perl-base_5.34.0-3ubuntu1_arm64", + "name": "perl-base", + "version": "5.34.0-3ubuntu1" + }, + { + "key": "rpcsvc-proto_1.4.2-0ubuntu6_arm64", + "name": "rpcsvc-proto", + "version": "1.4.2-0ubuntu6" + }, + { + "key": "tar_1.34-p-dfsg-1build3_arm64", + "name": "tar", + "version": "1.34+dfsg-1build3" + }, + { + "key": "zlib1g_1-1.2.11.dfsg-2ubuntu9_arm64", + "name": "zlib1g", + "version": "1:1.2.11.dfsg-2ubuntu9" + } + ], + "key": "libstdc-p--p--11-dev_11.2.0-19ubuntu1_arm64", + "name": "libstdc++-11-dev", + "sha256": "4ee878910f92c6ecf70ad61cb4377502713dbb2315bba855d18c5ea751f9ec77", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-11/libstdc++-11-dev_11.2.0-19ubuntu1_arm64.deb", + "version": "11.2.0-19ubuntu1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libstdc-p--p-6_12-20220319-1ubuntu1_arm64", + "name": "libstdc++6", + "sha256": "d9903f1cf4e3c0a74e0bd2f7c65e673c104833cfaaab370d3f2114ffd06728f3", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/libstdc++6_12-20220319-1ubuntu1_arm64.deb", + "version": "12-20220319-1ubuntu1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libtirpc-common_1.3.2-2build1_arm64", + "name": "libtirpc-common", + "sha256": "a2746e8c1ae8b1ced2312304e8bd5e3aaabd504377480e743b0edff7b96da6fa", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libt/libtirpc/libtirpc-common_1.3.2-2build1_all.deb", + "version": "1.3.2-2build1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libtirpc-dev_1.3.2-2build1_arm64", + "name": "libtirpc-dev", + "sha256": "1d4f7f96fe5a79abd0c503bff0295f5d9292e425d8ca7ef75babe6bdff04b1f7", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libt/libtirpc/libtirpc-dev_1.3.2-2build1_arm64.deb", + "version": "1.3.2-2build1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libtirpc3_1.3.2-2build1_arm64", + "name": "libtirpc3", + "sha256": "4dbb563610856ff20f2261dd0d69a7c200b6f0995c741639cb0b8bc43282a94b", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libt/libtirpc/libtirpc3_1.3.2-2build1_arm64.deb", + "version": "1.3.2-2build1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libtsan0_11.2.0-19ubuntu1_arm64", + "name": "libtsan0", + "sha256": "10998c3eee8ab807977a75280a64672426a8d3784df268ea22845a3033c16ce3", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-11/libtsan0_11.2.0-19ubuntu1_arm64.deb", + "version": "11.2.0-19ubuntu1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libubsan1_12-20220319-1ubuntu1_arm64", + "name": "libubsan1", + "sha256": "1d27157b7ebd23a32e66aebbd44de13bd88eba1347f649038c7bec528ebb116f", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/libubsan1_12-20220319-1ubuntu1_arm64.deb", + "version": "12-20220319-1ubuntu1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libzstd1_1.4.8-p-dfsg-3build1_arm64", + "name": "libzstd1", + "sha256": "0102eb80384c2432c4be819663341a1c4e511d05f13ec1467643696531ec6491", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libz/libzstd/libzstd1_1.4.8+dfsg-3build1_arm64.deb", + "version": "1.4.8+dfsg-3build1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "linux-libc-dev_5.15.0-25.25_arm64", + "name": "linux-libc-dev", + "sha256": "ffbdfcd181d87b92c108cb49ca20e152c0688825b5a1aac9ecbc63391b348aeb", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/l/linux/linux-libc-dev_5.15.0-25.25_arm64.deb", + "version": "5.15.0-25.25" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "perl-base_5.34.0-3ubuntu1_arm64", + "name": "perl-base", + "sha256": "933e7ad3b97fd09d2b0ec763ee3b04500a3c6699c644405ad1cb2f9818d713cd", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/p/perl/perl-base_5.34.0-3ubuntu1_arm64.deb", + "version": "5.34.0-3ubuntu1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "rpcsvc-proto_1.4.2-0ubuntu6_arm64", + "name": "rpcsvc-proto", + "sha256": "07e79aa5de920bbb123d9590cdb2add2a8ec366864d7403794741db604698376", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/r/rpcsvc-proto/rpcsvc-proto_1.4.2-0ubuntu6_arm64.deb", + "version": "1.4.2-0ubuntu6" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "tar_1.34-p-dfsg-1build3_arm64", + "name": "tar", + "sha256": "328da7dfc33aafcd410c472410070abd31c9e7acd291cac0f6e03a8396746f33", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/t/tar/tar_1.34+dfsg-1build3_arm64.deb", + "version": "1.34+dfsg-1build3" + }, + { + "arch": "arm64", + "dependencies": [ + { + "key": "debconf_1.5.79ubuntu1_arm64", + "name": "debconf", + "version": "1.5.79ubuntu1" + }, + { + "key": "dpkg_1.21.1ubuntu2_arm64", + "name": "dpkg", + "version": "1.21.1ubuntu2" + }, + { + "key": "gcc-12-base_12-20220319-1ubuntu1_arm64", + "name": "gcc-12-base", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libacl1_2.3.1-1_arm64", + "name": "libacl1", + "version": "2.3.1-1" + }, + { + "key": "libbz2-1.0_1.0.8-5build1_arm64", + "name": "libbz2-1.0", + "version": "1.0.8-5build1" + }, + { + "key": "libc-dev-bin_2.35-0ubuntu3_arm64", + "name": "libc-dev-bin", + "version": "2.35-0ubuntu3" + }, + { + "key": "libc6-dev_2.35-0ubuntu3_arm64", + "name": "libc6-dev", + "version": "2.35-0ubuntu3" + }, + { + "key": "libc6_2.35-0ubuntu3_arm64", + "name": "libc6", + "version": "2.35-0ubuntu3" + }, + { + "key": "libcom-err2_1.46.5-2ubuntu1_arm64", + "name": "libcom-err2", + "version": "1.46.5-2ubuntu1" + }, + { + "key": "libcrypt-dev_1-4.4.27-1_arm64", + "name": "libcrypt-dev", + "version": "1:4.4.27-1" + }, + { + "key": "libcrypt1_1-4.4.27-1_arm64", + "name": "libcrypt1", + "version": "1:4.4.27-1" + }, + { + "key": "libgcc-s1_12-20220319-1ubuntu1_arm64", + "name": "libgcc-s1", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libgssapi-krb5-2_1.19.2-2_arm64", + "name": "libgssapi-krb5-2", + "version": "1.19.2-2" + }, + { + "key": "libk5crypto3_1.19.2-2_arm64", + "name": "libk5crypto3", + "version": "1.19.2-2" + }, + { + "key": "libkeyutils1_1.6.1-2ubuntu3_arm64", + "name": "libkeyutils1", + "version": "1.6.1-2ubuntu3" + }, + { + "key": "libkrb5-3_1.19.2-2_arm64", + "name": "libkrb5-3", + "version": "1.19.2-2" + }, + { + "key": "libkrb5support0_1.19.2-2_arm64", + "name": "libkrb5support0", + "version": "1.19.2-2" + }, + { + "key": "liblzma5_5.2.5-2ubuntu1_arm64", + "name": "liblzma5", + "version": "5.2.5-2ubuntu1" + }, + { + "key": "libnsl-dev_1.3.0-2build2_arm64", + "name": "libnsl-dev", + "version": "1.3.0-2build2" + }, + { + "key": "libnsl2_1.3.0-2build2_arm64", + "name": "libnsl2", + "version": "1.3.0-2build2" + }, + { + "key": "libpcre2-8-0_10.39-3build1_arm64", + "name": "libpcre2-8-0", + "version": "10.39-3build1" + }, + { + "key": "libselinux1_3.3-1build2_arm64", + "name": "libselinux1", + "version": "3.3-1build2" + }, + { + "key": "libssl3_3.0.2-0ubuntu1_arm64", + "name": "libssl3", + "version": "3.0.2-0ubuntu1" + }, + { + "key": "libtirpc-common_1.3.2-2build1_arm64", + "name": "libtirpc-common", + "version": "1.3.2-2build1" + }, + { + "key": "libtirpc-dev_1.3.2-2build1_arm64", + "name": "libtirpc-dev", + "version": "1.3.2-2build1" + }, + { + "key": "libtirpc3_1.3.2-2build1_arm64", + "name": "libtirpc3", + "version": "1.3.2-2build1" + }, + { + "key": "libzstd1_1.4.8-p-dfsg-3build1_arm64", + "name": "libzstd1", + "version": "1.4.8+dfsg-3build1" + }, + { + "key": "linux-libc-dev_5.15.0-25.25_arm64", + "name": "linux-libc-dev", + "version": "5.15.0-25.25" + }, + { + "key": "perl-base_5.34.0-3ubuntu1_arm64", + "name": "perl-base", + "version": "5.34.0-3ubuntu1" + }, + { + "key": "rpcsvc-proto_1.4.2-0ubuntu6_arm64", + "name": "rpcsvc-proto", + "version": "1.4.2-0ubuntu6" + }, + { + "key": "tar_1.34-p-dfsg-1build3_arm64", + "name": "tar", + "version": "1.34+dfsg-1build3" + }, + { + "key": "zlib1g_1-1.2.11.dfsg-2ubuntu9_arm64", + "name": "zlib1g", + "version": "1:1.2.11.dfsg-2ubuntu9" + } + ], + "key": "zlib1g-dev_1-1.2.11.dfsg-2ubuntu9_arm64", + "name": "zlib1g-dev", + "sha256": "2293f3feacd87c471468b36b09f58deec22f74a861bf39265884c3b7b353bea3", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/z/zlib/zlib1g-dev_1.2.11.dfsg-2ubuntu9_arm64.deb", + "version": "1:1.2.11.dfsg-2ubuntu9" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "zlib1g_1-1.2.11.dfsg-2ubuntu9_arm64", + "name": "zlib1g", + "sha256": "597820b01a8b019d04c9f9db2cad80d9d0ed93d39770066bd833e362c526b345", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/z/zlib/zlib1g_1.2.11.dfsg-2ubuntu9_arm64.deb", + "version": "1:1.2.11.dfsg-2ubuntu9" + } + ], + "version": 2 +} \ No newline at end of file From 433160e1be486a1b8043957a501e14f7372de5cd Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Tue, 21 Jul 2026 13:40:11 -0700 Subject: [PATCH 17/25] disable default toolchain except windows --- .bazelrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.bazelrc b/.bazelrc index 07584f042..e142d002d 100644 --- a/.bazelrc +++ b/.bazelrc @@ -22,6 +22,9 @@ build --worker_sandboxing build --enable_platform_specific_config +common:macos --repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 +common:linux --repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 + common --repo_env=ACCEPTED_ANDROID_NDK_LICENSE_VERSION=r27c common --repo_env=ACCEPTED_ANDROID_SDK_LICENSE_VERSION=35 From e293a3ae7ae85932936824ceef0986934cfdafd0 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Tue, 21 Jul 2026 13:47:26 -0700 Subject: [PATCH 18/25] move to feature --- swift/internal/extensions/toolchain.BUILD | 54 +---------------------- swift/toolchains/BUILD | 6 +++ swift/toolchains/sysroot/BUILD | 52 ++++++++++++++++++++++ 3 files changed, 59 insertions(+), 53 deletions(-) create mode 100644 swift/toolchains/sysroot/BUILD diff --git a/swift/internal/extensions/toolchain.BUILD b/swift/internal/extensions/toolchain.BUILD index 1a2bc0e95..15f3f2aac 100644 --- a/swift/internal/extensions/toolchain.BUILD +++ b/swift/internal/extensions/toolchain.BUILD @@ -1,11 +1,9 @@ load("@apple_support//toolchain:cc_toolchain.bzl", apple_support_cc_toolchain = "cc_toolchain") load("@rules_cc//cc/toolchains:args.bzl", "cc_args") -load("@rules_cc//cc/toolchains:feature.bzl", "cc_feature") load("@rules_cc//cc/toolchains:make_variable.bzl", "cc_make_variable") load("@rules_cc//cc/toolchains:tool.bzl", "cc_tool") load("@rules_cc//cc/toolchains:tool_map.bzl", "cc_tool_map") load("@rules_cc//cc/toolchains:toolchain.bzl", "cc_toolchain") -load("@rules_cc//cc/toolchains/args:sysroot.bzl", "cc_sysroot") load("@rules_swift//swift/toolchains:swift_toolchain.bzl", "swift_toolchain") load("@rules_swift//swift/toolchains:swift_tools.bzl", "swift_tools") @@ -124,61 +122,11 @@ cc_tool_map( }, ) -cc_sysroot( - name = "linux_aarch64_sysroot_args", - actions = [ - "@rules_cc//cc/toolchains/actions:link_actions", - "@rules_cc//cc/toolchains/actions:compile_actions", - ], - data = ["@swift_ubuntu22.04_aarch64_sysroot//:root"], - sysroot = "@swift_ubuntu22.04_aarch64_sysroot//:root", - tags = ["manual"], - visibility = ["//visibility:private"], -) - -cc_feature( - name = "linux_aarch64_sysroot", - args = [":linux_aarch64_sysroot_args"], - feature_name = "sysroot", - tags = ["manual"], - visibility = ["//visibility:private"], -) - -cc_sysroot( - name = "linux_x86_64_sysroot_args", - actions = [ - "@rules_cc//cc/toolchains/actions:link_actions", - "@rules_cc//cc/toolchains/actions:compile_actions", - ], - data = ["@swift_ubuntu22.04_sysroot//:root"], - sysroot = "@swift_ubuntu22.04_sysroot//:root", - tags = ["manual"], - visibility = ["//visibility:private"], -) - -cc_feature( - name = "linux_x86_64_sysroot", - args = [":linux_x86_64_sysroot_args"], - feature_name = "sysroot", - tags = ["manual"], - visibility = ["//visibility:private"], -) - -alias( - name = "linux_sysroot", - actual = select({ - "@platforms//cpu:aarch64": ":linux_aarch64_sysroot", - "@platforms//cpu:x86_64": ":linux_x86_64_sysroot", - }), - tags = ["manual"], - visibility = ["//visibility:private"], -) - apple_support_cc_toolchain( name = "cc_toolchain_exec", module_map = None, supports_header_parsing = False, - sysroot_feature = ":linux_sysroot", + sysroot_feature = "@rules_swift//swift/toolchains:linux_sysroot_feature", target = select({ "@platforms//cpu:aarch64": "aarch64-unknown-linux-gnu", "@platforms//cpu:x86_64": "x86_64-unknown-linux-gnu", diff --git a/swift/toolchains/BUILD b/swift/toolchains/BUILD index 10964bc03..a0c0e652f 100644 --- a/swift/toolchains/BUILD +++ b/swift/toolchains/BUILD @@ -11,6 +11,12 @@ load( licenses(["notice"]) +label_flag( + name = "linux_sysroot_feature", + build_setting_default = "//swift/toolchains/sysroot:linux_sysroot", + visibility = ["//visibility:public"], +) + toolchain( name = "linux-swift-toolchain_x86_64", exec_compatible_with = [ diff --git a/swift/toolchains/sysroot/BUILD b/swift/toolchains/sysroot/BUILD new file mode 100644 index 000000000..4e9a95b50 --- /dev/null +++ b/swift/toolchains/sysroot/BUILD @@ -0,0 +1,52 @@ +load("@rules_cc//cc/toolchains:feature.bzl", "cc_feature") +load("@rules_cc//cc/toolchains/args:sysroot.bzl", "cc_sysroot") + +cc_sysroot( + name = "linux_aarch64_sysroot_args", + actions = [ + "@rules_cc//cc/toolchains/actions:link_actions", + "@rules_cc//cc/toolchains/actions:compile_actions", + ], + data = ["@swift_ubuntu22.04_aarch64_sysroot//:root"], + sysroot = "@swift_ubuntu22.04_aarch64_sysroot//:root", + tags = ["manual"], + visibility = ["//visibility:private"], +) + +cc_feature( + name = "linux_aarch64_sysroot", + args = [":linux_aarch64_sysroot_args"], + feature_name = "sysroot", + tags = ["manual"], + visibility = ["//visibility:private"], +) + +cc_sysroot( + name = "linux_x86_64_sysroot_args", + actions = [ + "@rules_cc//cc/toolchains/actions:link_actions", + "@rules_cc//cc/toolchains/actions:compile_actions", + ], + data = ["@swift_ubuntu22.04_sysroot//:root"], + sysroot = "@swift_ubuntu22.04_sysroot//:root", + tags = ["manual"], + visibility = ["//visibility:private"], +) + +cc_feature( + name = "linux_x86_64_sysroot", + args = [":linux_x86_64_sysroot_args"], + feature_name = "sysroot", + tags = ["manual"], + visibility = ["//visibility:private"], +) + +alias( + name = "linux_sysroot", + actual = select({ + "@platforms//cpu:aarch64": ":linux_aarch64_sysroot", + "@platforms//cpu:x86_64": ":linux_x86_64_sysroot", + }), + tags = ["manual"], + visibility = ["//visibility:private"], +) From 3180a6ee2ab2237b548df425f1e0994fd06dca75 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Tue, 21 Jul 2026 14:06:45 -0700 Subject: [PATCH 19/25] style --- swift/internal/extensions/toolchain.BUILD | 64 ++++++++++++++++++++++- swift/toolchains/BUILD | 16 +++++- swift/toolchains/sysroot/BUILD | 52 ------------------ 3 files changed, 78 insertions(+), 54 deletions(-) delete mode 100644 swift/toolchains/sysroot/BUILD diff --git a/swift/internal/extensions/toolchain.BUILD b/swift/internal/extensions/toolchain.BUILD index 15f3f2aac..e3dbd34fc 100644 --- a/swift/internal/extensions/toolchain.BUILD +++ b/swift/internal/extensions/toolchain.BUILD @@ -1,9 +1,11 @@ load("@apple_support//toolchain:cc_toolchain.bzl", apple_support_cc_toolchain = "cc_toolchain") load("@rules_cc//cc/toolchains:args.bzl", "cc_args") +load("@rules_cc//cc/toolchains:feature.bzl", "cc_feature") load("@rules_cc//cc/toolchains:make_variable.bzl", "cc_make_variable") load("@rules_cc//cc/toolchains:tool.bzl", "cc_tool") load("@rules_cc//cc/toolchains:tool_map.bzl", "cc_tool_map") load("@rules_cc//cc/toolchains:toolchain.bzl", "cc_toolchain") +load("@rules_cc//cc/toolchains/args:sysroot.bzl", "cc_sysroot") load("@rules_swift//swift/toolchains:swift_toolchain.bzl", "swift_toolchain") load("@rules_swift//swift/toolchains:swift_tools.bzl", "swift_tools") @@ -122,11 +124,71 @@ cc_tool_map( }, ) +cc_sysroot( + name = "linux_aarch64_sysroot_args", + actions = [ + "@rules_cc//cc/toolchains/actions:link_actions", + "@rules_cc//cc/toolchains/actions:compile_actions", + ], + data = ["@swift_ubuntu22.04_aarch64_sysroot//:root"], + sysroot = "@swift_ubuntu22.04_aarch64_sysroot//:root", + tags = ["manual"], + visibility = ["//visibility:private"], +) + +cc_feature( + name = "linux_aarch64_sysroot", + args = [":linux_aarch64_sysroot_args"], + feature_name = "sysroot", + tags = ["manual"], + visibility = ["//visibility:private"], +) + +cc_sysroot( + name = "linux_x86_64_sysroot_args", + actions = [ + "@rules_cc//cc/toolchains/actions:link_actions", + "@rules_cc//cc/toolchains/actions:compile_actions", + ], + data = ["@swift_ubuntu22.04_sysroot//:root"], + sysroot = "@swift_ubuntu22.04_sysroot//:root", + tags = ["manual"], + visibility = ["//visibility:private"], +) + +cc_feature( + name = "linux_x86_64_sysroot", + args = [":linux_x86_64_sysroot_args"], + feature_name = "sysroot", + tags = ["manual"], + visibility = ["//visibility:private"], +) + +alias( + name = "linux_sysroot", + actual = select({ + "@platforms//cpu:aarch64": ":linux_aarch64_sysroot", + "@platforms//cpu:x86_64": ":linux_x86_64_sysroot", + }), + tags = ["manual"], + visibility = ["//visibility:private"], +) + +alias( + name = "selected_linux_sysroot_feature", + actual = select({ + "@rules_swift//swift/toolchains:linux_sysroot_feature_is_default": ":linux_sysroot", + "//conditions:default": "@rules_swift//swift/toolchains:linux_sysroot_feature", + }), + tags = ["manual"], + visibility = ["//visibility:private"], +) + apple_support_cc_toolchain( name = "cc_toolchain_exec", module_map = None, supports_header_parsing = False, - sysroot_feature = "@rules_swift//swift/toolchains:linux_sysroot_feature", + sysroot_feature = ":selected_linux_sysroot_feature", target = select({ "@platforms//cpu:aarch64": "aarch64-unknown-linux-gnu", "@platforms//cpu:x86_64": "x86_64-unknown-linux-gnu", diff --git a/swift/toolchains/BUILD b/swift/toolchains/BUILD index a0c0e652f..1a8db31e2 100644 --- a/swift/toolchains/BUILD +++ b/swift/toolchains/BUILD @@ -3,6 +3,7 @@ load( "APPLE_PLATFORMS_CONSTRAINTS", ) load("@bazel_skylib//:bzl_library.bzl", "bzl_library") +load("@rules_cc//cc/toolchains:feature.bzl", "cc_feature") load("@rules_swift//swift/toolchains:xcode_swift_toolchain.bzl", "xcode_swift_toolchain") load( "//swift/internal:feature_names.bzl", @@ -11,9 +12,22 @@ load( licenses(["notice"]) +cc_feature( + name = "default_linux_sysroot_feature", + feature_name = "rules_swift_default_linux_sysroot", +) + label_flag( name = "linux_sysroot_feature", - build_setting_default = "//swift/toolchains/sysroot:linux_sysroot", + build_setting_default = ":default_linux_sysroot_feature", + visibility = ["//visibility:public"], +) + +config_setting( + name = "linux_sysroot_feature_is_default", + flag_values = { + ":linux_sysroot_feature": ":default_linux_sysroot_feature", + }, visibility = ["//visibility:public"], ) diff --git a/swift/toolchains/sysroot/BUILD b/swift/toolchains/sysroot/BUILD deleted file mode 100644 index 4e9a95b50..000000000 --- a/swift/toolchains/sysroot/BUILD +++ /dev/null @@ -1,52 +0,0 @@ -load("@rules_cc//cc/toolchains:feature.bzl", "cc_feature") -load("@rules_cc//cc/toolchains/args:sysroot.bzl", "cc_sysroot") - -cc_sysroot( - name = "linux_aarch64_sysroot_args", - actions = [ - "@rules_cc//cc/toolchains/actions:link_actions", - "@rules_cc//cc/toolchains/actions:compile_actions", - ], - data = ["@swift_ubuntu22.04_aarch64_sysroot//:root"], - sysroot = "@swift_ubuntu22.04_aarch64_sysroot//:root", - tags = ["manual"], - visibility = ["//visibility:private"], -) - -cc_feature( - name = "linux_aarch64_sysroot", - args = [":linux_aarch64_sysroot_args"], - feature_name = "sysroot", - tags = ["manual"], - visibility = ["//visibility:private"], -) - -cc_sysroot( - name = "linux_x86_64_sysroot_args", - actions = [ - "@rules_cc//cc/toolchains/actions:link_actions", - "@rules_cc//cc/toolchains/actions:compile_actions", - ], - data = ["@swift_ubuntu22.04_sysroot//:root"], - sysroot = "@swift_ubuntu22.04_sysroot//:root", - tags = ["manual"], - visibility = ["//visibility:private"], -) - -cc_feature( - name = "linux_x86_64_sysroot", - args = [":linux_x86_64_sysroot_args"], - feature_name = "sysroot", - tags = ["manual"], - visibility = ["//visibility:private"], -) - -alias( - name = "linux_sysroot", - actual = select({ - "@platforms//cpu:aarch64": ":linux_aarch64_sysroot", - "@platforms//cpu:x86_64": ":linux_x86_64_sysroot", - }), - tags = ["manual"], - visibility = ["//visibility:private"], -) From 6a33a90d6f8e0a05665036edb4880fb65e97b582 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Tue, 21 Jul 2026 14:34:18 -0700 Subject: [PATCH 20/25] remove rpaths when vendored --- swift/internal/extensions/toolchains.bzl | 1 - swift/toolchains/swift_toolchain.bzl | 8 ++++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/swift/internal/extensions/toolchains.bzl b/swift/internal/extensions/toolchains.bzl index 359395580..b43ca81ba 100644 --- a/swift/internal/extensions/toolchains.bzl +++ b/swift/internal/extensions/toolchains.bzl @@ -112,7 +112,6 @@ def toolchains_for_platform(platform, toolchain_repository): toolchain_repository = toolchain_repository, ) - # TODO: Expand based on sysroot compatibility, maybe we should allow users to pass them if platform in ( "ubuntu22.04", "ubuntu22.04-aarch64", diff --git a/swift/toolchains/swift_toolchain.bzl b/swift/toolchains/swift_toolchain.bzl index a71fcfec0..efa2fc2cf 100644 --- a/swift/toolchains/swift_toolchain.bzl +++ b/swift/toolchains/swift_toolchain.bzl @@ -423,8 +423,6 @@ def _swift_unix_linkopts_cc_info( linkopts = [ "-pie", - "-L{}".format(platform_lib_dir), - "-Wl,-rpath,{}".format(platform_lib_dir), "-lm", "-lstdc++", "-lrt", @@ -433,6 +431,12 @@ def _swift_unix_linkopts_cc_info( "-static-libgcc", ] + if paths.is_absolute(toolchain_root): + linkopts.extend([ + "-L{}".format(platform_lib_dir), + "-Wl,-rpath,{}".format(platform_lib_dir), + ]) + return CcInfo( linking_context = cc_common.create_linking_context( linker_inputs = depset([ From 2779856117ac1396b4077653306714f8005a7cc8 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Wed, 22 Jul 2026 13:42:20 -0700 Subject: [PATCH 21/25] rework a lot because XCTest makes this hard --- MODULE.bazel | 4 + doc/providers.md | 5 +- swift/internal/extensions/toolchain.BUILD | 26 +- .../ubuntu22.04_aarch64_sysroot.lock.json | 619 ++++++++++++++++++ .../extensions/ubuntu22.04_sysroot.lock.json | 619 ++++++++++++++++++ swift/internal/feature_names.bzl | 4 + swift/internal/features.bzl | 2 + swift/internal/linking.bzl | 1 + swift/internal/utils.bzl | 36 +- swift/providers.bzl | 11 + swift/swift_test.bzl | 6 +- swift/toolchains/swift_toolchain.bzl | 241 +++++-- swift/toolchains/xcode_swift_toolchain.bzl | 4 + test/linux_static_stdlib/BUILD | 78 +++ .../FoundationLibrary.swift | 5 + .../FoundationLibraryTests.swift | 8 + .../linux_dynamic_stdlib_test.sh | 25 + .../linux_static_stdlib_test.sh | 17 + test/linux_static_stdlib/main.swift | 3 + 19 files changed, 1630 insertions(+), 84 deletions(-) create mode 100644 test/linux_static_stdlib/BUILD create mode 100644 test/linux_static_stdlib/FoundationLibrary.swift create mode 100644 test/linux_static_stdlib/FoundationLibraryTests.swift create mode 100755 test/linux_static_stdlib/linux_dynamic_stdlib_test.sh create mode 100755 test/linux_static_stdlib/linux_static_stdlib_test.sh create mode 100644 test/linux_static_stdlib/main.swift diff --git a/MODULE.bazel b/MODULE.bazel index f9471e437..34c11e195 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -29,7 +29,9 @@ apt.ubuntu( lockfile = "//swift/internal/extensions:ubuntu22.04_sysroot.lock.json", packages = [ "libc6-dev", + "libcurl4-openssl-dev", "libstdc++-11-dev", + "libxml2-dev", "linux-libc-dev", "zlib1g-dev", ], @@ -41,7 +43,9 @@ apt.ubuntu( lockfile = "//swift/internal/extensions:ubuntu22.04_aarch64_sysroot.lock.json", packages = [ "libc6-dev", + "libcurl4-openssl-dev", "libstdc++-11-dev", + "libxml2-dev", "linux-libc-dev", "zlib1g-dev", ], diff --git a/doc/providers.md b/doc/providers.md index 502e22fb4..abe97c9bb 100644 --- a/doc/providers.md +++ b/doc/providers.md @@ -268,7 +268,8 @@ SwiftToolchainInfo(action_configsconst_protocols_to_gather, cross_import_overlays, debug_outputs_provider, developer_dirs, entry_point_linkopts_provider, feature_allowlists, generated_header_module_implicit_deps_providers, implicit_deps_providers, - module_aliases, package_configurations, requested_features, root_dir, swift_worker, + module_aliases, package_configurations, requested_features, + dynamic_runtime_cc_info, root_dir, static_runtime_cc_info, swift_worker, system_modules, implicit_system_modules, test_configuration, tool_configs, unsupported_features) @@ -295,7 +296,9 @@ that use the toolchain. | module_aliases | A `SwiftModuleAliasesInfo` provider that defines the module aliases to use during compilation. | | package_configurations | A list of `SwiftPackageConfigurationInfo` providers that specify additional compilation configuration options that are applied to targets on a per-package basis. | | 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.

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). | +| dynamic_runtime_cc_info | The `CcInfo` that selects the toolchain's ordinary dynamic Swift runtime, or `None` if the toolchain supplies its runtime through implicit dependencies. Final links select this provider unless `swift.static_stdlib` is enabled; it is not propagated by libraries. | | root_dir | `String`. The workspace-relative root directory of the toolchain. | +| static_runtime_cc_info | A `CcInfo` that selects the static Swift runtime, or `None` if the toolchain does not support static Swift runtime linking. Final links select this provider when `swift.static_stdlib` is enabled; it is not propagated by libraries. | | 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). | | system_modules | A `struct` with the following fields, which represent providers from targets that should be added as implicit dependencies of any compilation or linking target:

* `cc_infos`: A list of `CcInfo` providers from targets specified as the toolchain's implicit dependencies.

* `swift_infos`: A list of `SwiftInfo` providers from targets specified as the toolchain's implicit dependencies.

For ease of use, this field is never `None`; it will always be a valid `struct` containing the fields described above, even if those lists are empty. | | implicit_system_modules | A `struct` with in the same shape as `system_modules` for the system modules that every Swift compilation implicitly requires. | diff --git a/swift/internal/extensions/toolchain.BUILD b/swift/internal/extensions/toolchain.BUILD index e3dbd34fc..bc2809266 100644 --- a/swift/internal/extensions/toolchain.BUILD +++ b/swift/internal/extensions/toolchain.BUILD @@ -14,6 +14,7 @@ package(default_visibility = ["//visibility:public"]) ### Convenience target. Only useful for test / debug. ### exports_files([ "usr/bin/llvm-objcopy", + "usr/bin/llvm-objdump", ]) ### Tools referenced by Swift SDK cross-compilation repositories. ### @@ -322,6 +323,13 @@ swift_toolchain( "@platforms//cpu:aarch64": "aarch64", "@platforms//cpu:x86_64": "x86_64", }), + dynamic_runtime = glob( + [ + "usr/lib/swift/linux/*.so*", + "usr/lib/swift/macosx/*.dylib", + ], + allow_empty = True, + ), features = [ "swift._supports_upcoming_features", "swift.no_embed_debug_module", @@ -338,13 +346,17 @@ swift_toolchain( "@platforms//os:macos": "macos", }), parsed_version = "{swift_version}", - runtime = glob( - [ - "usr/lib/swift/linux/*.so", - "usr/lib/swift/macosx/*.dylib", - ], - allow_empty = True, - ), + static_runtime = select({ + "@platforms//os:linux": glob( + [ + "usr/lib/swift/linux/*.a", + "usr/lib/swift_static/linux/*.a", + "usr/lib/swift_static/linux/*.lnk", + "usr/lib/swift_static/linux/*/*.o", + ], + ), + "//conditions:default": [], + }), swift_tools = "tools", version_file = ".swift-version", ) diff --git a/swift/internal/extensions/ubuntu22.04_aarch64_sysroot.lock.json b/swift/internal/extensions/ubuntu22.04_aarch64_sysroot.lock.json index c3b3065e0..8b85c636e 100644 --- a/swift/internal/extensions/ubuntu22.04_aarch64_sysroot.lock.json +++ b/swift/internal/extensions/ubuntu22.04_aarch64_sysroot.lock.json @@ -5,7 +5,9 @@ ], "packages": [ "libc6-dev", + "libcurl4-openssl-dev", "libstdc++-11-dev", + "libxml2-dev", "linux-libc-dev", "zlib1g-dev" ], @@ -61,6 +63,15 @@ "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/gcc-12-base_12-20220319-1ubuntu1_arm64.deb", "version": "12-20220319-1ubuntu1" }, + { + "arch": "arm64", + "dependencies": [], + "key": "icu-devtools_70.1-2_arm64", + "name": "icu-devtools", + "sha256": "541fcb9e8c1aeb6dd2590489507adf88a80d9d23a5ffb8c0649bdce2a5e906e4", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/i/icu/icu-devtools_70.1-2_arm64.deb", + "version": "70.1-2" + }, { "arch": "arm64", "dependencies": [], @@ -88,6 +99,15 @@ "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/libatomic1_12-20220319-1ubuntu1_arm64.deb", "version": "12-20220319-1ubuntu1" }, + { + "arch": "arm64", + "dependencies": [], + "key": "libbrotli1_1.0.9-2build6_arm64", + "name": "libbrotli1", + "sha256": "6ce71a1452d7ec3ed2404db11a4d0aea1326b8fa9bb904493b49ff873b70d6a5", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/b/brotli/libbrotli1_1.0.9-2build6_arm64.deb", + "version": "1.0.9-2build6" + }, { "arch": "arm64", "dependencies": [], @@ -307,6 +327,248 @@ "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libx/libxcrypt/libcrypt1_4.4.27-1_arm64.deb", "version": "1:4.4.27-1" }, + { + "arch": "arm64", + "dependencies": [ + { + "key": "debconf_1.5.79ubuntu1_arm64", + "name": "debconf", + "version": "1.5.79ubuntu1" + }, + { + "key": "dpkg_1.21.1ubuntu2_arm64", + "name": "dpkg", + "version": "1.21.1ubuntu2" + }, + { + "key": "gcc-12-base_12-20220319-1ubuntu1_arm64", + "name": "gcc-12-base", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libacl1_2.3.1-1_arm64", + "name": "libacl1", + "version": "2.3.1-1" + }, + { + "key": "libbrotli1_1.0.9-2build6_arm64", + "name": "libbrotli1", + "version": "1.0.9-2build6" + }, + { + "key": "libbz2-1.0_1.0.8-5build1_arm64", + "name": "libbz2-1.0", + "version": "1.0.8-5build1" + }, + { + "key": "libc6_2.35-0ubuntu3_arm64", + "name": "libc6", + "version": "2.35-0ubuntu3" + }, + { + "key": "libcom-err2_1.46.5-2ubuntu1_arm64", + "name": "libcom-err2", + "version": "1.46.5-2ubuntu1" + }, + { + "key": "libcrypt1_1-4.4.27-1_arm64", + "name": "libcrypt1", + "version": "1:4.4.27-1" + }, + { + "key": "libcurl4_7.81.0-1_arm64", + "name": "libcurl4", + "version": "7.81.0-1" + }, + { + "key": "libdb5.3_5.3.28-p-dfsg1-0.8ubuntu3_arm64", + "name": "libdb5.3", + "version": "5.3.28+dfsg1-0.8ubuntu3" + }, + { + "key": "libffi8_3.4.2-4_arm64", + "name": "libffi8", + "version": "3.4.2-4" + }, + { + "key": "libgcc-s1_12-20220319-1ubuntu1_arm64", + "name": "libgcc-s1", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libgmp10_2-6.2.1-p-dfsg-3ubuntu1_arm64", + "name": "libgmp10", + "version": "2:6.2.1+dfsg-3ubuntu1" + }, + { + "key": "libgnutls30_3.7.3-4ubuntu1_arm64", + "name": "libgnutls30", + "version": "3.7.3-4ubuntu1" + }, + { + "key": "libgssapi-krb5-2_1.19.2-2_arm64", + "name": "libgssapi-krb5-2", + "version": "1.19.2-2" + }, + { + "key": "libhogweed6_3.7.3-1build2_arm64", + "name": "libhogweed6", + "version": "3.7.3-1build2" + }, + { + "key": "libidn2-0_2.3.2-2build1_arm64", + "name": "libidn2-0", + "version": "2.3.2-2build1" + }, + { + "key": "libk5crypto3_1.19.2-2_arm64", + "name": "libk5crypto3", + "version": "1.19.2-2" + }, + { + "key": "libkeyutils1_1.6.1-2ubuntu3_arm64", + "name": "libkeyutils1", + "version": "1.6.1-2ubuntu3" + }, + { + "key": "libkrb5-3_1.19.2-2_arm64", + "name": "libkrb5-3", + "version": "1.19.2-2" + }, + { + "key": "libkrb5support0_1.19.2-2_arm64", + "name": "libkrb5support0", + "version": "1.19.2-2" + }, + { + "key": "libldap-2.5-0_2.5.11-p-dfsg-1_exp1ubuntu3_arm64", + "name": "libldap-2.5-0", + "version": "2.5.11+dfsg-1~exp1ubuntu3" + }, + { + "key": "liblzma5_5.2.5-2ubuntu1_arm64", + "name": "liblzma5", + "version": "5.2.5-2ubuntu1" + }, + { + "key": "libnettle8_3.7.3-1build2_arm64", + "name": "libnettle8", + "version": "3.7.3-1build2" + }, + { + "key": "libnghttp2-14_1.43.0-1build3_arm64", + "name": "libnghttp2-14", + "version": "1.43.0-1build3" + }, + { + "key": "libp11-kit0_0.24.0-6build1_arm64", + "name": "libp11-kit0", + "version": "0.24.0-6build1" + }, + { + "key": "libpcre2-8-0_10.39-3build1_arm64", + "name": "libpcre2-8-0", + "version": "10.39-3build1" + }, + { + "key": "libpsl5_0.21.0-1.2build2_arm64", + "name": "libpsl5", + "version": "0.21.0-1.2build2" + }, + { + "key": "librtmp1_2.4-p-20151223.gitfa8646d.1-2build4_arm64", + "name": "librtmp1", + "version": "2.4+20151223.gitfa8646d.1-2build4" + }, + { + "key": "libsasl2-2_2.1.27-p-dfsg2-3ubuntu1_arm64", + "name": "libsasl2-2", + "version": "2.1.27+dfsg2-3ubuntu1" + }, + { + "key": "libsasl2-modules-db_2.1.27-p-dfsg2-3ubuntu1_arm64", + "name": "libsasl2-modules-db", + "version": "2.1.27+dfsg2-3ubuntu1" + }, + { + "key": "libselinux1_3.3-1build2_arm64", + "name": "libselinux1", + "version": "3.3-1build2" + }, + { + "key": "libssh-4_0.9.6-2build1_arm64", + "name": "libssh-4", + "version": "0.9.6-2build1" + }, + { + "key": "libssl3_3.0.2-0ubuntu1_arm64", + "name": "libssl3", + "version": "3.0.2-0ubuntu1" + }, + { + "key": "libtasn1-6_4.18.0-4build1_arm64", + "name": "libtasn1-6", + "version": "4.18.0-4build1" + }, + { + "key": "libunistring2_1.0-1_arm64", + "name": "libunistring2", + "version": "1.0-1" + }, + { + "key": "libzstd1_1.4.8-p-dfsg-3build1_arm64", + "name": "libzstd1", + "version": "1.4.8+dfsg-3build1" + }, + { + "key": "perl-base_5.34.0-3ubuntu1_arm64", + "name": "perl-base", + "version": "5.34.0-3ubuntu1" + }, + { + "key": "tar_1.34-p-dfsg-1build3_arm64", + "name": "tar", + "version": "1.34+dfsg-1build3" + }, + { + "key": "zlib1g_1-1.2.11.dfsg-2ubuntu9_arm64", + "name": "zlib1g", + "version": "1:1.2.11.dfsg-2ubuntu9" + } + ], + "key": "libcurl4-openssl-dev_7.81.0-1_arm64", + "name": "libcurl4-openssl-dev", + "sha256": "29334327ab7a957490128fb3ca413f4914c6cdf26ef03e39b9fc28fa2b82c056", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/c/curl/libcurl4-openssl-dev_7.81.0-1_arm64.deb", + "version": "7.81.0-1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libcurl4_7.81.0-1_arm64", + "name": "libcurl4", + "sha256": "5dc16620cc8a408502273092fecfeed4d66724c472d07775a631d72d0d46851d", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/c/curl/libcurl4_7.81.0-1_arm64.deb", + "version": "7.81.0-1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libdb5.3_5.3.28-p-dfsg1-0.8ubuntu3_arm64", + "name": "libdb5.3", + "sha256": "e5b672aeaca690b3b7ee97b03dbc07ddb49be7b6ea0a770fa6707666ca1cef59", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/d/db5.3/libdb5.3_5.3.28+dfsg1-0.8ubuntu3_arm64.deb", + "version": "5.3.28+dfsg1-0.8ubuntu3" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libffi8_3.4.2-4_arm64", + "name": "libffi8", + "sha256": "a0cdf938e8da19bd2252c681f80268609a32d06496a1f8d0ebe1fa41debec697", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libf/libffi/libffi8_3.4.2-4_arm64.deb", + "version": "3.4.2-4" + }, { "arch": "arm64", "dependencies": [], @@ -325,6 +587,24 @@ "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/libgcc-s1_12-20220319-1ubuntu1_arm64.deb", "version": "12-20220319-1ubuntu1" }, + { + "arch": "arm64", + "dependencies": [], + "key": "libgmp10_2-6.2.1-p-dfsg-3ubuntu1_arm64", + "name": "libgmp10", + "sha256": "32233a3bf7c8b19e86ef3629334f0bece716bb163605d12e0d3a443d57a401d7", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gmp/libgmp10_6.2.1+dfsg-3ubuntu1_arm64.deb", + "version": "2:6.2.1+dfsg-3ubuntu1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libgnutls30_3.7.3-4ubuntu1_arm64", + "name": "libgnutls30", + "sha256": "72efd84cbba66adf128b8c6456add70c21ca7d558adf540b404e2ad895716f30", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gnutls28/libgnutls30_3.7.3-4ubuntu1_arm64.deb", + "version": "3.7.3-4ubuntu1" + }, { "arch": "arm64", "dependencies": [], @@ -343,6 +623,15 @@ "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/k/krb5/libgssapi-krb5-2_1.19.2-2_arm64.deb", "version": "1.19.2-2" }, + { + "arch": "arm64", + "dependencies": [], + "key": "libhogweed6_3.7.3-1build2_arm64", + "name": "libhogweed6", + "sha256": "844e5d093dd3982a85c134d47a9e22b129123fb817eb3eea96e936805b0f5170", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/n/nettle/libhogweed6_3.7.3-1build2_arm64.deb", + "version": "3.7.3-1build2" + }, { "arch": "arm64", "dependencies": [], @@ -352,6 +641,33 @@ "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/libhwasan0_12-20220319-1ubuntu1_arm64.deb", "version": "12-20220319-1ubuntu1" }, + { + "arch": "arm64", + "dependencies": [], + "key": "libicu-dev_70.1-2_arm64", + "name": "libicu-dev", + "sha256": "5e0609095ce643b4a18e14a2c9852b13fba37e30e7b7e70a2ee2aebaa60008d8", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/i/icu/libicu-dev_70.1-2_arm64.deb", + "version": "70.1-2" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libicu70_70.1-2_arm64", + "name": "libicu70", + "sha256": "ac68372cf4a976e6a206858fd9b28c68e49d37d650b9b8653270038a6e7bc174", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/i/icu/libicu70_70.1-2_arm64.deb", + "version": "70.1-2" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libidn2-0_2.3.2-2build1_arm64", + "name": "libidn2-0", + "sha256": "aeb29cc8deedc0710a97e44088ef0271dfe1197e77c0a0fc0c5602e14aeb938f", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libi/libidn2/libidn2-0_2.3.2-2build1_arm64.deb", + "version": "2.3.2-2build1" + }, { "arch": "arm64", "dependencies": [], @@ -397,6 +713,15 @@ "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/k/krb5/libkrb5support0_1.19.2-2_arm64.deb", "version": "1.19.2-2" }, + { + "arch": "arm64", + "dependencies": [], + "key": "libldap-2.5-0_2.5.11-p-dfsg-1_exp1ubuntu3_arm64", + "name": "libldap-2.5-0", + "sha256": "72c54266fe0f2d4653165af6bb96da555edc2394e32212a207539378e80479d3", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/o/openldap/libldap-2.5-0_2.5.11+dfsg-1~exp1ubuntu3_arm64.deb", + "version": "2.5.11+dfsg-1~exp1ubuntu3" + }, { "arch": "arm64", "dependencies": [], @@ -415,6 +740,24 @@ "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/x/xz-utils/liblzma5_5.2.5-2ubuntu1_arm64.deb", "version": "5.2.5-2ubuntu1" }, + { + "arch": "arm64", + "dependencies": [], + "key": "libnettle8_3.7.3-1build2_arm64", + "name": "libnettle8", + "sha256": "bcd667d9a51c2474f7ffc52807ab4a24f8b877b6da1a6f5b75e50e48ec4d634a", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/n/nettle/libnettle8_3.7.3-1build2_arm64.deb", + "version": "3.7.3-1build2" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libnghttp2-14_1.43.0-1build3_arm64", + "name": "libnghttp2-14", + "sha256": "b1786c51d6b2fbd9386175fa61c633f22746ebf6143ff6bc08659c44a4e688a4", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/n/nghttp2/libnghttp2-14_1.43.0-1build3_arm64.deb", + "version": "1.43.0-1build3" + }, { "arch": "arm64", "dependencies": [], @@ -433,6 +776,15 @@ "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libn/libnsl/libnsl2_1.3.0-2build2_arm64.deb", "version": "1.3.0-2build2" }, + { + "arch": "arm64", + "dependencies": [], + "key": "libp11-kit0_0.24.0-6build1_arm64", + "name": "libp11-kit0", + "sha256": "541bdd2f81d5caaa83465c1b524ed94e8e5851eba5469a8dce23b92e8e90a0cc", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/p/p11-kit/libp11-kit0_0.24.0-6build1_arm64.deb", + "version": "0.24.0-6build1" + }, { "arch": "arm64", "dependencies": [], @@ -442,6 +794,42 @@ "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/p/pcre2/libpcre2-8-0_10.39-3build1_arm64.deb", "version": "10.39-3build1" }, + { + "arch": "arm64", + "dependencies": [], + "key": "libpsl5_0.21.0-1.2build2_arm64", + "name": "libpsl5", + "sha256": "8439cc8b11a848f91746c27b76bf55d0426d07fa4146e4bc3bc2d3e74ed7ab9e", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libp/libpsl/libpsl5_0.21.0-1.2build2_arm64.deb", + "version": "0.21.0-1.2build2" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "librtmp1_2.4-p-20151223.gitfa8646d.1-2build4_arm64", + "name": "librtmp1", + "sha256": "f3b867a5a81382f8edcabfd3415465158eb952f018f960090141b5e188b8b28c", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/r/rtmpdump/librtmp1_2.4+20151223.gitfa8646d.1-2build4_arm64.deb", + "version": "2.4+20151223.gitfa8646d.1-2build4" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libsasl2-2_2.1.27-p-dfsg2-3ubuntu1_arm64", + "name": "libsasl2-2", + "sha256": "2e5c81e184d7db5d3405ae0b77ec46dd6d6bd05875026cf36f9470724daa1224", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/c/cyrus-sasl2/libsasl2-2_2.1.27+dfsg2-3ubuntu1_arm64.deb", + "version": "2.1.27+dfsg2-3ubuntu1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libsasl2-modules-db_2.1.27-p-dfsg2-3ubuntu1_arm64", + "name": "libsasl2-modules-db", + "sha256": "42d1810d60f9a3ec9982180ecfa03a0317fccc42b0b512b7470161b3f75f8365", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/c/cyrus-sasl2/libsasl2-modules-db_2.1.27+dfsg2-3ubuntu1_arm64.deb", + "version": "2.1.27+dfsg2-3ubuntu1" + }, { "arch": "arm64", "dependencies": [], @@ -451,6 +839,15 @@ "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libs/libselinux/libselinux1_3.3-1build2_arm64.deb", "version": "3.3-1build2" }, + { + "arch": "arm64", + "dependencies": [], + "key": "libssh-4_0.9.6-2build1_arm64", + "name": "libssh-4", + "sha256": "81795ea7e841fc6389499bcabafb42fa2dffd293a243e0ab8f825be868be347b", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libs/libssh/libssh-4_0.9.6-2build1_arm64.deb", + "version": "0.9.6-2build1" + }, { "arch": "arm64", "dependencies": [], @@ -694,6 +1091,15 @@ "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/libstdc++6_12-20220319-1ubuntu1_arm64.deb", "version": "12-20220319-1ubuntu1" }, + { + "arch": "arm64", + "dependencies": [], + "key": "libtasn1-6_4.18.0-4build1_arm64", + "name": "libtasn1-6", + "sha256": "702c494ab69df04a313d0942620209662c3a4b221b81e24d4137cd0b27a394aa", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libt/libtasn1-6/libtasn1-6_4.18.0-4build1_arm64.deb", + "version": "4.18.0-4build1" + }, { "arch": "arm64", "dependencies": [], @@ -739,6 +1145,219 @@ "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/libubsan1_12-20220319-1ubuntu1_arm64.deb", "version": "12-20220319-1ubuntu1" }, + { + "arch": "arm64", + "dependencies": [], + "key": "libunistring2_1.0-1_arm64", + "name": "libunistring2", + "sha256": "59e4af5c1fac70d1fbc19f3c732331ace8449f1f7112887e7b56b8370bd8942b", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libu/libunistring/libunistring2_1.0-1_arm64.deb", + "version": "1.0-1" + }, + { + "arch": "arm64", + "dependencies": [ + { + "key": "debconf_1.5.79ubuntu1_arm64", + "name": "debconf", + "version": "1.5.79ubuntu1" + }, + { + "key": "dpkg_1.21.1ubuntu2_arm64", + "name": "dpkg", + "version": "1.21.1ubuntu2" + }, + { + "key": "gcc-12-base_12-20220319-1ubuntu1_arm64", + "name": "gcc-12-base", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "icu-devtools_70.1-2_arm64", + "name": "icu-devtools", + "version": "70.1-2" + }, + { + "key": "libacl1_2.3.1-1_arm64", + "name": "libacl1", + "version": "2.3.1-1" + }, + { + "key": "libbz2-1.0_1.0.8-5build1_arm64", + "name": "libbz2-1.0", + "version": "1.0.8-5build1" + }, + { + "key": "libc-dev-bin_2.35-0ubuntu3_arm64", + "name": "libc-dev-bin", + "version": "2.35-0ubuntu3" + }, + { + "key": "libc6-dev_2.35-0ubuntu3_arm64", + "name": "libc6-dev", + "version": "2.35-0ubuntu3" + }, + { + "key": "libc6_2.35-0ubuntu3_arm64", + "name": "libc6", + "version": "2.35-0ubuntu3" + }, + { + "key": "libcom-err2_1.46.5-2ubuntu1_arm64", + "name": "libcom-err2", + "version": "1.46.5-2ubuntu1" + }, + { + "key": "libcrypt-dev_1-4.4.27-1_arm64", + "name": "libcrypt-dev", + "version": "1:4.4.27-1" + }, + { + "key": "libcrypt1_1-4.4.27-1_arm64", + "name": "libcrypt1", + "version": "1:4.4.27-1" + }, + { + "key": "libgcc-s1_12-20220319-1ubuntu1_arm64", + "name": "libgcc-s1", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libgssapi-krb5-2_1.19.2-2_arm64", + "name": "libgssapi-krb5-2", + "version": "1.19.2-2" + }, + { + "key": "libicu-dev_70.1-2_arm64", + "name": "libicu-dev", + "version": "70.1-2" + }, + { + "key": "libicu70_70.1-2_arm64", + "name": "libicu70", + "version": "70.1-2" + }, + { + "key": "libk5crypto3_1.19.2-2_arm64", + "name": "libk5crypto3", + "version": "1.19.2-2" + }, + { + "key": "libkeyutils1_1.6.1-2ubuntu3_arm64", + "name": "libkeyutils1", + "version": "1.6.1-2ubuntu3" + }, + { + "key": "libkrb5-3_1.19.2-2_arm64", + "name": "libkrb5-3", + "version": "1.19.2-2" + }, + { + "key": "libkrb5support0_1.19.2-2_arm64", + "name": "libkrb5support0", + "version": "1.19.2-2" + }, + { + "key": "liblzma5_5.2.5-2ubuntu1_arm64", + "name": "liblzma5", + "version": "5.2.5-2ubuntu1" + }, + { + "key": "libnsl-dev_1.3.0-2build2_arm64", + "name": "libnsl-dev", + "version": "1.3.0-2build2" + }, + { + "key": "libnsl2_1.3.0-2build2_arm64", + "name": "libnsl2", + "version": "1.3.0-2build2" + }, + { + "key": "libpcre2-8-0_10.39-3build1_arm64", + "name": "libpcre2-8-0", + "version": "10.39-3build1" + }, + { + "key": "libselinux1_3.3-1build2_arm64", + "name": "libselinux1", + "version": "3.3-1build2" + }, + { + "key": "libssl3_3.0.2-0ubuntu1_arm64", + "name": "libssl3", + "version": "3.0.2-0ubuntu1" + }, + { + "key": "libstdc-p--p-6_12-20220319-1ubuntu1_arm64", + "name": "libstdc++6", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libtirpc-common_1.3.2-2build1_arm64", + "name": "libtirpc-common", + "version": "1.3.2-2build1" + }, + { + "key": "libtirpc-dev_1.3.2-2build1_arm64", + "name": "libtirpc-dev", + "version": "1.3.2-2build1" + }, + { + "key": "libtirpc3_1.3.2-2build1_arm64", + "name": "libtirpc3", + "version": "1.3.2-2build1" + }, + { + "key": "libxml2_2.9.13-p-dfsg-1build1_arm64", + "name": "libxml2", + "version": "2.9.13+dfsg-1build1" + }, + { + "key": "libzstd1_1.4.8-p-dfsg-3build1_arm64", + "name": "libzstd1", + "version": "1.4.8+dfsg-3build1" + }, + { + "key": "linux-libc-dev_5.15.0-25.25_arm64", + "name": "linux-libc-dev", + "version": "5.15.0-25.25" + }, + { + "key": "perl-base_5.34.0-3ubuntu1_arm64", + "name": "perl-base", + "version": "5.34.0-3ubuntu1" + }, + { + "key": "rpcsvc-proto_1.4.2-0ubuntu6_arm64", + "name": "rpcsvc-proto", + "version": "1.4.2-0ubuntu6" + }, + { + "key": "tar_1.34-p-dfsg-1build3_arm64", + "name": "tar", + "version": "1.34+dfsg-1build3" + }, + { + "key": "zlib1g_1-1.2.11.dfsg-2ubuntu9_arm64", + "name": "zlib1g", + "version": "1:1.2.11.dfsg-2ubuntu9" + } + ], + "key": "libxml2-dev_2.9.13-p-dfsg-1build1_arm64", + "name": "libxml2-dev", + "sha256": "d53c78fb0617e75364a8c6647c80e24fcd793a05e273879a27d83a7dfed86b97", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libx/libxml2/libxml2-dev_2.9.13+dfsg-1build1_arm64.deb", + "version": "2.9.13+dfsg-1build1" + }, + { + "arch": "arm64", + "dependencies": [], + "key": "libxml2_2.9.13-p-dfsg-1build1_arm64", + "name": "libxml2", + "sha256": "85ec6ee7d1169c825beba2a30bbb3b37974b286d0284c69882de12b4eeb6c99b", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libx/libxml2/libxml2_2.9.13+dfsg-1build1_arm64.deb", + "version": "2.9.13+dfsg-1build1" + }, { "arch": "arm64", "dependencies": [], diff --git a/swift/internal/extensions/ubuntu22.04_sysroot.lock.json b/swift/internal/extensions/ubuntu22.04_sysroot.lock.json index d5c554473..b32127100 100644 --- a/swift/internal/extensions/ubuntu22.04_sysroot.lock.json +++ b/swift/internal/extensions/ubuntu22.04_sysroot.lock.json @@ -5,7 +5,9 @@ ], "packages": [ "libc6-dev", + "libcurl4-openssl-dev", "libstdc++-11-dev", + "libxml2-dev", "linux-libc-dev", "zlib1g-dev" ], @@ -61,6 +63,15 @@ "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/gcc-12-base_12-20220319-1ubuntu1_amd64.deb", "version": "12-20220319-1ubuntu1" }, + { + "arch": "amd64", + "dependencies": [], + "key": "icu-devtools_70.1-2_amd64", + "name": "icu-devtools", + "sha256": "a8e7cd16ec3c16f60e09da169b2d4d664e5ddda49021a95e6e7a39402b9724ff", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/i/icu/icu-devtools_70.1-2_amd64.deb", + "version": "70.1-2" + }, { "arch": "amd64", "dependencies": [], @@ -88,6 +99,15 @@ "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/libatomic1_12-20220319-1ubuntu1_amd64.deb", "version": "12-20220319-1ubuntu1" }, + { + "arch": "amd64", + "dependencies": [], + "key": "libbrotli1_1.0.9-2build6_amd64", + "name": "libbrotli1", + "sha256": "8e6aa2dfd44df287b9fb227862f3b6062ec074dd39a247874edfe12e1dcc3841", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/b/brotli/libbrotli1_1.0.9-2build6_amd64.deb", + "version": "1.0.9-2build6" + }, { "arch": "amd64", "dependencies": [], @@ -307,6 +327,248 @@ "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libx/libxcrypt/libcrypt1_4.4.27-1_amd64.deb", "version": "1:4.4.27-1" }, + { + "arch": "amd64", + "dependencies": [ + { + "key": "debconf_1.5.79ubuntu1_amd64", + "name": "debconf", + "version": "1.5.79ubuntu1" + }, + { + "key": "dpkg_1.21.1ubuntu2_amd64", + "name": "dpkg", + "version": "1.21.1ubuntu2" + }, + { + "key": "gcc-12-base_12-20220319-1ubuntu1_amd64", + "name": "gcc-12-base", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libacl1_2.3.1-1_amd64", + "name": "libacl1", + "version": "2.3.1-1" + }, + { + "key": "libbrotli1_1.0.9-2build6_amd64", + "name": "libbrotli1", + "version": "1.0.9-2build6" + }, + { + "key": "libbz2-1.0_1.0.8-5build1_amd64", + "name": "libbz2-1.0", + "version": "1.0.8-5build1" + }, + { + "key": "libc6_2.35-0ubuntu3_amd64", + "name": "libc6", + "version": "2.35-0ubuntu3" + }, + { + "key": "libcom-err2_1.46.5-2ubuntu1_amd64", + "name": "libcom-err2", + "version": "1.46.5-2ubuntu1" + }, + { + "key": "libcrypt1_1-4.4.27-1_amd64", + "name": "libcrypt1", + "version": "1:4.4.27-1" + }, + { + "key": "libcurl4_7.81.0-1_amd64", + "name": "libcurl4", + "version": "7.81.0-1" + }, + { + "key": "libdb5.3_5.3.28-p-dfsg1-0.8ubuntu3_amd64", + "name": "libdb5.3", + "version": "5.3.28+dfsg1-0.8ubuntu3" + }, + { + "key": "libffi8_3.4.2-4_amd64", + "name": "libffi8", + "version": "3.4.2-4" + }, + { + "key": "libgcc-s1_12-20220319-1ubuntu1_amd64", + "name": "libgcc-s1", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libgmp10_2-6.2.1-p-dfsg-3ubuntu1_amd64", + "name": "libgmp10", + "version": "2:6.2.1+dfsg-3ubuntu1" + }, + { + "key": "libgnutls30_3.7.3-4ubuntu1_amd64", + "name": "libgnutls30", + "version": "3.7.3-4ubuntu1" + }, + { + "key": "libgssapi-krb5-2_1.19.2-2_amd64", + "name": "libgssapi-krb5-2", + "version": "1.19.2-2" + }, + { + "key": "libhogweed6_3.7.3-1build2_amd64", + "name": "libhogweed6", + "version": "3.7.3-1build2" + }, + { + "key": "libidn2-0_2.3.2-2build1_amd64", + "name": "libidn2-0", + "version": "2.3.2-2build1" + }, + { + "key": "libk5crypto3_1.19.2-2_amd64", + "name": "libk5crypto3", + "version": "1.19.2-2" + }, + { + "key": "libkeyutils1_1.6.1-2ubuntu3_amd64", + "name": "libkeyutils1", + "version": "1.6.1-2ubuntu3" + }, + { + "key": "libkrb5-3_1.19.2-2_amd64", + "name": "libkrb5-3", + "version": "1.19.2-2" + }, + { + "key": "libkrb5support0_1.19.2-2_amd64", + "name": "libkrb5support0", + "version": "1.19.2-2" + }, + { + "key": "libldap-2.5-0_2.5.11-p-dfsg-1_exp1ubuntu3_amd64", + "name": "libldap-2.5-0", + "version": "2.5.11+dfsg-1~exp1ubuntu3" + }, + { + "key": "liblzma5_5.2.5-2ubuntu1_amd64", + "name": "liblzma5", + "version": "5.2.5-2ubuntu1" + }, + { + "key": "libnettle8_3.7.3-1build2_amd64", + "name": "libnettle8", + "version": "3.7.3-1build2" + }, + { + "key": "libnghttp2-14_1.43.0-1build3_amd64", + "name": "libnghttp2-14", + "version": "1.43.0-1build3" + }, + { + "key": "libp11-kit0_0.24.0-6build1_amd64", + "name": "libp11-kit0", + "version": "0.24.0-6build1" + }, + { + "key": "libpcre2-8-0_10.39-3build1_amd64", + "name": "libpcre2-8-0", + "version": "10.39-3build1" + }, + { + "key": "libpsl5_0.21.0-1.2build2_amd64", + "name": "libpsl5", + "version": "0.21.0-1.2build2" + }, + { + "key": "librtmp1_2.4-p-20151223.gitfa8646d.1-2build4_amd64", + "name": "librtmp1", + "version": "2.4+20151223.gitfa8646d.1-2build4" + }, + { + "key": "libsasl2-2_2.1.27-p-dfsg2-3ubuntu1_amd64", + "name": "libsasl2-2", + "version": "2.1.27+dfsg2-3ubuntu1" + }, + { + "key": "libsasl2-modules-db_2.1.27-p-dfsg2-3ubuntu1_amd64", + "name": "libsasl2-modules-db", + "version": "2.1.27+dfsg2-3ubuntu1" + }, + { + "key": "libselinux1_3.3-1build2_amd64", + "name": "libselinux1", + "version": "3.3-1build2" + }, + { + "key": "libssh-4_0.9.6-2build1_amd64", + "name": "libssh-4", + "version": "0.9.6-2build1" + }, + { + "key": "libssl3_3.0.2-0ubuntu1_amd64", + "name": "libssl3", + "version": "3.0.2-0ubuntu1" + }, + { + "key": "libtasn1-6_4.18.0-4build1_amd64", + "name": "libtasn1-6", + "version": "4.18.0-4build1" + }, + { + "key": "libunistring2_1.0-1_amd64", + "name": "libunistring2", + "version": "1.0-1" + }, + { + "key": "libzstd1_1.4.8-p-dfsg-3build1_amd64", + "name": "libzstd1", + "version": "1.4.8+dfsg-3build1" + }, + { + "key": "perl-base_5.34.0-3ubuntu1_amd64", + "name": "perl-base", + "version": "5.34.0-3ubuntu1" + }, + { + "key": "tar_1.34-p-dfsg-1build3_amd64", + "name": "tar", + "version": "1.34+dfsg-1build3" + }, + { + "key": "zlib1g_1-1.2.11.dfsg-2ubuntu9_amd64", + "name": "zlib1g", + "version": "1:1.2.11.dfsg-2ubuntu9" + } + ], + "key": "libcurl4-openssl-dev_7.81.0-1_amd64", + "name": "libcurl4-openssl-dev", + "sha256": "2693ec35c6164babe34cd1b80421a770d1808d35d17ce1da48c65a55e2bbaf08", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/c/curl/libcurl4-openssl-dev_7.81.0-1_amd64.deb", + "version": "7.81.0-1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libcurl4_7.81.0-1_amd64", + "name": "libcurl4", + "sha256": "4d533aaa16ea8c977f61f483ef0634f21dd38e954e39324a975c88e28969144d", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/c/curl/libcurl4_7.81.0-1_amd64.deb", + "version": "7.81.0-1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libdb5.3_5.3.28-p-dfsg1-0.8ubuntu3_amd64", + "name": "libdb5.3", + "sha256": "ce60e446c9cb0e94bb4b4d0fe4f969e772edec250deb186bacf955e4d196548b", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/d/db5.3/libdb5.3_5.3.28+dfsg1-0.8ubuntu3_amd64.deb", + "version": "5.3.28+dfsg1-0.8ubuntu3" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libffi8_3.4.2-4_amd64", + "name": "libffi8", + "sha256": "b4f88c91fa6f4c942097be6abfc365fb133c5e147640168cbb7704fd855eac10", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libf/libffi/libffi8_3.4.2-4_amd64.deb", + "version": "3.4.2-4" + }, { "arch": "amd64", "dependencies": [], @@ -325,6 +587,24 @@ "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/libgcc-s1_12-20220319-1ubuntu1_amd64.deb", "version": "12-20220319-1ubuntu1" }, + { + "arch": "amd64", + "dependencies": [], + "key": "libgmp10_2-6.2.1-p-dfsg-3ubuntu1_amd64", + "name": "libgmp10", + "sha256": "d199a77e11701d4d620dd4f62e05740e3072dce893856ea3bbaa6ae9fa19fef1", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gmp/libgmp10_6.2.1+dfsg-3ubuntu1_amd64.deb", + "version": "2:6.2.1+dfsg-3ubuntu1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libgnutls30_3.7.3-4ubuntu1_amd64", + "name": "libgnutls30", + "sha256": "8d79d5790deb88b0746d6ba59be782227c1250396879e0095e7bdbb269af7bbb", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gnutls28/libgnutls30_3.7.3-4ubuntu1_amd64.deb", + "version": "3.7.3-4ubuntu1" + }, { "arch": "amd64", "dependencies": [], @@ -343,6 +623,42 @@ "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/k/krb5/libgssapi-krb5-2_1.19.2-2_amd64.deb", "version": "1.19.2-2" }, + { + "arch": "amd64", + "dependencies": [], + "key": "libhogweed6_3.7.3-1build2_amd64", + "name": "libhogweed6", + "sha256": "2402ac51ebc760799b01f3fd4933126c5eb446e5b043832601fb589f5e50c363", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/n/nettle/libhogweed6_3.7.3-1build2_amd64.deb", + "version": "3.7.3-1build2" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libicu-dev_70.1-2_amd64", + "name": "libicu-dev", + "sha256": "1923e57f02a96595e2111c203dbb660f4c5abae46d7bee83a0ccb8b002eb6fc3", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/i/icu/libicu-dev_70.1-2_amd64.deb", + "version": "70.1-2" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libicu70_70.1-2_amd64", + "name": "libicu70", + "sha256": "58a154f6307289813da2276f900498ef536ae7c0522d2cf31a3c3c5cf62dfd9a", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/i/icu/libicu70_70.1-2_amd64.deb", + "version": "70.1-2" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libidn2-0_2.3.2-2build1_amd64", + "name": "libidn2-0", + "sha256": "bc935e1871aa4a75d3f4ff549af32b7316aecfbea2200d85055878767b8398c8", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libi/libidn2/libidn2-0_2.3.2-2build1_amd64.deb", + "version": "2.3.2-2build1" + }, { "arch": "amd64", "dependencies": [], @@ -388,6 +704,15 @@ "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/k/krb5/libkrb5support0_1.19.2-2_amd64.deb", "version": "1.19.2-2" }, + { + "arch": "amd64", + "dependencies": [], + "key": "libldap-2.5-0_2.5.11-p-dfsg-1_exp1ubuntu3_amd64", + "name": "libldap-2.5-0", + "sha256": "f28638149498d6fbac35ee3f9f11ad399953b2a9ba1a47ca457dce39f091ba0b", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/o/openldap/libldap-2.5-0_2.5.11+dfsg-1~exp1ubuntu3_amd64.deb", + "version": "2.5.11+dfsg-1~exp1ubuntu3" + }, { "arch": "amd64", "dependencies": [], @@ -406,6 +731,24 @@ "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/x/xz-utils/liblzma5_5.2.5-2ubuntu1_amd64.deb", "version": "5.2.5-2ubuntu1" }, + { + "arch": "amd64", + "dependencies": [], + "key": "libnettle8_3.7.3-1build2_amd64", + "name": "libnettle8", + "sha256": "6da09e685e5587f8873f662b007de45f75424fb33d2c4a51837380e683d33c7e", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/n/nettle/libnettle8_3.7.3-1build2_amd64.deb", + "version": "3.7.3-1build2" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libnghttp2-14_1.43.0-1build3_amd64", + "name": "libnghttp2-14", + "sha256": "9c5bf39da4ab9981eb280405ad28bd6d4afbb2f5128a08f9de3915b4502739f1", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/n/nghttp2/libnghttp2-14_1.43.0-1build3_amd64.deb", + "version": "1.43.0-1build3" + }, { "arch": "amd64", "dependencies": [], @@ -424,6 +767,15 @@ "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libn/libnsl/libnsl2_1.3.0-2build2_amd64.deb", "version": "1.3.0-2build2" }, + { + "arch": "amd64", + "dependencies": [], + "key": "libp11-kit0_0.24.0-6build1_amd64", + "name": "libp11-kit0", + "sha256": "70d9009af3c5cbf70c374b493f3a51f4d722757a8efe0d89af9796da78a51262", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/p/p11-kit/libp11-kit0_0.24.0-6build1_amd64.deb", + "version": "0.24.0-6build1" + }, { "arch": "amd64", "dependencies": [], @@ -433,6 +785,15 @@ "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/p/pcre2/libpcre2-8-0_10.39-3build1_amd64.deb", "version": "10.39-3build1" }, + { + "arch": "amd64", + "dependencies": [], + "key": "libpsl5_0.21.0-1.2build2_amd64", + "name": "libpsl5", + "sha256": "cd29dee0eac2bdf3f944f47b3926993827dc6b3710251df76006fab2fd09f7e1", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libp/libpsl/libpsl5_0.21.0-1.2build2_amd64.deb", + "version": "0.21.0-1.2build2" + }, { "arch": "amd64", "dependencies": [], @@ -442,6 +803,33 @@ "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/libquadmath0_12-20220319-1ubuntu1_amd64.deb", "version": "12-20220319-1ubuntu1" }, + { + "arch": "amd64", + "dependencies": [], + "key": "librtmp1_2.4-p-20151223.gitfa8646d.1-2build4_amd64", + "name": "librtmp1", + "sha256": "c8bdaa1e777d08888914e922f8f76441c26ee36438d3aa59161ecccc2421f77e", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/r/rtmpdump/librtmp1_2.4+20151223.gitfa8646d.1-2build4_amd64.deb", + "version": "2.4+20151223.gitfa8646d.1-2build4" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libsasl2-2_2.1.27-p-dfsg2-3ubuntu1_amd64", + "name": "libsasl2-2", + "sha256": "e68ac6059677e0356e492e0e6a6c31344a4815f03e7cf367fe35fe1e7ebc128c", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/c/cyrus-sasl2/libsasl2-2_2.1.27+dfsg2-3ubuntu1_amd64.deb", + "version": "2.1.27+dfsg2-3ubuntu1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libsasl2-modules-db_2.1.27-p-dfsg2-3ubuntu1_amd64", + "name": "libsasl2-modules-db", + "sha256": "f6fbbba615f27b10bb12e65188e5b5160e03893ef580366e53a53dbdeedf4d17", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/c/cyrus-sasl2/libsasl2-modules-db_2.1.27+dfsg2-3ubuntu1_amd64.deb", + "version": "2.1.27+dfsg2-3ubuntu1" + }, { "arch": "amd64", "dependencies": [], @@ -451,6 +839,15 @@ "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libs/libselinux/libselinux1_3.3-1build2_amd64.deb", "version": "3.3-1build2" }, + { + "arch": "amd64", + "dependencies": [], + "key": "libssh-4_0.9.6-2build1_amd64", + "name": "libssh-4", + "sha256": "785f29b91cf96a66cd85bdd657ddeb028290eb5df0a340f907b42618eefb3493", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libs/libssh/libssh-4_0.9.6-2build1_amd64.deb", + "version": "0.9.6-2build1" + }, { "arch": "amd64", "dependencies": [], @@ -694,6 +1091,15 @@ "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/libstdc++6_12-20220319-1ubuntu1_amd64.deb", "version": "12-20220319-1ubuntu1" }, + { + "arch": "amd64", + "dependencies": [], + "key": "libtasn1-6_4.18.0-4build1_amd64", + "name": "libtasn1-6", + "sha256": "c4258c87f569f6070312ad4b64a35cb00a9fffca07982b4aac5a3f340ab3e2cd", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libt/libtasn1-6/libtasn1-6_4.18.0-4build1_amd64.deb", + "version": "4.18.0-4build1" + }, { "arch": "amd64", "dependencies": [], @@ -739,6 +1145,219 @@ "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/g/gcc-12/libubsan1_12-20220319-1ubuntu1_amd64.deb", "version": "12-20220319-1ubuntu1" }, + { + "arch": "amd64", + "dependencies": [], + "key": "libunistring2_1.0-1_amd64", + "name": "libunistring2", + "sha256": "988fb59de6a0a313844277e8a6e45d3dc16f5ea75a603a46b16b936426f0ac65", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libu/libunistring/libunistring2_1.0-1_amd64.deb", + "version": "1.0-1" + }, + { + "arch": "amd64", + "dependencies": [ + { + "key": "debconf_1.5.79ubuntu1_amd64", + "name": "debconf", + "version": "1.5.79ubuntu1" + }, + { + "key": "dpkg_1.21.1ubuntu2_amd64", + "name": "dpkg", + "version": "1.21.1ubuntu2" + }, + { + "key": "gcc-12-base_12-20220319-1ubuntu1_amd64", + "name": "gcc-12-base", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "icu-devtools_70.1-2_amd64", + "name": "icu-devtools", + "version": "70.1-2" + }, + { + "key": "libacl1_2.3.1-1_amd64", + "name": "libacl1", + "version": "2.3.1-1" + }, + { + "key": "libbz2-1.0_1.0.8-5build1_amd64", + "name": "libbz2-1.0", + "version": "1.0.8-5build1" + }, + { + "key": "libc-dev-bin_2.35-0ubuntu3_amd64", + "name": "libc-dev-bin", + "version": "2.35-0ubuntu3" + }, + { + "key": "libc6-dev_2.35-0ubuntu3_amd64", + "name": "libc6-dev", + "version": "2.35-0ubuntu3" + }, + { + "key": "libc6_2.35-0ubuntu3_amd64", + "name": "libc6", + "version": "2.35-0ubuntu3" + }, + { + "key": "libcom-err2_1.46.5-2ubuntu1_amd64", + "name": "libcom-err2", + "version": "1.46.5-2ubuntu1" + }, + { + "key": "libcrypt-dev_1-4.4.27-1_amd64", + "name": "libcrypt-dev", + "version": "1:4.4.27-1" + }, + { + "key": "libcrypt1_1-4.4.27-1_amd64", + "name": "libcrypt1", + "version": "1:4.4.27-1" + }, + { + "key": "libgcc-s1_12-20220319-1ubuntu1_amd64", + "name": "libgcc-s1", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libgssapi-krb5-2_1.19.2-2_amd64", + "name": "libgssapi-krb5-2", + "version": "1.19.2-2" + }, + { + "key": "libicu-dev_70.1-2_amd64", + "name": "libicu-dev", + "version": "70.1-2" + }, + { + "key": "libicu70_70.1-2_amd64", + "name": "libicu70", + "version": "70.1-2" + }, + { + "key": "libk5crypto3_1.19.2-2_amd64", + "name": "libk5crypto3", + "version": "1.19.2-2" + }, + { + "key": "libkeyutils1_1.6.1-2ubuntu3_amd64", + "name": "libkeyutils1", + "version": "1.6.1-2ubuntu3" + }, + { + "key": "libkrb5-3_1.19.2-2_amd64", + "name": "libkrb5-3", + "version": "1.19.2-2" + }, + { + "key": "libkrb5support0_1.19.2-2_amd64", + "name": "libkrb5support0", + "version": "1.19.2-2" + }, + { + "key": "liblzma5_5.2.5-2ubuntu1_amd64", + "name": "liblzma5", + "version": "5.2.5-2ubuntu1" + }, + { + "key": "libnsl-dev_1.3.0-2build2_amd64", + "name": "libnsl-dev", + "version": "1.3.0-2build2" + }, + { + "key": "libnsl2_1.3.0-2build2_amd64", + "name": "libnsl2", + "version": "1.3.0-2build2" + }, + { + "key": "libpcre2-8-0_10.39-3build1_amd64", + "name": "libpcre2-8-0", + "version": "10.39-3build1" + }, + { + "key": "libselinux1_3.3-1build2_amd64", + "name": "libselinux1", + "version": "3.3-1build2" + }, + { + "key": "libssl3_3.0.2-0ubuntu1_amd64", + "name": "libssl3", + "version": "3.0.2-0ubuntu1" + }, + { + "key": "libstdc-p--p-6_12-20220319-1ubuntu1_amd64", + "name": "libstdc++6", + "version": "12-20220319-1ubuntu1" + }, + { + "key": "libtirpc-common_1.3.2-2build1_amd64", + "name": "libtirpc-common", + "version": "1.3.2-2build1" + }, + { + "key": "libtirpc-dev_1.3.2-2build1_amd64", + "name": "libtirpc-dev", + "version": "1.3.2-2build1" + }, + { + "key": "libtirpc3_1.3.2-2build1_amd64", + "name": "libtirpc3", + "version": "1.3.2-2build1" + }, + { + "key": "libxml2_2.9.13-p-dfsg-1build1_amd64", + "name": "libxml2", + "version": "2.9.13+dfsg-1build1" + }, + { + "key": "libzstd1_1.4.8-p-dfsg-3build1_amd64", + "name": "libzstd1", + "version": "1.4.8+dfsg-3build1" + }, + { + "key": "linux-libc-dev_5.15.0-25.25_amd64", + "name": "linux-libc-dev", + "version": "5.15.0-25.25" + }, + { + "key": "perl-base_5.34.0-3ubuntu1_amd64", + "name": "perl-base", + "version": "5.34.0-3ubuntu1" + }, + { + "key": "rpcsvc-proto_1.4.2-0ubuntu6_amd64", + "name": "rpcsvc-proto", + "version": "1.4.2-0ubuntu6" + }, + { + "key": "tar_1.34-p-dfsg-1build3_amd64", + "name": "tar", + "version": "1.34+dfsg-1build3" + }, + { + "key": "zlib1g_1-1.2.11.dfsg-2ubuntu9_amd64", + "name": "zlib1g", + "version": "1:1.2.11.dfsg-2ubuntu9" + } + ], + "key": "libxml2-dev_2.9.13-p-dfsg-1build1_amd64", + "name": "libxml2-dev", + "sha256": "6ec428fb7ec9288c2ea6340302a8c54f4dde52e90963d2fdeacb2c7557de86b3", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libx/libxml2/libxml2-dev_2.9.13+dfsg-1build1_amd64.deb", + "version": "2.9.13+dfsg-1build1" + }, + { + "arch": "amd64", + "dependencies": [], + "key": "libxml2_2.9.13-p-dfsg-1build1_amd64", + "name": "libxml2", + "sha256": "4831826d0e320f6715722716d9737c7e57a052d20e55dd03ff7444c6e502a3ff", + "url": "https://snapshot.ubuntu.com/ubuntu/20250219T154000Z/pool/main/libx/libxml2/libxml2_2.9.13+dfsg-1build1_amd64.deb", + "version": "2.9.13+dfsg-1build1" + }, { "arch": "amd64", "dependencies": [], diff --git a/swift/internal/feature_names.bzl b/swift/internal/feature_names.bzl index c5b8928ae..85936c5a0 100644 --- a/swift/internal/feature_names.bzl +++ b/swift/internal/feature_names.bzl @@ -379,6 +379,10 @@ SWIFT_FEATURE_USE_PCH_OUTPUT_DIR = "swift.use_pch_output_dir" # minor binary size improvements SWIFT_FEATURE_LLD_GC_WORKAROUND = "swift.lld_gc_workaround" +# If enabled, use the static Swift runtime archives instead of dynamically +# linking the Swift runtime libraries. +SWIFT_FEATURE_STATIC_STDLIB = "swift.static_stdlib" + # Enable the default -ObjC link flags that otherwise wouldn't be passed to # non-Apple binary top level targets. Disable this to avoid over-linking # objects if you know that isn't required. diff --git a/swift/internal/features.bzl b/swift/internal/features.bzl index cd1045432..669b7f9c5 100644 --- a/swift/internal/features.bzl +++ b/swift/internal/features.bzl @@ -33,6 +33,7 @@ load( "SWIFT_FEATURE_OBJC_LINK_FLAGS", "SWIFT_FEATURE_OPT_USES_WMO", "SWIFT_FEATURE_REMAP_XCODE_PATH", + "SWIFT_FEATURE_STATIC_STDLIB", "SWIFT_FEATURE_USE_GLOBAL_MODULE_CACHE", ) load(":package_specs.bzl", "label_matches_package_specs") @@ -326,6 +327,7 @@ def default_features_for_toolchain(target_triple): if target_triples.unversioned_os(target_triple) == "linux": features.extend([ SWIFT_FEATURE_NO_GENERATED_MODULE_MAP, + SWIFT_FEATURE_STATIC_STDLIB, ]) return features diff --git a/swift/internal/linking.bzl b/swift/internal/linking.bzl index 519ad7992..ac237d883 100644 --- a/swift/internal/linking.bzl +++ b/swift/internal/linking.bzl @@ -271,6 +271,7 @@ def create_linking_context_from_compilation_outputs( _, implicit_cc_infos = get_swift_implicit_deps( feature_configuration = feature_configuration, + include_runtime = False, # NOTE: Called from swift_library, which should be independent of the final runtime swift_toolchain = toolchains.swift, ) extra_linking_contexts = [ diff --git a/swift/internal/utils.bzl b/swift/internal/utils.bzl index 6054329b6..e2f3cfce4 100644 --- a/swift/internal/utils.bzl +++ b/swift/internal/utils.bzl @@ -24,6 +24,7 @@ load( "SWIFT_FEATURE_ADD_DEFAULT_PRECOMPILED_MODULES", "SWIFT_FEATURE_EMIT_C_MODULE", "SWIFT_FEATURE_NO_IMPLICIT_DEPS", + "SWIFT_FEATURE_STATIC_STDLIB", "SWIFT_FEATURE_USE_C_MODULES", ) load(":features.bzl", "is_feature_enabled") @@ -452,7 +453,11 @@ def include_developer_search_paths(attr): False, ) -def get_swift_implicit_deps(*, feature_configuration, swift_toolchain): +def get_swift_implicit_deps( + *, + feature_configuration, + include_runtime = True, + swift_toolchain): """Returns the Swift and C++ providers for implicit Swift dependencies. Args: @@ -460,6 +465,8 @@ def get_swift_implicit_deps(*, feature_configuration, swift_toolchain): `swift_common.configure_features`. If this feature configuration is such that implicit dependencies should be ignored, this function returns an empty list for both providers. + include_runtime: Whether to include the runtime selected by the feature + configuration in the returned C++ providers. swift_toolchain: The `SwiftToolchainInfo` provider of the toolchain. Returns: @@ -475,11 +482,34 @@ def get_swift_implicit_deps(*, feature_configuration, swift_toolchain): feature_configuration = feature_configuration, swift_toolchain = swift_toolchain, ) + cc_infos = ( + swift_toolchain.implicit_deps_providers.cc_infos + + system_modules.cc_infos + ) + if include_runtime: + if is_feature_enabled( + feature_configuration = feature_configuration, + feature_name = SWIFT_FEATURE_STATIC_STDLIB, + ): + runtime_cc_info = swift_toolchain.static_runtime_cc_info + if not runtime_cc_info: + fail( + "The toolchain does not provide a static runtime linking " + + "provider, but the 'swift.static_stdlib' feature is enabled.", + ) + else: + runtime_cc_info = getattr( + swift_toolchain, + "dynamic_runtime_cc_info", + None, + ) + if runtime_cc_info: + cc_infos = cc_infos + [runtime_cc_info] + return ( swift_toolchain.implicit_deps_providers.swift_infos + system_modules.swift_infos, - swift_toolchain.implicit_deps_providers.cc_infos + - system_modules.cc_infos, + cc_infos, ) def get_clang_implicit_deps(*, feature_configuration, swift_toolchain): diff --git a/swift/providers.bzl b/swift/providers.bzl index f9f1f5db5..786ec51dc 100644 --- a/swift/providers.bzl +++ b/swift/providers.bzl @@ -437,9 +437,20 @@ their negation in the `features` attribute of a target/package or in the 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). +""", + "dynamic_runtime_cc_info": """\ +The `CcInfo` that selects the toolchain's ordinary dynamic Swift runtime, or +`None` if the toolchain supplies its runtime through implicit dependencies. +Final links select this provider unless `swift.static_stdlib` is enabled; it is +not propagated by libraries. """, "root_dir": """\ `String`. The workspace-relative root directory of the toolchain. +""", + "static_runtime_cc_info": """\ +A `CcInfo` that selects the static Swift runtime, or `None` if the toolchain +does not support static Swift runtime linking. Final links select this provider +when `swift.static_stdlib` is enabled; it is not propagated by libraries. """, "swift_worker": """\ `File`. The executable representing the worker executable used to invoke the diff --git a/swift/swift_test.bzl b/swift/swift_test.bzl index 214175292..5ac1c4c3d 100644 --- a/swift/swift_test.bzl +++ b/swift/swift_test.bzl @@ -24,6 +24,7 @@ load("//swift/internal:env_expansion.bzl", "expanded_env") load( "//swift/internal:feature_names.bzl", "SWIFT_FEATURE_ADD_TARGET_NAME_TO_OUTPUT", + "SWIFT_FEATURE_STATIC_STDLIB", ) load("//swift/internal:features.bzl", "is_feature_enabled") load( @@ -285,7 +286,10 @@ def _swift_test_impl(ctx): ctx = ctx, requested_features = ctx.features, toolchains = toolchains, - unsupported_features = ctx.disabled_features, + # XCTest and Swift Testing are shared libraries whose dependencies use + # the dynamic Swift runtime, so a test executable cannot safely link a + # separate static copy of that runtime. + unsupported_features = ctx.disabled_features + [SWIFT_FEATURE_STATIC_STDLIB], ) discover_tests = ctx.attr.discover_tests diff --git a/swift/toolchains/swift_toolchain.bzl b/swift/toolchains/swift_toolchain.bzl index efa2fc2cf..912d5822b 100644 --- a/swift/toolchains/swift_toolchain.bzl +++ b/swift/toolchains/swift_toolchain.bzl @@ -50,6 +50,7 @@ load("//swift/internal:autolinking.bzl", "autolink_extract_action_configs") load( "//swift/internal:feature_names.bzl", "SWIFT_FEATURE_MODULE_MAP_HOME_IS_CWD", + "SWIFT_FEATURE_STATIC_STDLIB", "SWIFT_FEATURE_USE_AUTOLINK_EXTRACT", "SWIFT_FEATURE_USE_GLOBAL_INDEX_STORE", "SWIFT_FEATURE_USE_MODULE_WRAP", @@ -386,67 +387,168 @@ def _swift_windows_linkopts_cc_info( ) def _swift_unix_linkopts_cc_info( + ctx, + cc_toolchain, cpu, os, toolchain_label, toolchain_root, - additional_inputs): - """Returns a `CcInfo` containing flags that should be passed to the linker. + swift_tool_inputs, + dynamic_runtime_files, + static_runtime_files): + """Returns the ordinary, dynamic, and static Unix runtime `CcInfo`s. - The provider returned by this function will be used as an implicit - dependency of the toolchain to ensure that any binary containing Swift code - will link to the standard libraries correctly. + The ordinary provider contains the flags needed by any binary containing + Swift code. When shared runtime libraries are available, those libraries + and the ordinary provider are combined into the selectable dynamic runtime + provider. The static provider contains the complete replacement metadata + for static Swift standard library links. Args: + ctx: The rule context. + cc_toolchain: The C++ toolchain used to construct library metadata. cpu: The CPU architecture, which is used as part of the library path. os: The operating system name, which is used as part of the library path. toolchain_label: The label of the Swift toolchain that will act as the owner of the linker input propagating the flags. toolchain_root: The toolchain's root directory. - additional_inputs: depset of File objects to add to link actions. + swift_tool_inputs: Swift toolchain files to add to ordinary link + actions. + dynamic_runtime_files: Shared Swift runtime libraries. + static_runtime_files: Static Swift runtime archives and linker files. + Returns: - A `CcInfo` provider that will provide linker flags to binaries that - depend on Swift targets. + A tuple containing the ordinary Swift link options `CcInfo`, the + selectable dynamic runtime `CcInfo` or `None`, and the selectable + static runtime `CcInfo` or `None`. """ - # TODO(#8): Support statically linking the Swift runtime. - platform_lib_dir = "{toolchain_root}/lib/swift/{os}".format( - os = os, - toolchain_root = toolchain_root, - ) - - runtime_object_path = "{platform_lib_dir}/{cpu}/swiftrt.o".format( - cpu = cpu, - platform_lib_dir = platform_lib_dir, - ) - - linkopts = [ + universal_linkopts = [ "-pie", "-lm", "-lstdc++", "-lrt", "-ldl", - runtime_object_path, "-static-libgcc", ] + dynamic_platform_lib_dir = "{toolchain_root}/lib/swift/{os}".format( + os = os, + toolchain_root = toolchain_root, + ) + dynamic_runtime_object_path = "{platform_lib_dir}/{cpu}/swiftrt.o".format( + cpu = cpu, + platform_lib_dir = dynamic_platform_lib_dir, + ) + dynamic_linkopts = universal_linkopts + [ + dynamic_runtime_object_path, + "-L{}".format(dynamic_platform_lib_dir), + ] + + # Relative toolchain roots are handled by importing the shared libraries + # through CcInfo, which lets Bazel compute the correct rpaths so we only + # need this for system installs. if paths.is_absolute(toolchain_root): - linkopts.extend([ - "-L{}".format(platform_lib_dir), - "-Wl,-rpath,{}".format(platform_lib_dir), - ]) + dynamic_linkopts.append("-Wl,-rpath,{}".format(dynamic_platform_lib_dir)) - return CcInfo( - linking_context = cc_common.create_linking_context( - linker_inputs = depset([ - cc_common.create_linker_input( - owner = toolchain_label, - user_link_flags = linkopts, - additional_inputs = depset(additional_inputs), - ), - ]), - ), + static_platform_lib_dir = "{toolchain_root}/lib/swift_static/{os}".format( + os = os, + toolchain_root = toolchain_root, + ) + static_runtime_object_path = "{platform_lib_dir}/{cpu}/swiftrt.o".format( + cpu = cpu, + platform_lib_dir = static_platform_lib_dir, + ) + static_linkopts = universal_linkopts + [ + # C++ interoperability archives are shipped alongside the dynamic + # runtime rather than under swift_static. The static directory's -L + # must be before the dynamic one. + "-L{}".format(static_platform_lib_dir), + "-L{}".format(dynamic_platform_lib_dir), + "@{}/static-stdlib-args.lnk".format(static_platform_lib_dir), + static_runtime_object_path, + + # Swift objects are compiled against the ordinary resource directory so + # that the same object files can be linked into both dynamic and static + # binaries. Because of this we miss out on autolinking info that we + # would get if we passed -static-stdlib to compiles. The contents of + # these libraries are still lazily loaded so it doesn't affect app size + # if they are unused. + "-Wl,--push-state,--as-needed", + "-lswiftSynchronization", + "-l_FoundationICU", + "-lCoreFoundation", + "-l_CFURLSessionInterface", + "-l_CFXMLInterface", + "-l_FoundationCShims", + "-l_FoundationCollections", + "-lcurl", + "-lxml2", + "-Wl,--pop-state", + ] + + dynamic_runtime_cc_info = None + if dynamic_runtime_files: + feature_configuration = cc_common.configure_features( + ctx = ctx, + cc_toolchain = cc_toolchain, + ) + libraries = [ + cc_common.create_library_to_link( + actions = ctx.actions, + cc_toolchain = cc_toolchain, + dynamic_library = runtime, + feature_configuration = feature_configuration, + ) + for runtime in dynamic_runtime_files + ] + dynamic_runtime_cc_info = CcInfo( + linking_context = cc_common.create_linking_context( + linker_inputs = depset([ + cc_common.create_linker_input( + owner = toolchain_label, + user_link_flags = dynamic_linkopts, + libraries = depset(libraries), + additional_inputs = depset(swift_tool_inputs), + ), + ]), + ), + ) + + # If the toolchain provides dynamic runtime files we prefer + default_cc_info = None + if not dynamic_runtime_cc_info: + default_cc_info = CcInfo( + linking_context = cc_common.create_linking_context( + linker_inputs = depset([ + cc_common.create_linker_input( + owner = toolchain_label, + user_link_flags = dynamic_linkopts, + additional_inputs = depset(swift_tool_inputs), + ), + ]), + ), + ) + + static_runtime_cc_info = None + if static_runtime_files: + static_runtime_cc_info = CcInfo( + linking_context = cc_common.create_linking_context( + linker_inputs = depset([ + cc_common.create_linker_input( + owner = toolchain_label, + user_link_flags = static_linkopts, + additional_inputs = depset(static_runtime_files), + ), + ]), + ), + ) + + return ( + default_cc_info, + dynamic_runtime_cc_info, + static_runtime_cc_info, ) def _swift_sdk_linkopts_cc_info( @@ -480,32 +582,6 @@ def _swift_sdk_linkopts_cc_info( ), ) -def _runtime_cc_info(ctx, cc_toolchain): - """Returns linker metadata for shared libraries required at runtime.""" - feature_configuration = cc_common.configure_features( - ctx = ctx, - cc_toolchain = cc_toolchain, - ) - libraries = [ - cc_common.create_library_to_link( - actions = ctx.actions, - cc_toolchain = cc_toolchain, - dynamic_library = runtime, - feature_configuration = feature_configuration, - ) - for runtime in ctx.files.runtime - ] - return CcInfo( - linking_context = cc_common.create_linking_context( - linker_inputs = depset([ - cc_common.create_linker_input( - owner = ctx.label, - libraries = depset(libraries), - ), - ]), - ), - ) - def _entry_point_linkopts_provider(*, entry_point_name): """Returns linkopts to customize the entry point of a binary.""" return struct( @@ -587,6 +663,8 @@ def _swift_toolchain_impl(ctx): toolchain_root = paths.dirname(ctx.attr.swift_tools[SwiftToolsInfo].swift_driver.dirname) + dynamic_runtime_cc_info = None + static_runtime_cc_info = None if ctx.attr.os == "windows": swift_linkopts_cc_info = _swift_windows_linkopts_cc_info( ctx.attr.arch, @@ -619,12 +697,20 @@ def _swift_toolchain_impl(ctx): ctx.files.linker_inputs, ) else: - swift_linkopts_cc_info = _swift_unix_linkopts_cc_info( + ( + swift_linkopts_cc_info, + dynamic_runtime_cc_info, + static_runtime_cc_info, + ) = _swift_unix_linkopts_cc_info( + ctx, + cc_toolchain, ctx.attr.arch, ctx.attr.os, ctx.label, toolchain_root, ctx.attr.swift_tools[SwiftToolsInfo].additional_inputs if ctx.attr.swift_tools else [], + ctx.files.dynamic_runtime, + ctx.files.static_runtime, ) swiftcopts = [] @@ -695,6 +781,13 @@ def _swift_toolchain_impl(ctx): else: env = ctx.attr.env + unsupported_features = ctx.disabled_features + [ + SWIFT_FEATURE_MODULE_MAP_HOME_IS_CWD, + SWIFT_FEATURE_USE_GLOBAL_INDEX_STORE, + ] + if not static_runtime_cc_info: + unsupported_features.append(SWIFT_FEATURE_STATIC_STDLIB) + # TODO(allevato): Move some of the remaining hardcoded values, like object # format and Obj-C interop support, to attributes so that we can remove the # assumptions that are only valid on Linux. @@ -723,10 +816,7 @@ def _swift_toolchain_impl(ctx): ), implicit_deps_providers = collect_implicit_deps_providers( [], - additional_cc_infos = [ - swift_linkopts_cc_info, - _runtime_cc_info(ctx, cc_toolchain), - ], + additional_cc_infos = [swift_linkopts_cc_info] if swift_linkopts_cc_info else [], ), package_configurations = [ target[SwiftPackageConfigurationInfo] @@ -734,6 +824,8 @@ def _swift_toolchain_impl(ctx): ], requested_features = requested_features, root_dir = toolchain_root, + dynamic_runtime_cc_info = dynamic_runtime_cc_info, + static_runtime_cc_info = static_runtime_cc_info, system_modules = collect_implicit_deps_providers([]), implicit_system_modules = collect_implicit_deps_providers([]), swift_worker = ctx.attr._worker[DefaultInfo].files_to_run, @@ -746,10 +838,7 @@ def _swift_toolchain_impl(ctx): test_linking_contexts = [], ), tool_configs = all_tool_configs, - unsupported_features = ctx.disabled_features + [ - SWIFT_FEATURE_MODULE_MAP_HOME_IS_CWD, - SWIFT_FEATURE_USE_GLOBAL_INDEX_STORE, - ], + unsupported_features = unsupported_features, ) return [ @@ -812,9 +901,17 @@ configuration options that are applied to targets on a per-package basis. providers = [[SwiftPackageConfigurationInfo]], ), "root": attr.string(), - "runtime": attr.label_list( + "dynamic_runtime": attr.label_list( + doc = """\ +Shared Swift runtime libraries that are added to the dynamic runtime linking +context. +""", + allow_files = True, + ), + "static_runtime": attr.label_list( doc = """\ -Shared libraries that should be added to the linking context of Swift targets. +Static Swift runtime archives and supporting linker files that are passed to +static runtime link actions. """, allow_files = True, ), diff --git a/swift/toolchains/xcode_swift_toolchain.bzl b/swift/toolchains/xcode_swift_toolchain.bzl index de6c5ae61..464ff04ed 100644 --- a/swift/toolchains/xcode_swift_toolchain.bzl +++ b/swift/toolchains/xcode_swift_toolchain.bzl @@ -57,6 +57,7 @@ load( "SWIFT_FEATURE_MODULE_HOME_IS_CWD", "SWIFT_FEATURE_MODULE_MAP_HOME_IS_CWD", "SWIFT_FEATURE_REMAP_XCODE_PATH", + "SWIFT_FEATURE_STATIC_STDLIB", "SWIFT_FEATURE_USE_C_MODULES", "SWIFT_FEATURE__SUPPORTS_DEVELOPER_DIR", "SWIFT_FEATURE__SUPPORTS_HERMETIC_SWIFTMODULE", @@ -859,6 +860,7 @@ def _xcode_swift_toolchain_impl(ctx): requested_features.append(SWIFT_FEATURE_ADD_DEFAULT_PRECOMPILED_MODULES) unsupported_features = ctx.disabled_features + [ + SWIFT_FEATURE_STATIC_STDLIB, SWIFT_FEATURE_MODULE_MAP_HOME_IS_CWD, ] unsupported_features.extend(ctx.attr.default_unsupported_features) @@ -956,6 +958,8 @@ def _xcode_swift_toolchain_impl(ctx): for target in ctx.attr.package_configurations ], requested_features = requested_features, + dynamic_runtime_cc_info = None, + static_runtime_cc_info = None, system_modules = collect_implicit_deps_providers( [ctx.attr.system_modules] if ctx.attr.system_modules else [], ), diff --git a/test/linux_static_stdlib/BUILD b/test/linux_static_stdlib/BUILD new file mode 100644 index 000000000..82d728a6c --- /dev/null +++ b/test/linux_static_stdlib/BUILD @@ -0,0 +1,78 @@ +load("@rules_shell//shell:sh_test.bzl", "sh_test") +load("//swift:swift.bzl", "swift_binary") +load("//swift:swift_library.bzl", "swift_library") +load("//swift:swift_test.bzl", "swift_test") +load("//test/rules:provider_test.bzl", "provider_test") + +swift_library( + name = "foundation_library", + srcs = ["FoundationLibrary.swift"], + module_name = "FoundationLibrary", +) + +provider_test( + name = "foundation_library_does_not_propagate_runtime_test", + expected_files = [ + "-libFoundation.so", + "-libswiftCore.so", + "*", + ], + field = "linking_context.linker_inputs.libraries.dynamic_library!", + provider = "CcInfo", + target_under_test = ":foundation_library", +) + +swift_binary( + name = "uses_foundation", + srcs = ["main.swift"], + tags = ["manual"], + deps = [":foundation_library"], +) + +swift_binary( + name = "uses_dynamic_foundation", + srcs = ["main.swift"], + features = ["-swift.static_stdlib"], + tags = ["manual"], + deps = [":foundation_library"], +) + +swift_test( + name = "foundation_library_test", + srcs = ["FoundationLibraryTests.swift"], + deps = [":foundation_library"], +) + +sh_test( + name = "linux_dynamic_stdlib_test", + srcs = ["linux_dynamic_stdlib_test.sh"], + args = [ + "$(rootpath :uses_dynamic_foundation)", + "$(rootpath @swift_toolchain_ubuntu22.04//:usr/bin/llvm-objdump)", + ], + data = [ + ":uses_dynamic_foundation", + "@swift_toolchain_ubuntu22.04//:usr/bin/llvm-objdump", + ], + target_compatible_with = [ + "@platforms//cpu:x86_64", + "@platforms//os:linux", + ], +) + +sh_test( + name = "linux_static_stdlib_test", + srcs = ["linux_static_stdlib_test.sh"], + args = [ + "$(rootpath :uses_foundation)", + "$(rootpath @swift_toolchain_ubuntu22.04//:usr/bin/llvm-objdump)", + ], + data = [ + ":uses_foundation", + "@swift_toolchain_ubuntu22.04//:usr/bin/llvm-objdump", + ], + target_compatible_with = [ + "@platforms//cpu:x86_64", + "@platforms//os:linux", + ], +) diff --git a/test/linux_static_stdlib/FoundationLibrary.swift b/test/linux_static_stdlib/FoundationLibrary.swift new file mode 100644 index 000000000..b583014f8 --- /dev/null +++ b/test/linux_static_stdlib/FoundationLibrary.swift @@ -0,0 +1,5 @@ +import Foundation + +public func swiftOrgHost() -> String { + URL(string: "https://www.swift.org")!.host()! +} diff --git a/test/linux_static_stdlib/FoundationLibraryTests.swift b/test/linux_static_stdlib/FoundationLibraryTests.swift new file mode 100644 index 000000000..ce3a727a0 --- /dev/null +++ b/test/linux_static_stdlib/FoundationLibraryTests.swift @@ -0,0 +1,8 @@ +import FoundationLibrary +import XCTest + +final class FoundationLibraryTests: XCTestCase { + func testSwiftOrgHost() { + XCTAssertEqual(swiftOrgHost(), "www.swift.org") + } +} diff --git a/test/linux_static_stdlib/linux_dynamic_stdlib_test.sh b/test/linux_static_stdlib/linux_dynamic_stdlib_test.sh new file mode 100755 index 000000000..57ee69fcc --- /dev/null +++ b/test/linux_static_stdlib/linux_dynamic_stdlib_test.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +set -euo pipefail + +readonly binary="$1" +readonly objdump="$2" + +dynamic_section="$($objdump -p "$binary")" + +if ! grep -Eq '^[[:space:]]*NEEDED[[:space:]]+libswiftCore\.so$' <<<"$dynamic_section"; then + echo "error: '$binary' does not dynamically link libswiftCore.so" >&2 + exit 1 +fi + +runpath="$(sed -n 's/^[[:space:]]*\(RUNPATH\|RPATH\)[[:space:]]*//p' <<<"$dynamic_section")" +if [[ "$runpath" != *'$ORIGIN/../../_solib_'* ]] || + [[ "$runpath" != *'$ORIGIN/uses_dynamic_foundation.runfiles/_main/_solib_'* ]] || + [[ "$runpath" != *'swift_Utoolchain_Uubuntu22.04'* ]] || + [[ "$runpath" != *'usr_Slib_Sswift_Slinux'* ]]; then + echo "error: '$binary' does not have the expected Swift runtime search path:" >&2 + echo "$runpath" >&2 + exit 1 +fi + +"$binary" diff --git a/test/linux_static_stdlib/linux_static_stdlib_test.sh b/test/linux_static_stdlib/linux_static_stdlib_test.sh new file mode 100755 index 000000000..635ff773d --- /dev/null +++ b/test/linux_static_stdlib/linux_static_stdlib_test.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -euo pipefail + +readonly binary="$1" +readonly objdump="$2" + +needed_libraries="$($objdump -p "$binary" | sed -n 's/^[[:space:]]*NEEDED[[:space:]]*//p')" +unexpected_libraries="$(grep -E '^(libswift|libFoundation|libdispatch|libBlocksRuntime|libTesting|libXCTest|lib_|libcurl|libxml2)' <<<"$needed_libraries" || true)" + +if [[ -n "$unexpected_libraries" ]]; then + echo "error: '$binary' has unexpected dynamic runtime dependencies:" >&2 + echo "$unexpected_libraries" >&2 + exit 1 +fi + +"$binary" diff --git a/test/linux_static_stdlib/main.swift b/test/linux_static_stdlib/main.swift new file mode 100644 index 000000000..f9236f40d --- /dev/null +++ b/test/linux_static_stdlib/main.swift @@ -0,0 +1,3 @@ +import FoundationLibrary + +print(swiftOrgHost()) From 94828f5a0f8e5ddbf844ee5ede0334f977f2e070 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Thu, 23 Jul 2026 16:39:27 -0700 Subject: [PATCH 22/25] empty --- swift/internal/extensions/toolchain.BUILD | 2 ++ 1 file changed, 2 insertions(+) diff --git a/swift/internal/extensions/toolchain.BUILD b/swift/internal/extensions/toolchain.BUILD index bc2809266..618f4e203 100644 --- a/swift/internal/extensions/toolchain.BUILD +++ b/swift/internal/extensions/toolchain.BUILD @@ -354,6 +354,8 @@ swift_toolchain( "usr/lib/swift_static/linux/*.lnk", "usr/lib/swift_static/linux/*/*.o", ], + # NOTE: This shouldn't ever be empty but fails when this select() isn't even hit + allow_empty = True, ), "//conditions:default": [], }), From eabd62d382e9b08420a317850784fcad01ef8dfe Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Thu, 23 Jul 2026 17:00:40 -0700 Subject: [PATCH 23/25] fix for shared libs --- swift/swift_binary.bzl | 5 +++- test/linux_static_stdlib/BUILD | 25 +++++++++++++++++++ .../linux_linkshared_dynamic_stdlib_test.sh | 22 ++++++++++++++++ 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100755 test/linux_static_stdlib/linux_linkshared_dynamic_stdlib_test.sh diff --git a/swift/swift_binary.bzl b/swift/swift_binary.bzl index dfac5ec74..6421973f6 100644 --- a/swift/swift_binary.bzl +++ b/swift/swift_binary.bzl @@ -24,6 +24,7 @@ load( "//swift/internal:feature_names.bzl", "SWIFT_FEATURE_ADD_TARGET_NAME_TO_OUTPUT", "SWIFT_FEATURE_NO_ENTRY_POINT_RENAME", + "SWIFT_FEATURE_STATIC_STDLIB", ) load("//swift/internal:features.bzl", "is_feature_enabled") load( @@ -90,7 +91,9 @@ def _swift_binary_impl(ctx): ctx = ctx, requested_features = ctx.features, toolchains = toolchains, - unsupported_features = ctx.disabled_features, + unsupported_features = ctx.disabled_features + ( + [SWIFT_FEATURE_STATIC_STDLIB] if ctx.attr.linkshared else [] + ), ) is_wasm = _is_wasm(ctx) diff --git a/test/linux_static_stdlib/BUILD b/test/linux_static_stdlib/BUILD index 82d728a6c..64c6e1ed1 100644 --- a/test/linux_static_stdlib/BUILD +++ b/test/linux_static_stdlib/BUILD @@ -37,6 +37,14 @@ swift_binary( deps = [":foundation_library"], ) +swift_binary( + name = "uses_foundation_shared", + srcs = ["FoundationLibrary.swift"], + linkshared = True, + module_name = "FoundationSharedLibrary", + tags = ["manual"], +) + swift_test( name = "foundation_library_test", srcs = ["FoundationLibraryTests.swift"], @@ -60,6 +68,23 @@ sh_test( ], ) +sh_test( + name = "linux_linkshared_dynamic_stdlib_test", + srcs = ["linux_linkshared_dynamic_stdlib_test.sh"], + args = [ + "$(rootpath :uses_foundation_shared)", + "$(rootpath @swift_toolchain_ubuntu22.04//:usr/bin/llvm-objdump)", + ], + data = [ + ":uses_foundation_shared", + "@swift_toolchain_ubuntu22.04//:usr/bin/llvm-objdump", + ], + target_compatible_with = [ + "@platforms//cpu:x86_64", + "@platforms//os:linux", + ], +) + sh_test( name = "linux_static_stdlib_test", srcs = ["linux_static_stdlib_test.sh"], diff --git a/test/linux_static_stdlib/linux_linkshared_dynamic_stdlib_test.sh b/test/linux_static_stdlib/linux_linkshared_dynamic_stdlib_test.sh new file mode 100755 index 000000000..9cc57e475 --- /dev/null +++ b/test/linux_static_stdlib/linux_linkshared_dynamic_stdlib_test.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +set -euo pipefail + +readonly library="$1" +readonly objdump="$2" + +dynamic_section="$($objdump -p "$library")" + +if ! grep -Eq '^[[:space:]]*NEEDED[[:space:]]+libswiftCore\.so$' <<<"$dynamic_section"; then + echo "error: '$library' does not dynamically link libswiftCore.so" >&2 + exit 1 +fi + +runpath="$(sed -n 's/^[[:space:]]*\(RUNPATH\|RPATH\)[[:space:]]*//p' <<<"$dynamic_section")" +if [[ "$runpath" != *'$ORIGIN/../../_solib_'* ]] || + [[ "$runpath" != *'swift_Utoolchain_Uubuntu22.04'* ]] || + [[ "$runpath" != *'usr_Slib_Sswift_Slinux'* ]]; then + echo "error: '$library' does not have the expected Swift runtime search path:" >&2 + echo "$runpath" >&2 + exit 1 +fi From 44621e642d93407e675f7ae8a411d44988e00e2d Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Thu, 23 Jul 2026 17:11:26 -0700 Subject: [PATCH 24/25] add back non-hermetic ci job --- .bazelci/presubmit.yml | 20 ++++++++ test/linux_static_stdlib/BUILD | 51 +++++++++++++++++++ .../linux_non_hermetic_dynamic_stdlib_test.sh | 41 +++++++++++++++ test/transitions.bzl | 6 +++ 4 files changed, 118 insertions(+) create mode 100755 test/linux_static_stdlib/linux_non_hermetic_dynamic_stdlib_test.sh diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 75b1fdaca..25be04e3e 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -69,6 +69,26 @@ tasks: bazel: last_green <<: *linux_common + ubuntu2204_latest_non_hermetic: + name: "Current LTS non-hermetic toolchain" + bazel: latest + platform: ubuntu2204 + environment: + SWIFT_VERSION: "6.3.3" + SWIFT_HOME: "$HOME/swift-$SWIFT_VERSION" + PATH: "$SWIFT_HOME/usr/bin:$PATH" + shell_commands: + - "echo --- Downloading and extracting Swift $SWIFT_VERSION to $SWIFT_HOME" + - "mkdir $SWIFT_HOME" + - "curl https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2204/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04.tar.gz | tar xvz --strip-components=1 -C $SWIFT_HOME" + build_targets: + - "//examples/xplatform/hello_world" + - "//examples/xplatform/shared_library" + test_targets: + - "//examples/xplatform/xctest:xctest" + - "//test/linux_static_stdlib:linux_non_hermetic_dynamic_stdlib_test" + - "//test/linux_static_stdlib:linux_non_hermetic_linkshared_dynamic_stdlib_test" + windows: name: "Current LTS" bazel: latest diff --git a/test/linux_static_stdlib/BUILD b/test/linux_static_stdlib/BUILD index 64c6e1ed1..964e93ec3 100644 --- a/test/linux_static_stdlib/BUILD +++ b/test/linux_static_stdlib/BUILD @@ -2,6 +2,7 @@ load("@rules_shell//shell:sh_test.bzl", "sh_test") load("//swift:swift.bzl", "swift_binary") load("//swift:swift_library.bzl", "swift_library") load("//swift:swift_test.bzl", "swift_test") +load("//test:transitions.bzl", "transition_test") load("//test/rules:provider_test.bzl", "provider_test") swift_library( @@ -85,6 +86,56 @@ sh_test( ], ) +sh_test( + name = "_linux_non_hermetic_dynamic_stdlib_test", + srcs = ["linux_non_hermetic_dynamic_stdlib_test.sh"], + args = [ + "$(rootpath :uses_dynamic_foundation)", + "--execute", + ], + data = [":uses_dynamic_foundation"], + tags = ["manual"], + target_compatible_with = ["@platforms//os:linux"], +) + +sh_test( + name = "_linux_non_hermetic_linkshared_dynamic_stdlib_test", + srcs = ["linux_non_hermetic_dynamic_stdlib_test.sh"], + args = ["$(rootpath :uses_foundation_shared)"], + data = [":uses_foundation_shared"], + tags = ["manual"], + target_compatible_with = ["@platforms//os:linux"], +) + +# These wrappers select the host Swift toolchains automatically. Keep them +# manual so hermetic //... builds do not select a host toolchain. +transition_test( + name = "linux_non_hermetic_dynamic_stdlib_test", + args = [ + "test/linux_static_stdlib/uses_dynamic_foundation", + "--execute", + ], + extra_toolchains = [ + "//swift/toolchains:linux-swift-toolchain_aarch64", + "//swift/toolchains:linux-swift-toolchain_x86_64", + ], + tags = ["manual"], + target = ":_linux_non_hermetic_dynamic_stdlib_test", + target_compatible_with = ["@platforms//os:linux"], +) + +transition_test( + name = "linux_non_hermetic_linkshared_dynamic_stdlib_test", + args = ["test/linux_static_stdlib/libuses_foundation_shared.so"], + extra_toolchains = [ + "//swift/toolchains:linux-swift-toolchain_aarch64", + "//swift/toolchains:linux-swift-toolchain_x86_64", + ], + tags = ["manual"], + target = ":_linux_non_hermetic_linkshared_dynamic_stdlib_test", + target_compatible_with = ["@platforms//os:linux"], +) + sh_test( name = "linux_static_stdlib_test", srcs = ["linux_static_stdlib_test.sh"], diff --git a/test/linux_static_stdlib/linux_non_hermetic_dynamic_stdlib_test.sh b/test/linux_static_stdlib/linux_non_hermetic_dynamic_stdlib_test.sh new file mode 100755 index 000000000..623567707 --- /dev/null +++ b/test/linux_static_stdlib/linux_non_hermetic_dynamic_stdlib_test.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +set -euo pipefail + +readonly artifact="$1" + +dynamic_section="$(readelf -d "$artifact")" +needed_libraries="$( + sed -n 's/^.*(NEEDED).*Shared library: \[\(.*\)\]$/\1/p' <<<"$dynamic_section" +)" + +for library in libswiftCore.so libFoundation.so; do + if ! grep -Fxq "$library" <<<"$needed_libraries"; then + echo "error: '$artifact' does not dynamically link $library" >&2 + exit 1 + fi +done + +runpath="$( + sed -n 's/^.*(\(RUNPATH\|RPATH\)).*\[\(.*\)\]$/\2/p' <<<"$dynamic_section" +)" +runtime_dir="" +IFS=: read -ra runpath_entries <<<"$runpath" +for entry in "${runpath_entries[@]}"; do + if [[ "$entry" = /* ]] && + [[ -f "$entry/libswiftCore.so" ]] && + [[ -f "$entry/libFoundation.so" ]]; then + runtime_dir="$entry" + break + fi +done + +if [[ -z "$runtime_dir" ]]; then + echo "error: '$artifact' does not have an absolute Swift runtime search path:" >&2 + echo "$runpath" >&2 + exit 1 +fi + +if [[ "${2:-}" == "--execute" ]]; then + "$artifact" +fi diff --git a/test/transitions.bzl b/test/transitions.bzl index 5d4356622..50baa8312 100644 --- a/test/transitions.bzl +++ b/test/transitions.bzl @@ -5,6 +5,7 @@ load("@rules_cc//cc/common:objc_info.bzl", "ObjcInfo") load("//swift:providers.bzl", "SwiftInfo") _COMPILATION_MODE = "//command_line_option:compilation_mode" +_EXTRA_TOOLCHAINS = "//command_line_option:extra_toolchains" _FEATURES = "//command_line_option:features" _HOST_FEATURES = "//command_line_option:host_features" _IOS_MINIMUM_OS = "//command_line_option:ios_minimum_os" @@ -14,6 +15,7 @@ _TVOS_MINIMUM_OS = "//command_line_option:tvos_minimum_os" _TRANSITION_OPTIONS = [ _COMPILATION_MODE, + _EXTRA_TOOLCHAINS, _FEATURES, _HOST_FEATURES, _IOS_MINIMUM_OS, @@ -25,6 +27,7 @@ _TRANSITION_OPTIONS = [ def _transition_impl(settings, attr): return { _COMPILATION_MODE: attr.compilation_mode or settings[_COMPILATION_MODE], + _EXTRA_TOOLCHAINS: settings[_EXTRA_TOOLCHAINS] + attr.extra_toolchains, _FEATURES: settings[_FEATURES] + attr.transitive_features, _HOST_FEATURES: settings[_HOST_FEATURES] + attr.transitive_features, _IOS_MINIMUM_OS: attr.ios_minimum_os or settings[_IOS_MINIMUM_OS], @@ -48,6 +51,9 @@ _TRANSITION_ATTRS = { ), values = ["", "dbg", "fastbuild", "opt"], ), + "extra_toolchains": attr.string_list( + doc = "Toolchains appended to --extra_toolchains for the transitioned target.", + ), "minimum_os": attr.string( doc = "Optional value to set `--macos_minimum_os` to.", ), From 83e05b257d8f4c9ce105df0af66492142a37b027 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Thu, 23 Jul 2026 20:12:03 -0700 Subject: [PATCH 25/25] bump version --- MODULE.bazel | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 34c11e195..7995ee4f4 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -8,7 +8,7 @@ module( ) bazel_dep(name = "abseil-cpp", version = "20250814.1") -bazel_dep(name = "apple_support", version = "2.6.1") +bazel_dep(name = "apple_support", version = "2.8.0") bazel_dep(name = "bazel_linux_packages", version = "0.4.1") bazel_dep(name = "bazel_features", version = "1.51.0") bazel_dep(name = "bazel_skylib", version = "1.7.1") @@ -281,14 +281,3 @@ single_version_override( patch_strip = 1, patches = ["//third_party/patches:stardoc-revert-load-statements-in-docs.patch"], ) - -# FIXME: Delete after testing - -archive_override( - module_name = "apple_support", - integrity = "sha256-4YQ7nCqSJ4QcfTF8RLDRQseKtfFS1MTtWKnLlS3bg/U=", - strip_prefix = "apple_support-c268c90e7d1efe0d656081e29b11ab05ada9bdda", - urls = [ - "https://github.com/bazelbuild/apple_support/archive/c268c90e7d1efe0d656081e29b11ab05ada9bdda.tar.gz", - ], -)