Skip to content

Commit f656e39

Browse files
redsun82Copilot
andcommitted
Merge branch 'main' into redsun82-rust-analyzer-update
Resolve MODULE.bazel conflict: keep `rules_rust` 0.73.0 (this branch) and `rules_swift` 4.0.0-rc5-codeql.1 plus the `apple_support` removal (main). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 890cb55d-0437-4bd7-9268-87b8897ada01
2 parents e798e21 + 6d0f21d commit f656e39

56 files changed

Lines changed: 2221 additions & 254 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

MODULE.bazel

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,8 @@ bazel_dep(name = "gazelle", version = "0.50.0")
3131
bazel_dep(name = "rules_dotnet", version = "0.21.5-codeql.1")
3232
bazel_dep(name = "googletest", version = "1.17.0.bcr.2")
3333
bazel_dep(name = "rules_rust", version = "0.73.0")
34-
bazel_dep(name = "rules_swift", version = "4.0.0-rc5")
34+
bazel_dep(name = "rules_swift", version = "4.0.0-rc5-codeql.1")
3535
bazel_dep(name = "swift-syntax", version = "603.0.2")
36-
37-
# Needed so we can `use_repo` `local_config_xcode` and
38-
# `local_config_apple_cc_toolchains` below (referenced by the per-target
39-
# Xcode-config transition in `unified/swift-syntax-rs/xcode_transition.bzl`).
40-
bazel_dep(name = "apple_support", version = "2.8.0")
4136
bazel_dep(name = "zstd", version = "1.5.7.bcr.1")
4237

4338
bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True)
@@ -226,10 +221,7 @@ use_repo(
226221
"swift-resource-dir-macos",
227222
)
228223

229-
# Swift toolchain for building `unified/swift-syntax-rs`. On Linux we register
230-
# a hermetic swift.org toolchain as the exec toolchain; on macOS `rules_swift`
231-
# auto-registers `xcode_swift_toolchain` (host Xcode + OS-provided Swift
232-
# runtime), which is not hermetic.
224+
# Hermetic swift.org toolchain for building `unified/swift-syntax-rs`.
233225
#
234226
# The version is pinned as a literal rather than read from
235227
# `unified/swift-syntax-rs/.swift-version` via `swift_version_file`: the latter
@@ -247,20 +239,14 @@ use_repo(
247239
swift,
248240
"swift_toolchain",
249241
"swift_toolchain_ubuntu22.04",
242+
"swift_toolchain_xcode",
250243
)
251244

252245
register_toolchains(
253246
"@swift_toolchain//:swift_toolchain_exec_ubuntu22.04",
247+
"@swift_toolchain//:swift_toolchain_exec_xcode",
254248
)
255249

256-
# `apple_support`'s xcode_config and CC toolchains, needed by the Xcode
257-
# transition in `unified/swift-syntax-rs/xcode_transition.bzl`.
258-
xcode_configure = use_extension("@apple_support//xcode:xcode_configure.bzl", "xcode_configure_extension")
259-
use_repo(xcode_configure, "local_config_xcode")
260-
261-
apple_cc_configure = use_extension("@apple_support//crosstool:setup.bzl", "apple_cc_configure_extension")
262-
use_repo(apple_cc_configure, "local_config_apple_cc_toolchains")
263-
264250
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
265251
node.toolchain(
266252
name = "nodejs",

csharp/tools/autobuild.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -eu
44

5-
if [ "$CODEQL_PLATFORM" != "linux64" ] && [ "$CODEQL_PLATFORM" != "osx64" ] ; then
5+
if [ "$CODEQL_PLATFORM" != "linux64" ] && [ "$CODEQL_PLATFORM" != "linux-arm64" ] && [ "$CODEQL_PLATFORM" != "osx64" ] ; then
66
echo "Automatic build detection for $CODEQL_PLATFORM is not implemented."
77
exit 1
88
fi

java/documentation/library-coverage/coverage.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ java.applet,,,11,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,11,
8888
java.awt,1,,3,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,,,,,,,,,,,,3
8989
java.beans,1,,177,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1,,,,,,,,,,,,,82,95
9090
java.io,66,1,225,,,,,,,,,22,,,,,,,,,,,,,,,29,15,,,,,,,,,,,,,,,,,,,,,,,,,1,,202,23
91-
java.lang,38,3,790,,13,,,,,,1,,,,,,,,,,,,8,,,,2,9,,,4,,,1,,,,,,,,,,,,,,,,,,3,,,510,280
91+
java.lang,38,3,789,,13,,,,,,1,,,,,,,,,,,,8,,,,2,9,,,4,,,1,,,,,,,,,,,,,,,,,,3,,,509,280
9292
java.math,,,9,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9
9393
java.net,23,3,347,,,,1,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,21,,,,,,,,,,,,,,,,,3,248,99
9494
java.nio,47,,499,,,,,,,,,5,,,,,,,,,,,,,,,25,16,,,,,,,,,1,,,,,,,,,,,,,,,,,,302,197

java/documentation/library-coverage/coverage.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Java framework & library support
2626
`JBoss Logging <https://github.com/jboss-logging/jboss-logging>`_,``org.jboss.logging``,,,324,,,,,,
2727
`JSON-java <https://github.com/stleary/JSON-java>`_,``org.json``,,236,,,,,,,
2828
`Jackson <https://github.com/FasterXML/jackson>`_,``com.fasterxml.jackson.*``,,9,2,2,,,,,
29-
Java Standard Library,``java.*``,10,4629,260,99,,9,,,26
29+
Java Standard Library,``java.*``,10,4628,260,99,,9,,,26
3030
Java extensions,"``javax.*``, ``jakarta.*``",101,4185,90,10,4,2,1,1,4
3131
`Jetty <https://eclipse.dev/jetty/>`_,``org.eclipse.jetty.client``,,,2,,,,,,2
3232
Kotlin Standard Library,``kotlin*``,,1849,16,14,,,,,2
@@ -41,5 +41,5 @@ Java framework & library support
4141
`Thymeleaf <https://www.thymeleaf.org/>`_,``org.thymeleaf``,,2,2,,,,,,
4242
`jOOQ <https://www.jooq.org/>`_,``org.jooq``,,,1,,,1,,,
4343
Others,"``actions.osgi``, ``antlr``, ``ch.ethz.ssh2``, ``cn.hutool.core.codec``, ``com.alibaba.com.caucho.hessian.io``, ``com.alibaba.druid.sql``, ``com.alibaba.fastjson2``, ``com.amazonaws.auth``, ``com.auth0.jwt.algorithms``, ``com.azure.identity``, ``com.caucho.burlap.io``, ``com.caucho.hessian.io``, ``com.cedarsoftware.util.io``, ``com.esotericsoftware.kryo.io``, ``com.esotericsoftware.kryo5.io``, ``com.esotericsoftware.yamlbeans``, ``com.hubspot.jinjava``, ``com.jcraft.jsch``, ``com.microsoft.sqlserver.jdbc``, ``com.mitchellbosecke.pebble``, ``com.opensymphony.xwork2``, ``com.sshtools.j2ssh.authentication``, ``com.sun.crypto.provider``, ``com.sun.jndi.ldap``, ``com.sun.net.httpserver``, ``com.sun.net.ssl``, ``com.sun.rowset``, ``com.sun.security.auth.module``, ``com.sun.security.ntlm``, ``com.sun.security.sasl.digest``, ``com.thoughtworks.xstream``, ``com.trilead.ssh2``, ``com.unboundid.ldap.sdk``, ``com.zaxxer.hikari``, ``flexjson``, ``hudson``, ``io.jsonwebtoken``, ``io.r2dbc.spi``, ``io.undertow.server.handlers.resource``, ``javafx.scene.web``, ``jenkins``, ``jodd.json``, ``liquibase.database.jvm``, ``liquibase.statement.core``, ``net.lingala.zip4j``, ``net.schmizz.sshj``, ``net.sf.json``, ``net.sf.saxon.s9api``, ``ognl``, ``org.acegisecurity``, ``org.antlr.runtime``, ``org.apache.avro``, ``org.apache.commons.codec``, ``org.apache.commons.compress.archivers.tar``, ``org.apache.commons.exec``, ``org.apache.commons.fileupload``, ``org.apache.commons.httpclient.util``, ``org.apache.commons.jelly``, ``org.apache.commons.jexl2``, ``org.apache.commons.jexl3``, ``org.apache.commons.lang``, ``org.apache.commons.logging``, ``org.apache.commons.net``, ``org.apache.commons.ognl``, ``org.apache.cxf.catalog``, ``org.apache.cxf.common.classloader``, ``org.apache.cxf.common.jaxb``, ``org.apache.cxf.common.logging``, ``org.apache.cxf.configuration.jsse``, ``org.apache.cxf.helpers``, ``org.apache.cxf.resource``, ``org.apache.cxf.staxutils``, ``org.apache.cxf.tools.corba.utils``, ``org.apache.cxf.tools.util``, ``org.apache.cxf.transform``, ``org.apache.directory.ldap.client.api``, ``org.apache.hadoop.fs``, ``org.apache.hadoop.hive.metastore``, ``org.apache.hadoop.hive.ql.exec``, ``org.apache.hadoop.hive.ql.metadata``, ``org.apache.hc.client5.http.async.methods``, ``org.apache.hc.client5.http.classic.methods``, ``org.apache.hc.client5.http.fluent``, ``org.apache.hc.client5.http.protocol``, ``org.apache.hc.client5.http.utils``, ``org.apache.hive.hcatalog.templeton``, ``org.apache.ibatis.jdbc``, ``org.apache.ibatis.mapping``, ``org.apache.log4j``, ``org.apache.poi``, ``org.apache.shiro.authc``, ``org.apache.shiro.codec``, ``org.apache.shiro.jndi``, ``org.apache.shiro.mgt``, ``org.apache.sshd.client.session``, ``org.apache.tools.ant``, ``org.apache.tools.zip``, ``org.codehaus.cargo.container.installer``, ``org.dom4j``, ``org.exolab.castor.xml``, ``org.fusesource.leveldbjni``, ``org.geogebra.web.full.main``, ``org.gradle.api.file``, ``org.ho.yaml``, ``org.influxdb``, ``org.jabsorb``, ``org.jboss.vfs``, ``org.jdbi.v3.core``, ``org.jenkins.ui.icon``, ``org.jenkins.ui.symbol``, ``org.keycloak.models.map.storage``, ``org.kohsuke.stapler``, ``org.lastaflute.web``, ``org.mvel2``, ``org.openjdk.jmh.runner.options``, ``org.owasp.esapi``, ``org.pac4j.jwt.config.encryption``, ``org.pac4j.jwt.config.signature``, ``org.scijava.log``, ``org.xml.sax``, ``org.xmlpull.v1``, ``play.libs.ws``, ``play.mvc``, ``ratpack.core.form``, ``ratpack.core.handling``, ``ratpack.core.http``, ``ratpack.exec``, ``ratpack.form``, ``ratpack.func``, ``ratpack.handling``, ``ratpack.http``, ``ratpack.util``, ``software.amazon.awssdk.transfer.s3.model``, ``sun.jvmstat.perfdata.monitor.protocol.local``, ``sun.jvmstat.perfdata.monitor.protocol.rmi``, ``sun.misc``, ``sun.net.ftp``, ``sun.net.www.protocol.http``, ``sun.security.acl``, ``sun.security.jgss.krb5``, ``sun.security.krb5``, ``sun.security.pkcs``, ``sun.security.pkcs11``, ``sun.security.provider``, ``sun.security.ssl``, ``sun.security.x509``, ``sun.tools.jconsole``",151,8258,824,188,6,20,18,,186
44-
Totals,,406,28637,2765,461,16,151,33,1,416
44+
Totals,,406,28636,2765,461,16,151,33,1,416
4545

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
"""rules_swift MODULE.bazel file"""
2+
3+
module(
4+
name = "rules_swift",
5+
version = "4.0.0-rc5-codeql.1",
6+
bazel_compatibility = [">=8.0.0"],
7+
compatibility_level = 3,
8+
)
9+
10+
bazel_dep(name = "abseil-cpp", version = "20250814.1")
11+
bazel_dep(name = "apple_support", version = "2.8.0")
12+
bazel_dep(name = "bazel_linux_packages", version = "0.4.1")
13+
bazel_dep(name = "bazel_features", version = "1.51.0")
14+
bazel_dep(name = "bazel_skylib", version = "1.7.1")
15+
bazel_dep(name = "nlohmann_json", version = "3.12.0.bcr.1")
16+
bazel_dep(name = "platforms", version = "0.0.11")
17+
bazel_dep(name = "protobuf", version = "34.0.bcr.1")
18+
bazel_dep(name = "rules_cc", version = "0.2.14")
19+
bazel_dep(name = "rules_shell", version = "0.3.0")
20+
bazel_dep(name = "swift_argument_parser", version = "1.7.0")
21+
22+
apt = use_extension("@bazel_linux_packages//apt:extensions.bzl", "apt")
23+
apt.ubuntu(
24+
name = "swift_ubuntu22.04_sysroot",
25+
architectures = ["amd64"],
26+
lockfile = "//swift/internal/extensions:ubuntu22.04_sysroot.lock.json",
27+
packages = [
28+
"libc6-dev",
29+
"libcurl4-openssl-dev",
30+
"libstdc++-11-dev",
31+
"libxml2-dev",
32+
"linux-libc-dev",
33+
"zlib1g-dev",
34+
],
35+
suites = ["jammy"],
36+
)
37+
apt.ubuntu(
38+
name = "swift_ubuntu22.04_aarch64_sysroot",
39+
architectures = ["arm64"],
40+
lockfile = "//swift/internal/extensions:ubuntu22.04_aarch64_sysroot.lock.json",
41+
packages = [
42+
"libc6-dev",
43+
"libcurl4-openssl-dev",
44+
"libstdc++-11-dev",
45+
"libxml2-dev",
46+
"linux-libc-dev",
47+
"zlib1g-dev",
48+
],
49+
suites = ["jammy"],
50+
)
51+
use_repo(
52+
apt,
53+
"swift_ubuntu22.04_aarch64_sysroot",
54+
"swift_ubuntu22.04_sysroot",
55+
)
56+
57+
swift_autoconfiguration = use_repo_rule("//swift/internal:swift_autoconfiguration.bzl", "swift_autoconfiguration")
58+
59+
swift_autoconfiguration(name = "rules_swift_local_config")
60+
61+
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
62+
63+
http_archive(
64+
name = "rules_swift_index_import_5_8",
65+
build_file = "//third_party:rules_swift_index_import/BUILD.overlay",
66+
canonical_id = "index-import-5.8",
67+
sha256 = "28c1ffa39d99e74ed70623899b207b41f79214c498c603915aef55972a851a15",
68+
urls = ["https://github.com/MobileNativeFoundation/index-import/releases/download/5.8.0.1/index-import.tar.gz"],
69+
)
70+
71+
http_archive(
72+
name = "rules_swift_index_import_6_1",
73+
build_file = "//third_party:rules_swift_index_import/BUILD.overlay",
74+
canonical_id = "index-import-6.1",
75+
sha256 = "9a54fc1674af6031125a9884480a1e31e1bcf48b8f558b3e8bcc6b6fcd6e8b61",
76+
urls = ["https://github.com/MobileNativeFoundation/index-import/releases/download/6.1.0.1/index-import.tar.gz"],
77+
)
78+
79+
register_toolchains("//swift/toolchains:all")
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
diff --git a/swift/internal/extensions/toolchains.bzl b/swift/internal/extensions/toolchains.bzl
2+
--- a/swift/internal/extensions/toolchains.bzl
3+
+++ b/swift/internal/extensions/toolchains.bzl
4+
@@ -132,12 +132,11 @@ def toolchains_for_platform(platform, toolchain_repository):
5+
toolchain_repository = toolchain_repository,
6+
)
7+
8+
- if platform != "xcode":
9+
- content += _EXEC_TOOLCHAIN_PLATFORM.format(
10+
- exec_compatible_with = _exec_compatible_with_for_platform(platform),
11+
- platform = platform,
12+
- toolchain_repository = toolchain_repository,
13+
- )
14+
+ content += _EXEC_TOOLCHAIN_PLATFORM.format(
15+
+ exec_compatible_with = _exec_compatible_with_for_platform(platform),
16+
+ platform = platform,
17+
+ toolchain_repository = toolchain_repository,
18+
+ )
19+
20+
if platform in (
21+
"ubuntu22.04",
22+
diff --git a/swift/toolchains/swift_toolchain.bzl b/swift/toolchains/swift_toolchain.bzl
23+
--- a/swift/toolchains/swift_toolchain.bzl
24+
+++ b/swift/toolchains/swift_toolchain.bzl
25+
@@ -605,10 +605,14 @@ def _parse_target_system_name(*, arch, os, target_system_name):
26+
"""Returns the target system name set by the CC toolchain or attempts to create one based on the OS and arch."""
27+
28+
if target_system_name and target_system_name != "local":
29+
+ if os == "macos" and target_system_name.endswith(("-macos", "-macosx")):
30+
+ return target_system_name + "10.15"
31+
return target_system_name
32+
33+
if os == "linux":
34+
return "%s-unknown-linux-gnu" % arch
35+
+ elif os == "macos":
36+
+ return "%s-apple-macos10.15" % arch
37+
elif os == "windows":
38+
# The MSVC cc toolchain reports a `target_gnu_system_name` of "local",
39+
# so synthesize the triple.
40+
@@ -706,5 +710,16 @@ def _swift_toolchain_impl(ctx):
41+
elif ctx.attr.os == "none":
42+
swift_linkopts_cc_info = CcInfo()
43+
+ elif ctx.attr.os == "macos":
44+
+ macos_linkopts = ["-L{}".format(paths.join(toolchain_root, "lib/swift/macosx"))]
45+
+ if sdkroot:
46+
+ macos_linkopts.append("-L{}".format(paths.join(sdkroot, "usr/lib/swift")))
47+
+ swift_linkopts_cc_info = _swift_sdk_linkopts_cc_info(
48+
+ ctx.label,
49+
+ macos_linkopts,
50+
+ ctx.attr.swift_tools[SwiftToolsInfo].additional_inputs if ctx.attr.swift_tools else [],
51+
+ )
52+
+ dynamic_runtime_cc_info = None
53+
+ static_runtime_cc_info = None
54+
elif ctx.attr.os == "android":
55+
if not sdkroot:
56+
fail("Android toolchain requires a sysroot to be set, either via the `sdkroot` attribute or by using a CC toolchain that provides one.")
57+
diff --git a/swift/internal/extensions/toolchain.BUILD b/swift/internal/extensions/toolchain.BUILD
58+
--- a/swift/internal/extensions/toolchain.BUILD
59+
+++ b/swift/internal/extensions/toolchain.BUILD
60+
@@ -333,17 +333,22 @@ swift_toolchain(
61+
features = [
62+
"swift._supports_upcoming_features",
63+
"swift.no_embed_debug_module",
64+
- "swift.use_autolink_extract",
65+
- "swift.lld_gc_workaround",
66+
- "swift.use_module_wrap",
67+
# TODO: This should be removed so that private headers can be used with
68+
# explicit modules, but the build targets for CgRPC need to be cleaned up
69+
# first because they contain C++ code.
70+
"swift.module_map_no_private_headers",
71+
- ],
72+
+ ] + select({
73+
+ "@platforms//os:linux": [
74+
+ "swift.lld_gc_workaround",
75+
+ "swift.use_autolink_extract",
76+
+ "swift.use_module_wrap",
77+
+ ],
78+
+ "//conditions:default": [],
79+
+ }),
80+
os = select({
81+
"@platforms//os:linux": "linux",
82+
"@platforms//os:macos": "macos",
83+
}),
84+
parsed_version = "{swift_version}",
85+
+ sdkroot = "{macos_sdkroot}",
86+
static_runtime = select({
87+
diff --git a/swift/internal/extensions/standalone_toolchain.bzl b/swift/internal/extensions/standalone_toolchain.bzl
88+
--- a/swift/internal/extensions/standalone_toolchain.bzl
89+
+++ b/swift/internal/extensions/standalone_toolchain.bzl
90+
@@ -91,11 +91,17 @@ def _standalone_toolchain_impl(repository_ctx):
91+
strip_prefix = filename.removesuffix(".tar.gz"),
92+
)
93+
94+
+ macos_sdkroot = ""
95+
+ if repository_ctx.attr.platform == "xcode":
96+
+ macos_sdkroot = _run(repository_ctx, ["xcrun", "--sdk", "macosx", "--show-sdk-path"])
97+
+ repository_ctx.watch(macos_sdkroot)
98+
+
99+
repository_ctx.file(".swift-version", repository_ctx.attr.swift_version)
100+
repository_ctx.template(
101+
"BUILD.bazel",
102+
repository_ctx.attr._build_template,
103+
substitutions = {
104+
+ "{macos_sdkroot}": macos_sdkroot,
105+
"{swift_version}": repository_ctx.attr.swift_version,
106+
},
107+
)
108+
@@ -107,19 +109,29 @@ def _standalone_toolchain_impl(repository_ctx):
109+
-standalone_toolchain = repository_rule(
110+
- implementation = _standalone_toolchain_impl,
111+
- attrs = {
112+
- "_build_template": attr.label(
113+
- default = "//swift/internal/extensions:toolchain.BUILD",
114+
- ),
115+
- "platform": attr.string(
116+
- doc = "The host platform name in the swift package download URL",
117+
- mandatory = True,
118+
- ),
119+
- "sha256": attr.string(
120+
- doc = "The expected SHA-256 of the file downloaded. This must match the SHA-256 of the file downloaded.",
121+
- ),
122+
- "swift_version": attr.string(
123+
- doc = "Version of the swift toolchain to be installed.",
124+
- mandatory = True,
125+
- ),
126+
- },
127+
+_STANDALONE_TOOLCHAIN_ATTRS = {
128+
+ "_build_template": attr.label(
129+
+ default = "//swift/internal/extensions:toolchain.BUILD",
130+
+ ),
131+
+ "platform": attr.string(
132+
+ doc = "The host platform name in the swift package download URL",
133+
+ mandatory = True,
134+
+ ),
135+
+ "sha256": attr.string(
136+
+ doc = "The expected SHA-256 of the file downloaded. This must match the SHA-256 of the file downloaded.",
137+
+ ),
138+
+ "swift_version": attr.string(
139+
+ doc = "Version of the swift toolchain to be installed.",
140+
+ mandatory = True,
141+
+ ),
142+
+}
143+
+
144+
+standalone_toolchain = repository_rule(
145+
+ implementation = _standalone_toolchain_impl,
146+
+ attrs = _STANDALONE_TOOLCHAIN_ATTRS,
147+
+)
148+
+
149+
+standalone_macos_toolchain = repository_rule(
150+
+ implementation = _standalone_toolchain_impl,
151+
+ attrs = _STANDALONE_TOOLCHAIN_ATTRS,
152+
+ configure = True,
153+
+ environ = ["DEVELOPER_DIR"],
154+
+ local = True,
155+
)
156+
diff --git a/swift/extensions.bzl b/swift/extensions.bzl
157+
--- a/swift/extensions.bzl
158+
+++ b/swift/extensions.bzl
159+
@@ -17 +17,5 @@
160+
-load("//swift/internal/extensions:standalone_toolchain.bzl", "standalone_toolchain")
161+
+load(
162+
+ "//swift/internal/extensions:standalone_toolchain.bzl",
163+
+ "standalone_macos_toolchain",
164+
+ "standalone_toolchain",
165+
+)
166+
@@ -182,7 +186,8 @@ def _standalone_toolchain_impl(module_ctx):
167+
toolchain_releases = toolchain.platform_sha256.items() or swift_releases[swift_version].items()
168+
for platform, sha256 in toolchain_releases:
169+
repository_name = toolchain.name + "_{}".format(platform)
170+
- standalone_toolchain(
171+
+ toolchain_repository = standalone_macos_toolchain if platform == "xcode" else standalone_toolchain
172+
+ toolchain_repository(
173+
name = repository_name,
174+
sha256 = sha256,
175+
platform = platform,
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"integrity": "sha256-Ly2lS4AlZJMiyqAxKHyCB+2pGeP5aYkQ6zv8QheeSTI=",
3+
"url": "https://github.com/bazelbuild/rules_swift/releases/download/4.0.0-rc5/rules_swift.4.0.0-rc5.tar.gz",
4+
"patches": {
5+
"register_downloaded_macos_toolchain.patch": "sha256-249WJ4YEH2HmxlvGftl4eD53792joKJx9Dh0j5eHAgo="
6+
},
7+
"patch_strip": 1
8+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"homepage": "https://github.com/bazelbuild/rules_swift",
3+
"maintainers": [],
4+
"repository": [
5+
"github:bazelbuild/rules_swift"
6+
],
7+
"versions": [
8+
"4.0.0-rc5-codeql.1"
9+
],
10+
"yanked_versions": {}
11+
}

0 commit comments

Comments
 (0)