Skip to content

Commit

Permalink
Update rules_swift for --incompatible_enable_cc_toolchain_resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
hlopko committed May 14, 2019
1 parent f3d6355 commit 9e59ac7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion swift/internal/swift_toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def _run_swift_action(toolchain_tools, swift_wrapper, actions, **kwargs):
def _swift_toolchain_impl(ctx):
toolchain_root = ctx.attr.root
cc_toolchain = find_cpp_toolchain(ctx)
cc_toolchain_files = ctx.attr._cc_toolchain.files
cc_toolchain_files = cc_toolchain.all_files

linker_opts_producer = partial.make(
_default_linker_opts,
Expand Down Expand Up @@ -274,5 +274,6 @@ The C++ toolchain from which other tools needed by the Swift toolchain (such as
}),
doc = "Represents a Swift compiler toolchain.",
fragments = ["swift"],
toolchains = ["@bazel_tools//tools/cpp:toolchain_type"],
implementation = _swift_toolchain_impl,
)
3 changes: 2 additions & 1 deletion swift/internal/xcode_swift_toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ def _xcode_swift_toolchain_impl(ctx):
)

cc_toolchain = find_cpp_toolchain(ctx)
cc_toolchain_files = ctx.attr._cc_toolchain.files
cc_toolchain_files = cc_toolchain.all_files

# Compute the default requested features and conditional ones based on Xcode version.
requested_features = features_for_build_modes(ctx, objc_fragment = ctx.fragments.objc)
Expand Down Expand Up @@ -587,5 +587,6 @@ The C++ toolchain from which linking flags and other tools needed by the Swift t
"objc",
"swift",
],
toolchains = ["@bazel_tools//tools/cpp:toolchain_type"],
implementation = _xcode_swift_toolchain_impl,
)

0 comments on commit 9e59ac7

Please sign in to comment.