• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2024 The Pigweed Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4# use this file except in compliance with the License. You may obtain a copy of
5# the License at
6#
7#     https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations under
13# the License.
14
15load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
16
17package(default_visibility = ["//visibility:public"])
18
19string_flag(
20    name = "cxx_standard",
21    build_setting_default = "20",
22    values = [
23        "17",
24        "20",
25    ],
26)
27
28config_setting(
29    name = "c++17_enabled",
30    flag_values = {
31        ":cxx_standard": "17",
32    },
33)
34
35config_setting(
36    name = "c++20_enabled",
37    flag_values = {
38        ":cxx_standard": "20",
39    },
40)
41
42# TODO: https://pwbug.dev/394378542 - This is temporarily silenced to avoid the
43# hassle of adding rules_shell to Pigweed's Bazel dependencies.
44# buildifier: disable=native-sh-binary
45sh_binary(
46    name = "generate_module_map",
47    srcs = ["generate_module_map.sh"],
48)
49