load("//tools/lint:lint.bzl", "add_lint_tests")
load("//tools/skylark:drake_cc.bzl", "drake_cc_binary")

# Note that this program is compiled not only by this drake_cc_binary rule
# but also separately by the repository.bzl file in this directory.
drake_cc_binary(
    name = "identify_compiler",
    srcs = ["identify_compiler.cc"],
)

genrule(
    name = "compiler_genrule",
    outs = [":compiler.txt"],
    cmd = "$(execpath :identify_compiler) > $@",
    tools = [":identify_compiler"],
    visibility = ["//:__subpackages__"],
)

add_lint_tests()
