mirror of https://github.com/bazelbuild/rules_cc
Update rules_cc for --incompatible_enable_cc_toolchain_resolution
https://github.com/bazelbuild/bazel/issues/7260
This commit is contained in:
parent
b308aae57f
commit
3e6d3b9a4a
|
@ -71,9 +71,7 @@ def _my_c_archive_impl(ctx):
|
|||
inputs = depset(
|
||||
direct = [object_file],
|
||||
transitive = [
|
||||
# TODO: Use CcToolchainInfo getters when available
|
||||
# See https://github.com/bazelbuild/bazel/issues/7427.
|
||||
ctx.attr._cc_toolchain.files,
|
||||
cc_toolchain.all_files,
|
||||
],
|
||||
),
|
||||
outputs = [output_file],
|
||||
|
|
|
@ -61,9 +61,7 @@ def _my_c_compile_impl(ctx):
|
|||
env = env,
|
||||
inputs = depset(
|
||||
items = [source_file],
|
||||
# TODO: Use CcToolchainInfo getters when available
|
||||
# See https://github.com/bazelbuild/bazel/issues/7427.
|
||||
transitive = [ctx.attr._cc_toolchain.files],
|
||||
transitive = [cc_toolchain.all_files],
|
||||
),
|
||||
outputs = [output_file],
|
||||
)
|
||||
|
@ -78,5 +76,6 @@ my_c_compile = rule(
|
|||
"src": attr.label(mandatory = True, allow_single_file = True),
|
||||
"_cc_toolchain": attr.label(default = Label("@bazel_tools//tools/cpp:current_cc_toolchain")),
|
||||
},
|
||||
toolchains = ["@bazel_tools//tools/cpp:toolchain_type"],
|
||||
fragments = ["cpp"],
|
||||
)
|
||||
|
|
|
@ -28,4 +28,5 @@ write_cc_toolchain_cpu = rule(
|
|||
attrs = {
|
||||
"_cc_toolchain": attr.label(default = Label("@bazel_tools//tools/cpp:current_cc_toolchain")),
|
||||
},
|
||||
toolchains = ["@bazel_tools//tools/cpp:toolchain_type"],
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue