BUILD 901 B

1234567891011121314151617181920212223242526272829
  1. # Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. # Exceptions. See /LICENSE for license information.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. load("//bazel/carbon_rules:defs.bzl", "carbon_binary")
  5. utils = [
  6. "io_utils.carbon",
  7. "sort.carbon",
  8. ]
  9. # A list of examples that should be excluded because they don't build any more.
  10. # For example, to exclude day3_part2, use:
  11. # excluded = ["day3_part2.carbon"]
  12. excluded = []
  13. # Produce a binary `dayX_partY` for each matching `.carbon` file. Each binary
  14. # depends on `dayX_partY.carbon` and `dayX_common.carbon`.
  15. [
  16. carbon_binary(
  17. name = carbon_file.removesuffix(".carbon"),
  18. srcs = [
  19. carbon_file,
  20. carbon_file.rsplit("_", 1)[0] + "_common.carbon",
  21. ] + utils,
  22. )
  23. for carbon_file in glob(["day*_part*.carbon"])
  24. if carbon_file not in excluded
  25. ]