blob: 4e93a314d66b48ed0184cb817d1ded464232050b [file] [log] [blame]
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +01001package(default_visibility = ["//visibility:public"])
2
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +01003cc_library(
4 name = "malloc",
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +01005)
6
7cc_library(
8 name = "stl",
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +01009)
10
11filegroup(
12 name = "empty",
13 srcs = [],
14)
15
Han-Wen Nienhuys310c6312015-04-08 15:35:26 +000016# This is the entry point for --crosstool_top. Toolchains are found
17# by lopping off the name of --crosstool_top and searching for
18# "cc-compiler-${CPU}" in this BUILD file, where CPU is the target CPU
19# specified in --cpu.
20#
21# This file group should include
22# * all cc_toolchain targets supported
23# * all file groups that said cc_toolchain might refer to,
24# including the default_grte_top setting in the CROSSTOOL
25# protobuf.
Laurent Le Brun08849b22016-09-20 12:21:32 +000026alias(
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +010027 name = "toolchain",
Laurent Le Brun08849b22016-09-20 12:21:32 +000028 actual = "//external:cc_toolchain",
Damien Martin-Guillerezbe5b2eb2016-03-02 16:08:07 +000029)
30
31# Hardcoded toolchain, legacy behaviour.
Lukacs Berki180d1b52016-09-06 14:55:21 +000032cc_toolchain_suite(
Damien Martin-Guillerezbe5b2eb2016-03-02 16:08:07 +000033 name = "default-toolchain",
Lukacs Berki180d1b52016-09-06 14:55:21 +000034 toolchains = {
35 "armeabi-v7a|compiler": ":cc-compiler-armeabi-v7a",
36 "darwin|compiler": ":cc-compiler-darwin",
37 "freebsd|compiler": ":cc-compiler-freebsd",
38 "local|compiler": ":cc-compiler-local",
39 "x64_windows|compiler": ":cc-compiler-x64_windows",
40 "x64_windows_msvc|compiler": ":cc-compiler-x64_windows_msvc",
Nishidha Panpaliyaaaee64e2016-12-20 18:19:43 +000041 "ppc|compiler": ":cc-compiler-ppc",
Lukacs Berki180d1b52016-09-06 14:55:21 +000042 },
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +010043)
44
45cc_toolchain(
46 name = "cc-compiler-local",
47 all_files = ":empty",
48 compiler_files = ":empty",
49 cpu = "local",
50 dwp_files = ":empty",
51 dynamic_runtime_libs = [":empty"],
52 linker_files = ":empty",
53 objcopy_files = ":empty",
54 static_runtime_libs = [":empty"],
55 strip_files = ":empty",
Han-Wen Nienhuysfc911c62015-10-12 13:10:10 +000056 supports_param_files = 1,
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +010057)
58
59cc_toolchain(
Nishidha Panpaliyaaaee64e2016-12-20 18:19:43 +000060 name = "cc-compiler-ppc",
61 all_files = ":empty",
62 compiler_files = ":empty",
63 cpu = "ppc",
64 dwp_files = ":empty",
65 dynamic_runtime_libs = [":empty"],
66 linker_files = ":empty",
67 objcopy_files = ":empty",
68 static_runtime_libs = [":empty"],
69 strip_files = ":empty",
70 supports_param_files = 1,
71)
72
73cc_toolchain(
Lukacs Berkia93c63b2015-07-29 15:32:19 +000074 name = "cc-compiler-armeabi-v7a",
75 all_files = ":empty",
76 compiler_files = ":empty",
77 cpu = "local",
78 dwp_files = ":empty",
79 dynamic_runtime_libs = [":empty"],
80 linker_files = ":empty",
81 objcopy_files = ":empty",
82 static_runtime_libs = [":empty"],
83 strip_files = ":empty",
Han-Wen Nienhuysfc911c62015-10-12 13:10:10 +000084 supports_param_files = 1,
Lukacs Berkia93c63b2015-07-29 15:32:19 +000085)
86
87cc_toolchain(
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +010088 name = "cc-compiler-k8",
89 all_files = ":empty",
90 compiler_files = ":empty",
91 cpu = "local",
92 dwp_files = ":empty",
93 dynamic_runtime_libs = [":empty"],
94 linker_files = ":empty",
95 objcopy_files = ":empty",
96 static_runtime_libs = [":empty"],
97 strip_files = ":empty",
Han-Wen Nienhuysfc911c62015-10-12 13:10:10 +000098 supports_param_files = 1,
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +010099)
100
101cc_toolchain(
102 name = "cc-compiler-darwin",
103 all_files = ":empty",
104 compiler_files = ":empty",
105 cpu = "darwin",
106 dwp_files = ":empty",
107 dynamic_runtime_libs = [":empty"],
108 linker_files = ":empty",
109 objcopy_files = ":empty",
110 static_runtime_libs = [":empty"],
111 strip_files = ":empty",
112 supports_param_files = 0,
113)
Damien Martin-Guillerez5cbd5a42015-03-24 21:55:19 +0000114
Doug Rabson709bc612015-08-25 14:12:00 +0000115cc_toolchain(
116 name = "cc-compiler-freebsd",
117 all_files = ":empty",
118 compiler_files = ":empty",
119 cpu = "local",
120 dwp_files = ":empty",
121 dynamic_runtime_libs = [":empty"],
122 linker_files = ":empty",
123 objcopy_files = ":empty",
124 static_runtime_libs = [":empty"],
125 strip_files = ":empty",
126 supports_param_files = 0,
127)
128
Dmitry Lomov458ccd02016-02-02 20:30:32 +0000129cc_toolchain(
130 name = "cc-compiler-x64_windows",
131 all_files = ":empty",
132 compiler_files = ":empty",
133 cpu = "local",
134 dwp_files = ":empty",
135 dynamic_runtime_libs = [":empty"],
136 linker_files = ":empty",
137 objcopy_files = ":empty",
138 static_runtime_libs = [":empty"],
139 strip_files = ":empty",
140 supports_param_files = 0,
141)
142
Yun Peng114ead32016-04-07 16:39:19 +0000143cc_toolchain(
144 name = "cc-compiler-x64_windows_msvc",
145 all_files = ":every-file-x64_windows",
146 compiler_files = ":compile-x64_windows",
147 cpu = "x64_windows",
148 dwp_files = ":empty",
149 dynamic_runtime_libs = [":empty"],
150 linker_files = ":empty",
151 objcopy_files = ":empty",
152 static_runtime_libs = [":empty"],
153 strip_files = ":empty",
Yun Peng57be3442016-04-25 14:08:41 +0000154 supports_param_files = 1,
Yun Peng114ead32016-04-07 16:39:19 +0000155)
156
157filegroup(
158 name = "every-file-x64_windows",
159 srcs = [
160 ":compile-x64_windows",
161 ],
162)
163
164filegroup(
165 name = "compile-x64_windows",
166 srcs = glob([
167 "wrapper/bin/msvc_*",
168 "wrapper/bin/pydir/msvc*",
169 ]),
170)
171
Damien Martin-Guillerez5cbd5a42015-03-24 21:55:19 +0000172filegroup(
173 name = "srcs",
Damien Martin-Guillerez9b889202016-03-03 00:35:13 +0000174 srcs = glob(["**"]) + ["//tools/cpp/test:srcs"],
Damien Martin-Guillerez5cbd5a42015-03-24 21:55:19 +0000175)
Marcel Hlopko74b94322016-10-11 15:30:49 +0000176
177filegroup(
178 name = "link_dynamic_library",
179 srcs = ["link_dynamic_library.sh"],
180)