blob: 749e2fb032ff7c956034674055482e7636833c27 [file] [log] [blame]
jcaterf5c8c0b2018-03-27 07:22:35 -07001# Copyright 2018 The Bazel Authors. All rights reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15# This becomes the BUILD file for @local_config_cc// under Windows.
16
17package(default_visibility = ["//visibility:public"])
18
rosica71bc38f2019-02-04 02:39:30 -080019load(":cc_toolchain_config.bzl", "cc_toolchain_config")
20
jcaterf5c8c0b2018-03-27 07:22:35 -070021cc_library(
22 name = "malloc",
23)
24
jcaterf5c8c0b2018-03-27 07:22:35 -070025filegroup(
26 name = "empty",
27 srcs = [],
28)
29
30# Hardcoded toolchain, legacy behaviour.
31cc_toolchain_suite(
32 name = "toolchain",
33 toolchains = {
34 "armeabi-v7a|compiler": ":cc-compiler-armeabi-v7a",
35 "x64_windows|msvc-cl": ":cc-compiler-x64_windows",
36 "x64_windows|msys-gcc": ":cc-compiler-x64_windows_msys",
37 "x64_windows|mingw-gcc": ":cc-compiler-x64_windows_mingw",
hlopkoc3fb1db2018-10-09 20:40:58 -070038 "x64_windows_msys": ":cc-compiler-x64_windows_msys",
39 "x64_windows": ":cc-compiler-x64_windows",
rosica547bf422018-09-06 02:10:02 -070040 "armeabi-v7a": ":cc-compiler-armeabi-v7a",
jcaterf5c8c0b2018-03-27 07:22:35 -070041 },
42)
43
44cc_toolchain(
45 name = "cc-compiler-x64_windows_msys",
hlopkoc3fb1db2018-10-09 20:40:58 -070046 toolchain_identifier = "msys_x64",
rosica71bc38f2019-02-04 02:39:30 -080047 toolchain_config = ":msys_x64",
jcaterf5c8c0b2018-03-27 07:22:35 -070048 all_files = ":empty",
Googler28953cb2018-12-05 10:46:00 -080049 ar_files = ":empty",
50 as_files = ":empty",
jcaterf5c8c0b2018-03-27 07:22:35 -070051 compiler_files = ":empty",
jcaterf5c8c0b2018-03-27 07:22:35 -070052 dwp_files = ":empty",
jcaterf5c8c0b2018-03-27 07:22:35 -070053 linker_files = ":empty",
54 objcopy_files = ":empty",
jcaterf5c8c0b2018-03-27 07:22:35 -070055 strip_files = ":empty",
56 supports_param_files = 1,
57)
58
rosica71bc38f2019-02-04 02:39:30 -080059cc_toolchain_config(
60 name = "msys_x64",
61 cpu = "x64_windows",
62 compiler = "msys-gcc",
63)
64
jcaterf5c8c0b2018-03-27 07:22:35 -070065toolchain(
66 name = "cc-toolchain-x64_windows_msys",
67 exec_compatible_with = [
68 "@bazel_tools//platforms:x86_64",
69 "@bazel_tools//platforms:windows",
70 "@bazel_tools//tools/cpp:msys",
71 ],
72 target_compatible_with = [
73 "@bazel_tools//platforms:x86_64",
74 "@bazel_tools//platforms:windows",
75 ],
76 toolchain = ":cc-compiler-x64_windows_msys",
77 toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
78)
79
80cc_toolchain(
81 name = "cc-compiler-x64_windows_mingw",
hlopkoc3fb1db2018-10-09 20:40:58 -070082 toolchain_identifier = "msys_x64_mingw",
rosica71bc38f2019-02-04 02:39:30 -080083 toolchain_config = ":msys_x64_mingw",
jcaterf5c8c0b2018-03-27 07:22:35 -070084 all_files = ":empty",
Googler28953cb2018-12-05 10:46:00 -080085 ar_files = ":empty",
86 as_files = ":empty",
jcaterf5c8c0b2018-03-27 07:22:35 -070087 compiler_files = ":empty",
jcaterf5c8c0b2018-03-27 07:22:35 -070088 dwp_files = ":empty",
jcaterf5c8c0b2018-03-27 07:22:35 -070089 linker_files = ":empty",
90 objcopy_files = ":empty",
jcaterf5c8c0b2018-03-27 07:22:35 -070091 strip_files = ":empty",
92 supports_param_files = 0,
93)
94
rosica71bc38f2019-02-04 02:39:30 -080095cc_toolchain_config(
96 name = "msys_x64_mingw",
97 cpu = "x64_windows",
98 compiler = "mingw-gcc",
99)
100
jcaterf5c8c0b2018-03-27 07:22:35 -0700101toolchain(
102 name = "cc-toolchain-x64_windows_mingw",
103 exec_compatible_with = [
104 "@bazel_tools//platforms:x86_64",
105 "@bazel_tools//platforms:windows",
106 "@bazel_tools//tools/cpp:mingw",
107 ],
108 target_compatible_with = [
109 "@bazel_tools//platforms:x86_64",
110 "@bazel_tools//platforms:windows",
111 ],
112 toolchain = ":cc-compiler-x64_windows_mingw",
113 toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
114)
115
116cc_toolchain(
117 name = "cc-compiler-x64_windows",
hlopkoc3fb1db2018-10-09 20:40:58 -0700118 toolchain_identifier = "msvc_x64",
rosica71bc38f2019-02-04 02:39:30 -0800119 toolchain_config = ":msvc_x64",
Yun Peng5947f472018-07-06 07:00:14 -0700120 all_files = ":empty",
Googler28953cb2018-12-05 10:46:00 -0800121 ar_files = ":empty",
122 as_files = ":empty",
Yun Peng5947f472018-07-06 07:00:14 -0700123 compiler_files = ":empty",
jcaterf5c8c0b2018-03-27 07:22:35 -0700124 dwp_files = ":empty",
jcaterf5c8c0b2018-03-27 07:22:35 -0700125 linker_files = ":empty",
126 objcopy_files = ":empty",
jcaterf5c8c0b2018-03-27 07:22:35 -0700127 strip_files = ":empty",
128 supports_param_files = 1,
129)
130
rosica71bc38f2019-02-04 02:39:30 -0800131cc_toolchain_config(
132 name = "msvc_x64",
133 cpu = "x64_windows",
134 compiler = "msvc-cl",
135)
136
jcaterf5c8c0b2018-03-27 07:22:35 -0700137toolchain(
138 name = "cc-toolchain-x64_windows",
139 exec_compatible_with = [
140 "@bazel_tools//platforms:x86_64",
141 "@bazel_tools//platforms:windows",
142 ],
143 target_compatible_with = [
144 "@bazel_tools//platforms:x86_64",
145 "@bazel_tools//platforms:windows",
146 ],
147 toolchain = ":cc-compiler-x64_windows",
148 toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
149)
150
151cc_toolchain(
152 name = "cc-compiler-armeabi-v7a",
hlopkoc3fb1db2018-10-09 20:40:58 -0700153 toolchain_identifier = "stub_armeabi-v7a",
rosica71bc38f2019-02-04 02:39:30 -0800154 toolchain_config = ":stub_armeabi-v7a",
jcaterf5c8c0b2018-03-27 07:22:35 -0700155 all_files = ":empty",
Googler28953cb2018-12-05 10:46:00 -0800156 ar_files = ":empty",
157 as_files = ":empty",
jcaterf5c8c0b2018-03-27 07:22:35 -0700158 compiler_files = ":empty",
jcaterf5c8c0b2018-03-27 07:22:35 -0700159 dwp_files = ":empty",
jcaterf5c8c0b2018-03-27 07:22:35 -0700160 linker_files = ":empty",
161 objcopy_files = ":empty",
jcaterf5c8c0b2018-03-27 07:22:35 -0700162 strip_files = ":empty",
163 supports_param_files = 1,
164)
165
rosica71bc38f2019-02-04 02:39:30 -0800166cc_toolchain_config(
167 name = "stub_armeabi-v7a",
168 cpu = "armeabi-v7a",
169 compiler = "compiler",
170)
171
jcaterf5c8c0b2018-03-27 07:22:35 -0700172toolchain(
173 name = "cc-toolchain-armeabi-v7a",
174 exec_compatible_with = [
175 ],
176 target_compatible_with = [
177 "@bazel_tools//platforms:arm",
178 "@bazel_tools//platforms:android",
179 ],
180 toolchain = ":cc-compiler-armeabi-v7a",
181 toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
182)
183
jcaterf5c8c0b2018-03-27 07:22:35 -0700184filegroup(
jcaterf5c8c0b2018-03-27 07:22:35 -0700185 name = "link_dynamic_library",
186 srcs = ["link_dynamic_library.sh"],
187)