blob: d948039c9f052a5d43c79ad422a0073be0e73745 [file] [log] [blame]
Damien Martin-Guillerezbe1b1152016-03-31 13:41:48 +00001package(default_visibility = ["//visibility:public"])
2
3cc_library(
4 name = "malloc",
5)
6
7cc_library(
8 name = "stl",
9)
10
11filegroup(
12 name = "empty",
13 srcs = [],
14)
15
Damien Martin-Guillerezbe1b1152016-03-31 13:41:48 +000016# Hardcoded toolchain, legacy behaviour.
Yun Peng9ae6de52016-09-08 08:35:33 +000017cc_toolchain_suite(
Damien Martin-Guillerezbe1b1152016-03-31 13:41:48 +000018 name = "toolchain",
Yun Peng9ae6de52016-09-08 08:35:33 +000019 toolchains = {
20 "armeabi-v7a|compiler": ":cc-compiler-armeabi-v7a",
21 "freebsd|compiler": ":cc-compiler-freebsd",
Yun Pengc77eac92017-03-08 13:54:06 +000022 "x64_windows|cl": ":cc-compiler-x64_windows",
23 "x64_windows_msvc|cl": ":cc-compiler-x64_windows",
24 "x64_windows_msys|windows_msys64": ":cc-compiler-x64_windows_msys",
Cal Peyser92a1eb72016-12-22 17:59:11 +000025 "ios_x86_64|compiler": ":cc-compiler-ios_x86_64",
Yun Peng9ae6de52016-09-08 08:35:33 +000026 },
Damien Martin-Guillerezbe1b1152016-03-31 13:41:48 +000027)
28
29cc_toolchain(
30 name = "cc-compiler-armeabi-v7a",
31 all_files = ":empty",
32 compiler_files = ":empty",
33 cpu = "local",
34 dwp_files = ":empty",
35 dynamic_runtime_libs = [":empty"],
36 linker_files = ":empty",
37 objcopy_files = ":empty",
38 static_runtime_libs = [":empty"],
39 strip_files = ":empty",
40 supports_param_files = 1,
41)
42
43cc_toolchain(
44 name = "cc-compiler-freebsd",
45 all_files = ":empty",
46 compiler_files = ":empty",
47 cpu = "local",
48 dwp_files = ":empty",
49 dynamic_runtime_libs = [":empty"],
50 linker_files = ":empty",
51 objcopy_files = ":empty",
52 static_runtime_libs = [":empty"],
53 strip_files = ":empty",
54 supports_param_files = 0,
55)
56
57cc_toolchain(
Yun Pengc77eac92017-03-08 13:54:06 +000058 name = "cc-compiler-x64_windows_msys",
Damien Martin-Guillerezbe1b1152016-03-31 13:41:48 +000059 all_files = ":empty",
60 compiler_files = ":empty",
61 cpu = "local",
62 dwp_files = ":empty",
63 dynamic_runtime_libs = [":empty"],
64 linker_files = ":empty",
65 objcopy_files = ":empty",
66 static_runtime_libs = [":empty"],
67 strip_files = ":empty",
Lukacs Berkibb19fd62016-04-08 11:08:14 +000068 supports_param_files = 1,
Damien Martin-Guillerezbe1b1152016-03-31 13:41:48 +000069)
Yun Pengfdcb3b22016-04-19 20:03:10 +000070
71cc_toolchain(
Yun Pengc77eac92017-03-08 13:54:06 +000072 name = "cc-compiler-x64_windows",
Yun Pengfdcb3b22016-04-19 20:03:10 +000073 all_files = ":every-file-x64_windows",
74 compiler_files = ":compile-x64_windows",
75 cpu = "x64_windows",
76 dwp_files = ":empty",
77 dynamic_runtime_libs = [":empty"],
78 linker_files = ":empty",
79 objcopy_files = ":empty",
80 static_runtime_libs = [":empty"],
81 strip_files = ":empty",
Yun Peng57be3442016-04-25 14:08:41 +000082 supports_param_files = 1,
Yun Pengfdcb3b22016-04-19 20:03:10 +000083)
84
Cal Peyser92a1eb72016-12-22 17:59:11 +000085cc_toolchain(
86 name = "cc-compiler-ios_x86_64",
87 all_files = ":empty",
88 compiler_files = ":empty",
89 cpu = "local",
90 dwp_files = ":empty",
91 dynamic_runtime_libs = [":empty"],
92 linker_files = ":empty",
93 objcopy_files = ":empty",
94 static_runtime_libs = [":empty"],
95 strip_files = ":empty",
96 supports_param_files = 0,
97)
98
Yun Pengfdcb3b22016-04-19 20:03:10 +000099filegroup(
100 name = "every-file-x64_windows",
101 srcs = [
102 ":compile-x64_windows",
103 ],
104)
105
106filegroup(
107 name = "compile-x64_windows",
108 srcs = glob([
109 "wrapper/bin/msvc_*",
110 "wrapper/bin/pydir/msvc*",
111 ]),
Yun Peng9ae6de52016-09-08 08:35:33 +0000112)
Marcel Hlopko74b94322016-10-11 15:30:49 +0000113
114filegroup(
115 name = "link_dynamic_library",
116 srcs = ["link_dynamic_library.sh"],
117)
cpeyserd852e482017-09-07 22:16:06 +0200118
cpeyserca216f52017-09-13 21:24:40 +0200119# The c++ toolchain type
120load("//tools/build_defs/toolchains:toolchain_category.bzl", "toolchain_category")
121toolchain_category(name = "toolchain_category")
cpeyserd852e482017-09-07 22:16:06 +0200122
123# A dummy toolchain is necessary to satisfy toolchain resolution until platforms
124# are used in c++ by default.
125# TODO(b/64754003): Remove once platforms are used in c++ by default.
126toolchain(
127 name = "dummy_cc_toolchain",
128 toolchain = "dummy_cc_toolchain_impl",
cpeyserca216f52017-09-13 21:24:40 +0200129 toolchain_type = ":toolchain_category",
cpeyserd852e482017-09-07 22:16:06 +0200130)
131
132load(":dummy_toolchain.bzl", "dummy_toolchain")
133
134dummy_toolchain(name = "dummy_cc_toolchain_impl")