• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2024 The Bazel Authors. All rights reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#    http://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,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15load("@rules_cc//cc/toolchains:args.bzl", "cc_args")
16load("@rules_cc//cc/toolchains/args:sysroot.bzl", "cc_sysroot")
17
18cc_sysroot(
19    name = "linux_sysroot",
20    data = [
21        "@linux_sysroot//:root",
22        "@linux_sysroot//:usr-include",
23        "@linux_sysroot//:usr-include-x86_64-linux-gnu",
24    ],
25    sysroot = "@linux_sysroot//:root",
26    visibility = ["//visibility:public"],
27)
28
29cc_args(
30    name = "warnings",
31    actions = [
32        "@rules_cc//cc/toolchains/actions:c_compile",
33        "@rules_cc//cc/toolchains/actions:cpp_compile_actions",
34    ],
35    args = [
36        "-Werror",
37        "-Wall",
38        "-Wextra",
39        "-Wpedantic",
40    ],
41    visibility = ["//visibility:public"],
42)
43
44cc_args(
45    name = "no_canonical_prefixes",
46    actions = [
47        "@rules_cc//cc/toolchains/actions:c_compile",
48        "@rules_cc//cc/toolchains/actions:cpp_compile_actions",
49    ],
50    args = ["-no-canonical-prefixes"],
51    visibility = ["//visibility:public"],
52)
53