• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1load("//bazel:skia_rules.bzl", "exports_files_legacy", "skia_cc_library")
2
3package(
4    default_applicable_licenses = ["//:license"],
5)
6
7licenses(["notice"])
8
9exports_files_legacy()
10
11skia_cc_library(
12    name = "compilation_mode_keys",
13    testonly = True,
14    srcs = ["CompilationModeKeys.cpp"],
15    hdrs = ["CompilationModeKeys.h"],
16    defines = select({
17        # These keys reflect all possible values of the --compilation_mode Bazel flag[1], which
18        # defaults to "fastbuild". See https://bazel.build/docs/user-manual#compilation-mode.
19        #
20        # TODO(lovisolo, kjlubick): Update this when we add support for "OptimizeForSize" builds.
21        "//bazel/common_config_settings:debug_build": ["'SKIA_COMPILATION_MODE_KEY=\"Debug\"'"],
22        "//bazel/common_config_settings:fast_build": ["'SKIA_COMPILATION_MODE_KEY=\"FastBuild\"'"],
23        "//bazel/common_config_settings:release_build": ["'SKIA_COMPILATION_MODE_KEY=\"Release\"'"],
24    }),
25    visibility = [
26        "//bench:__subpackages__",
27        "//gm:__subpackages__",
28        "//tools/testrunners:__subpackages__",
29    ],
30)
31