1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
licenses(["restricted"])
package(default_visibility = ["//visibility:public"])
toolchain(
name = "toolchain-linux-x86_64",
exec_compatible_with = [
"@bazel_tools//platforms:linux",
"@bazel_tools//platforms:x86_64",
],
target_compatible_with = [
"@bazel_tools//platforms:linux",
"@bazel_tools//platforms:x86_64",
],
toolchain = ":cc-compiler-local",
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
)
cc_toolchain_suite(
name = "toolchain",
toolchains = {
"local|compiler": ":cc-compiler-local",
"darwin|compiler": ":cc-compiler-darwin",
"x64_windows|msvc-cl": ":cc-compiler-windows",
},
)
cc_toolchain(
name = "cc-compiler-local",
all_files = ":crosstool_wrapper_driver_is_not_gcc",
compiler_files = ":empty",
cpu = "local",
dwp_files = ":empty",
dynamic_runtime_libs = [":empty"],
linker_files = ":crosstool_wrapper_driver_is_not_gcc",
objcopy_files = ":empty",
static_runtime_libs = [":empty"],
strip_files = ":empty",
# To support linker flags that need to go to the start of command line
# we need the toolchain to support parameter files. Parameter files are
# last on the command line and contain all shared libraries to link, so all
# regular options will be left of them.
supports_param_files = 1,
)
cc_toolchain(
name = "cc-compiler-darwin",
all_files = ":crosstool_wrapper_driver_is_not_gcc",
compiler_files = ":empty",
cpu = "darwin",
dwp_files = ":empty",
dynamic_runtime_libs = [":empty"],
linker_files = ":crosstool_wrapper_driver_is_not_gcc",
objcopy_files = ":empty",
static_runtime_libs = [":empty"],
strip_files = ":empty",
supports_param_files = 0,
)
cc_toolchain(
name = "cc-compiler-windows",
all_files = ":windows_msvc_wrapper_files",
compiler_files = ":empty",
cpu = "x64_windows",
dwp_files = ":empty",
dynamic_runtime_libs = [":empty"],
linker_files = ":windows_msvc_wrapper_files",
objcopy_files = ":empty",
static_runtime_libs = [":empty"],
strip_files = ":empty",
supports_param_files = 1,
)
filegroup(
name = "empty",
srcs = [],
)
filegroup(
name = "crosstool_wrapper_driver_is_not_gcc",
srcs = ["clang/bin/crosstool_wrapper_driver_is_not_gcc"],
)
filegroup(
name = "windows_msvc_wrapper_files",
srcs = glob(["windows/msvc_*"]),
)
|