File tree 2 files changed +11
-1
lines changed 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -389,16 +389,25 @@ def _create_xcode_toolchain(repository_ctx):
389
389
SWIFT_FEATURE_MODULE_MAP_NO_PRIVATE_HEADERS ,
390
390
]
391
391
392
+ path_to_swiftc = repository_ctx .which ("swiftc" )
393
+ toolchain_root = path_to_swiftc .dirname
394
+
392
395
repository_ctx .file (
393
396
"BUILD" ,
394
397
"""
398
+ load("@bazel_tools//tools/cpp:unix_cc_toolchain_config.bzl", "cc_toolchain_config")
395
399
load(
396
400
"@build_bazel_rules_swift//swift/internal:xcode_swift_toolchain.bzl",
397
401
"xcode_swift_toolchain",
398
402
)
399
403
400
404
package(default_visibility = ["//visibility:public"])
401
405
406
+ alias(
407
+ name = "current_swift_cc_toolchain",
408
+ actual = "@local_config_apple_cc//:toolchain"
409
+ )
410
+
402
411
xcode_swift_toolchain(
403
412
name = "toolchain",
404
413
features = [{feature_list}],
@@ -408,6 +417,7 @@ xcode_swift_toolchain(
408
417
'"{}"' .format (feature )
409
418
for feature in feature_values
410
419
]),
420
+ toolchain_root = toolchain_root ,
411
421
),
412
422
)
413
423
Original file line number Diff line number Diff line change @@ -432,7 +432,7 @@ configuration options that are applied to targets on a per-package basis.
432
432
allow_single_file = True ,
433
433
),
434
434
"_cc_toolchain" : attr .label (
435
- default = Label ("@build_bazel_rules_swift_local_config//:current_swift_cc_toolchain " ),
435
+ default = Label ("@bazel_tools//tools/cpp:current_cc_toolchain " ),
436
436
doc = """\
437
437
The C++ toolchain from which other tools needed by the Swift toolchain (such as
438
438
`clang` and `ar`) will be retrieved.
You can’t perform that action at this time.
0 commit comments