• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2023 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_setting")
16
17package(default_visibility = ["//visibility:public"])
18
19licenses(["notice"])
20
21# Setting used when building rust std libraries from scratch (core, alloc, std,
22# etc.).
23string_setting(
24    name = "stdlibs_flavor",
25    build_setting_default = "core_alloc_std",
26    visibility = ["//visibility:public"],
27)
28
29# Special set with no std libs.
30#
31# Used when building core.
32config_setting(
33    name = "stdlibs_none",
34    flag_values = {":stdlibs_flavor": "none"},
35)
36
37# Special set with only core.
38# Used when building compiler_builtins.
39config_setting(
40    name = "stdlibs_core_only",
41    flag_values = {":stdlibs_flavor": "core_only"},
42)
43
44# Included libs: core, compiler_builtins
45config_setting(
46    name = "stdlibs_core",
47    flag_values = {":stdlibs_flavor": "core"},
48)
49
50# Included libs: core, alloc, compiler_builtins
51config_setting(
52    name = "stdlibs_core_alloc",
53    flag_values = {":stdlibs_flavor": "core_alloc"},
54)
55
56# Included libs: core, alloc, std, compiler_builtins
57config_setting(
58    name = "stdlibs_core_alloc_std",
59    flag_values = {":stdlibs_flavor": "core_alloc_std"},
60)
61