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