@@ -2,6 +2,9 @@ licenses(["restricted"])
22
33package(default_visibility = ["//visibility:public"])
44
5+ load(":cc_toolchain_config.bzl", "cc_toolchain_config")
6+
7+
58toolchain(
69 name = "toolchain-linux-x86_64",
710 exec_compatible_with = [
@@ -20,64 +23,37 @@ cc_toolchain_suite(
2023 name = "toolchain",
2124 toolchains = {
2225 " local|compiler" : " :cc-compiler-local" ,
23- " darwin|compiler" : " :cc-compiler-darwin" ,
24- " x64_windows|msvc-cl" : " :cc-compiler-windows" ,
25- " x64_windows" : " :cc-compiler-windows" ,
26- " arm" : " :cc-compiler-local" ,
2726 " k8" : " :cc-compiler-local" ,
28- " piii" : " :cc-compiler-local" ,
29- " ppc" : " :cc-compiler-local" ,
30- " darwin" : " :cc-compiler-darwin" ,
3127 } ,
3228)
3329
3430cc_toolchain(
3531 name = "cc-compiler-local",
3632 all_files = "%{ linker_files} ",
3733 compiler_files = ":empty",
38- cpu = "local",
3934 dwp_files = ":empty",
40- dynamic_runtime_libs = [":empty"],
4135 linker_files = "%{ linker_files} ",
4236 objcopy_files = ":empty",
43- static_runtime_libs = [":empty"],
4437 strip_files = ":empty",
4538 # To support linker flags that need to go to the start of command line
4639 # we need the toolchain to support parameter files. Parameter files are
4740 # last on the command line and contain all shared libraries to link, so all
4841 # regular options will be left of them.
4942 supports_param_files = 1,
43+ toolchain_config = ":cc-compiler-local-config",
5044 toolchain_identifier = "local_linux",
5145)
5246
53- cc_toolchain(
54- name = "cc-compiler-darwin",
55- all_files = "%{ linker_files} ",
56- compiler_files = ":empty",
57- cpu = "darwin",
58- dwp_files = ":empty",
59- dynamic_runtime_libs = [":empty"],
60- linker_files = "%{ linker_files} ",
61- objcopy_files = ":empty",
62- static_runtime_libs = [":empty"],
63- strip_files = ":empty",
64- supports_param_files = 0,
65- toolchain_identifier = "local_darwin",
66- )
67-
68- cc_toolchain(
69- name = "cc-compiler-windows",
70- all_files = "%{ win_linker_files} ",
71- compiler_files = ":empty",
72- cpu = "x64_windows",
73- dwp_files = ":empty",
74- dynamic_runtime_libs = [":empty"],
75- linker_files = "%{ win_linker_files} ",
76- objcopy_files = ":empty",
77- static_runtime_libs = [":empty"],
78- strip_files = ":empty",
79- supports_param_files = 1,
80- toolchain_identifier = "local_windows",
47+ cc_toolchain_config(
48+ name = "cc-compiler-local-config",
49+ cpu = "local",
50+ builtin_include_directories = "%{ cxx_builtin_include_directories} ".split(","),
51+ extra_no_canonical_prefixes_flags = ["-fno-canonical-system-headers"],
52+ host_compiler_path = "clang/bin/crosstool_wrapper_driver_is_not_gcc",
53+ host_compiler_prefix = "/usr/bin",
54+ host_compiler_warnings = [],
55+ host_unfiltered_compile_flags = [],
56+ linker_bin_path = "/usr/bin",
8157)
8258
8359filegroup(
@@ -88,9 +64,4 @@ filegroup(
8864filegroup(
8965 name = "crosstool_wrapper_driver_is_not_gcc",
9066 srcs = ["clang/bin/crosstool_wrapper_driver_is_not_gcc"],
91- )
92-
93- filegroup(
94- name = "windows_msvc_wrapper_files",
95- srcs = glob(["windows/msvc_*"]),
9667)
0 commit comments