Serge Bazanski | 7353e17 | 2021-03-31 22:09:22 +0200 | [diff] [blame^] | 1 | load("@bazel_skylib//rules:common_settings.bzl", "string_flag") |
| 2 | |
| 3 | exports_files(["boilerplate.go.txt"]) |
| 4 | |
| 5 | # Flag determining whether the current build graph traversal is happening for |
| 6 | # preprocessing by kube-code-generator ('yes'), or not ('no'). Set by |
| 7 | # preprocessing_transition. |
| 8 | string_flag( |
| 9 | name = "preprocessing", |
| 10 | build_setting_default = "no", |
| 11 | ) |
| 12 | |
| 13 | # Config setting on which go_libraries embedding go_kubernetes_libraries |
| 14 | # potentially forming a cycle (eg. deepcopy, which is embedded in the same |
| 15 | # go_library from which it is generated) can rely on to break this cycle. |
| 16 | config_setting( |
| 17 | name = "embed_deepcopy", |
| 18 | flag_values = { |
| 19 | ":preprocessing": "no", |
| 20 | }, |
| 21 | ) |