mirror of https://github.com/bazelbuild/rules_cc
No public description
PiperOrigin-RevId: 673231375 Change-Id: I61110c5d47898c0ef27af650ad56de6f107d3976
This commit is contained in:
parent
ce4bc8a8de
commit
96ac608d34
|
@ -19,7 +19,7 @@
|
||||||
# added as a dependency to @rules_cc//:link_extra_lib. The intermediate library
|
# added as a dependency to @rules_cc//:link_extra_lib. The intermediate library
|
||||||
# @bazel_tools@bazel_tools//tools/cpp:link_extra_lib should either be added as a dependency
|
# @bazel_tools@bazel_tools//tools/cpp:link_extra_lib should either be added as a dependency
|
||||||
# to @rules_cc//:link_extra_lib, or removed entirely (if possible).
|
# to @rules_cc//:link_extra_lib, or removed entirely (if possible).
|
||||||
_LINK_EXTRA_LIB = "@rules_cc//:link_extra_lib" # copybara-use-repo-external-label
|
_LINK_EXTRA_LIB = Label("//:link_extra_lib")
|
||||||
|
|
||||||
def cc_binary(**attrs):
|
def cc_binary(**attrs):
|
||||||
"""Bazel cc_binary rule.
|
"""Bazel cc_binary rule.
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
# added as a dependency to @rules_cc//:link_extra_lib. The intermediate library
|
# added as a dependency to @rules_cc//:link_extra_lib. The intermediate library
|
||||||
# @bazel_tools@bazel_tools//tools/cpp:link_extra_lib should either be added as a dependency
|
# @bazel_tools@bazel_tools//tools/cpp:link_extra_lib should either be added as a dependency
|
||||||
# to @rules_cc//:link_extra_lib, or removed entirely (if possible).
|
# to @rules_cc//:link_extra_lib, or removed entirely (if possible).
|
||||||
_LINK_EXTRA_LIB = "@rules_cc//:link_extra_lib" # copybara-use-repo-external-label
|
_LINK_EXTRA_LIB = Label("//:link_extra_lib")
|
||||||
|
|
||||||
def cc_test(**attrs):
|
def cc_test(**attrs):
|
||||||
"""Bazel cc_test rule.
|
"""Bazel cc_test rule.
|
||||||
|
|
|
@ -29,7 +29,7 @@ to depend on and find a cc toolchain.
|
||||||
attrs = {
|
attrs = {
|
||||||
"_cc_toolchain": attr.label(
|
"_cc_toolchain": attr.label(
|
||||||
default = Label(
|
default = Label(
|
||||||
"@rules_cc//cc:current_cc_toolchain", # copybara-use-repo-external-label
|
"@rules_cc//cc:current_cc_toolchain",
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
@ -53,7 +53,7 @@ https://github.com/bazelbuild/bazel/issues/7260 is flipped (and support for old
|
||||||
Bazel version is not needed), it's enough to only keep the toolchain type.
|
Bazel version is not needed), it's enough to only keep the toolchain type.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
CC_TOOLCHAIN_TYPE = "@bazel_tools//tools/cpp:toolchain_type" # copybara-use-repo-external-label
|
CC_TOOLCHAIN_TYPE = Label("@bazel_tools//tools/cpp:toolchain_type")
|
||||||
|
|
||||||
def find_cc_toolchain(ctx, *, mandatory = True):
|
def find_cc_toolchain(ctx, *, mandatory = True):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -86,7 +86,7 @@ def _cc_toolchain_config_impl(ctx):
|
||||||
),
|
),
|
||||||
# This allows us to support all_files.
|
# This allows us to support all_files.
|
||||||
# If all_files was simply an alias to
|
# If all_files was simply an alias to
|
||||||
# ///cc/toolchains/actions:all_actions,
|
# //cc/toolchains/actions:all_actions,
|
||||||
# then if a toolchain introduced a new type of action, it wouldn't get
|
# then if a toolchain introduced a new type of action, it wouldn't get
|
||||||
# put in all_files.
|
# put in all_files.
|
||||||
DefaultInfo(files = depset(transitive = toolchain_config.files.values())),
|
DefaultInfo(files = depset(transitive = toolchain_config.files.values())),
|
||||||
|
|
|
@ -27,28 +27,28 @@ visibility("public")
|
||||||
# work out what actions correspond to what file groups.
|
# work out what actions correspond to what file groups.
|
||||||
_LEGACY_FILE_GROUPS = {
|
_LEGACY_FILE_GROUPS = {
|
||||||
"ar_files": [
|
"ar_files": [
|
||||||
"@rules_cc//cc/toolchains/actions:ar_actions", # copybara-use-repo-external-label
|
Label("//cc/toolchains/actions:ar_actions"),
|
||||||
],
|
],
|
||||||
"as_files": [
|
"as_files": [
|
||||||
"@rules_cc//cc/toolchains/actions:assembly_actions", # copybara-use-repo-external-label
|
Label("//cc/toolchains/actions:assembly_actions"),
|
||||||
],
|
],
|
||||||
"compiler_files": [
|
"compiler_files": [
|
||||||
"@rules_cc//cc/toolchains/actions:cc_flags_make_variable", # copybara-use-repo-external-label
|
Label("//cc/toolchains/actions:cc_flags_make_variable"),
|
||||||
"@rules_cc//cc/toolchains/actions:c_compile", # copybara-use-repo-external-label
|
Label("//cc/toolchains/actions:c_compile"),
|
||||||
"@rules_cc//cc/toolchains/actions:cpp_compile", # copybara-use-repo-external-label
|
Label("//cc/toolchains/actions:cpp_compile"),
|
||||||
"@rules_cc//cc/toolchains/actions:cpp_header_parsing", # copybara-use-repo-external-label
|
Label("//cc/toolchains/actions:cpp_header_parsing"),
|
||||||
],
|
],
|
||||||
# There are no actions listed for coverage, dwp, and objcopy in action_names.bzl.
|
# There are no actions listed for coverage, dwp, and objcopy in action_names.bzl.
|
||||||
"coverage_files": [],
|
"coverage_files": [],
|
||||||
"dwp_files": [],
|
"dwp_files": [],
|
||||||
"linker_files": [
|
"linker_files": [
|
||||||
"@rules_cc//cc/toolchains/actions:cpp_link_dynamic_library", # copybara-use-repo-external-label
|
Label("//cc/toolchains/actions:cpp_link_dynamic_library"),
|
||||||
"@rules_cc//cc/toolchains/actions:cpp_link_nodeps_dynamic_library", # copybara-use-repo-external-label
|
Label("//cc/toolchains/actions:cpp_link_nodeps_dynamic_library"),
|
||||||
"@rules_cc//cc/toolchains/actions:cpp_link_executable", # copybara-use-repo-external-label
|
Label("//cc/toolchains/actions:cpp_link_executable"),
|
||||||
],
|
],
|
||||||
"objcopy_files": [],
|
"objcopy_files": [],
|
||||||
"strip_files": [
|
"strip_files": [
|
||||||
"@rules_cc//cc/toolchains/actions:strip", # copybara-use-repo-external-label
|
Label("//cc/toolchains/actions:strip"),
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue