diff --git a/examples/custom_toolchain/BUILD b/examples/custom_toolchain/BUILD index 1f2020b..371fdfd 100644 --- a/examples/custom_toolchain/BUILD +++ b/examples/custom_toolchain/BUILD @@ -29,6 +29,8 @@ # # This example demonstrates both approaches. +load("@rules_cc//cc:defs.bzl", "cc_library", "cc_toolchain", "cc_toolchain_suite") + # Load the Starlark logic defining the toolchain's behavior. For example: what # program runs to compile a source file and how its command line is # constructed. See toolchain_config.bzl for details. diff --git a/examples/custom_toolchain/toolchain_config.bzl b/examples/custom_toolchain/toolchain_config.bzl index 81de2fc..0a18f22 100644 --- a/examples/custom_toolchain/toolchain_config.bzl +++ b/examples/custom_toolchain/toolchain_config.bzl @@ -1,15 +1,16 @@ -# Sample Starlark definition defining a C++ toolchain's behavior. -# -# When you build a cc_* rule, this logic defines what programs run for what -# build steps (e.g. compile / link / archive) and how their command lines are -# structured. -# -# This is a proof-of-concept simple implementation. It doesn't construct fancy -# command lines and uses mock shell scripts to compile and link -# ("sample_compiler" and "sample_linker"). See -# https://docs.bazel.build/versions/master/cc-toolchain-config-reference.html and -# https://docs.bazel.build/versions/master/tutorial/cc-toolchain-config.html for -# advanced usage. +"""Sample Starlark definition defining a C++ toolchain's behavior. + +When you build a cc_* rule, this logic defines what programs run for what +build steps (e.g. compile / link / archive) and how their command lines are +structured. + +This is a proof-of-concept simple implementation. It doesn't construct fancy +command lines and uses mock shell scripts to compile and link +("sample_compiler" and "sample_linker"). See +https://docs.bazel.build/versions/master/cc-toolchain-config-reference.html and +https://docs.bazel.build/versions/master/tutorial/cc-toolchain-config.html for +advanced usage. +""" load("@bazel_tools//tools/cpp:cc_toolchain_config_lib.bzl", "tool_path")