|
15 | 15 | package(default_visibility = ["//visibility:public"]) |
16 | 16 |
|
17 | 17 | load("@bazel_skylib//rules:native_binary.bzl", "native_binary") |
18 | | -load("@rules_cc//cc:defs.bzl", "cc_toolchain", "cc_toolchain_suite") |
19 | 18 | load("@toolchains_llvm//toolchain/internal:system_module_map.bzl", "system_module_map") |
20 | | -load("%{cc_toolchain_config_bzl}", "cc_toolchain_config") |
| 19 | +load("@toolchains_llvm//toolchain/internal:host_sysroot_directory.bzl", "host_sysroot_directory") |
| 20 | +load("@rules_cc//cc/toolchains:args.bzl", "cc_args") |
| 21 | +load("@rules_cc//cc/toolchains:tool.bzl", "cc_tool") |
| 22 | +load("@rules_cc//cc/toolchains:tool_map.bzl", "cc_tool_map") |
| 23 | +load("@rules_cc//cc/toolchains:feature.bzl", "cc_feature") |
| 24 | +load("@rules_cc//cc/toolchains:feature_constraint.bzl", "cc_feature_constraint") |
| 25 | +load("@rules_cc//cc/toolchains:toolchain.bzl", "cc_toolchain") |
| 26 | +load("@rules_cc//cc/toolchains/args:sysroot.bzl", "cc_sysroot") |
| 27 | + |
| 28 | + |
| 29 | +cc_feature_constraint( |
| 30 | + name = "constraint_opt", |
| 31 | + all_of = ["@rules_cc//cc/toolchains/features:opt"], |
| 32 | +) |
| 33 | + |
| 34 | +cc_feature_constraint( |
| 35 | + name = "constraint_dbg", |
| 36 | + all_of = ["@rules_cc//cc/toolchains/features:dbg"], |
| 37 | +) |
| 38 | + |
| 39 | +cc_feature_constraint( |
| 40 | + name = "constraint_fastbuild", |
| 41 | + all_of = ["@rules_cc//cc/toolchains/features:fastbuild"], |
| 42 | +) |
| 43 | + |
| 44 | +# TODO: what's the non-legacy way of this doing this? |
| 45 | +cc_feature_constraint( |
| 46 | + name = "constraint_unfiltered_compile_flags", |
| 47 | + all_of = ["@rules_cc//cc/toolchains/features/legacy:unfiltered_compile_flags"] |
| 48 | +) |
| 49 | + |
| 50 | + |
| 51 | +# Do not resolve our symlinked resource prefixes to real paths. |
| 52 | +cc_args( |
| 53 | + name = "no_absolute_paths_for_builtins", |
| 54 | + actions = [ |
| 55 | + "@rules_cc//cc/toolchains/actions:compile_actions", |
| 56 | + "@rules_cc//cc/toolchains/actions:ar_actions", |
| 57 | + ], |
| 58 | + args = ["-no-canonical-prefixes"], |
| 59 | + visibility = ["//visibility:public"], |
| 60 | +) |
21 | 61 |
|
22 | 62 | # Following filegroup targets are used when not using absolute paths and shared |
23 | 63 | # between different toolchains. |
|
0 commit comments