blob: 6281a05e75491406e0dabd50ec3306a89164b882 [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
19cc_library(
20 name = "malloc",
21)
22
23cc_library(
24 name = "stl",
25)
26
27filegroup(
28 name = "empty",
29 srcs = [],
30)
31
32# Hardcoded toolchain, legacy behaviour.
33cc_toolchain_suite(
34 name = "toolchain",
35 toolchains = {
36 "armeabi-v7a|compiler": ":cc-compiler-armeabi-v7a",
37 "x64_windows|msvc-cl": ":cc-compiler-x64_windows",
38 "x64_windows|msys-gcc": ":cc-compiler-x64_windows_msys",
39 "x64_windows|mingw-gcc": ":cc-compiler-x64_windows_mingw",
40 "ios_x86_64|compiler": ":cc-compiler-ios_x86_64",
41 },
42)
43
44cc_toolchain(
45 name = "cc-compiler-x64_windows_msys",
46 all_files = ":empty",
47 compiler_files = ":empty",
48 cpu = "local",
49 dwp_files = ":empty",
50 dynamic_runtime_libs = [":empty"],
51 linker_files = ":empty",
52 objcopy_files = ":empty",
53 static_runtime_libs = [":empty"],
54 strip_files = ":empty",
55 supports_param_files = 1,
56)
57
58toolchain(
59 name = "cc-toolchain-x64_windows_msys",
60 exec_compatible_with = [
61 "@bazel_tools//platforms:x86_64",
62 "@bazel_tools//platforms:windows",
63 "@bazel_tools//tools/cpp:msys",
64 ],
65 target_compatible_with = [
66 "@bazel_tools//platforms:x86_64",
67 "@bazel_tools//platforms:windows",
68 ],
69 toolchain = ":cc-compiler-x64_windows_msys",
70 toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
71)
72
73cc_toolchain(
74 name = "cc-compiler-x64_windows_mingw",
75 all_files = ":empty",
76 compiler_files = ":empty",
77 cpu = "x64_windows",
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",
84 supports_param_files = 0,
85)
86
87toolchain(
88 name = "cc-toolchain-x64_windows_mingw",
89 exec_compatible_with = [
90 "@bazel_tools//platforms:x86_64",
91 "@bazel_tools//platforms:windows",
92 "@bazel_tools//tools/cpp:mingw",
93 ],
94 target_compatible_with = [
95 "@bazel_tools//platforms:x86_64",
96 "@bazel_tools//platforms:windows",
97 ],
98 toolchain = ":cc-compiler-x64_windows_mingw",
99 toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
100)
101
102cc_toolchain(
103 name = "cc-compiler-x64_windows",
104 all_files = ":every-file-x64_windows",
105 compiler_files = ":compile-x64_windows",
106 cpu = "x64_windows",
107 dwp_files = ":empty",
108 dynamic_runtime_libs = [":empty"],
109 linker_files = ":empty",
110 objcopy_files = ":empty",
111 static_runtime_libs = [":empty"],
112 strip_files = ":empty",
113 supports_param_files = 1,
114)
115
116toolchain(
117 name = "cc-toolchain-x64_windows",
118 exec_compatible_with = [
119 "@bazel_tools//platforms:x86_64",
120 "@bazel_tools//platforms:windows",
121 ],
122 target_compatible_with = [
123 "@bazel_tools//platforms:x86_64",
124 "@bazel_tools//platforms:windows",
125 ],
126 toolchain = ":cc-compiler-x64_windows",
127 toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
128)
129
130cc_toolchain(
131 name = "cc-compiler-armeabi-v7a",
132 all_files = ":empty",
133 compiler_files = ":empty",
134 cpu = "local",
135 dwp_files = ":empty",
136 dynamic_runtime_libs = [":empty"],
137 linker_files = ":empty",
138 objcopy_files = ":empty",
139 static_runtime_libs = [":empty"],
140 strip_files = ":empty",
141 supports_param_files = 1,
142)
143
144toolchain(
145 name = "cc-toolchain-armeabi-v7a",
146 exec_compatible_with = [
147 ],
148 target_compatible_with = [
149 "@bazel_tools//platforms:arm",
150 "@bazel_tools//platforms:android",
151 ],
152 toolchain = ":cc-compiler-armeabi-v7a",
153 toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
154)
155
156cc_toolchain(
157 name = "cc-compiler-ios_x86_64",
158 all_files = ":empty",
159 compiler_files = ":empty",
160 cpu = "local",
161 dwp_files = ":empty",
162 dynamic_runtime_libs = [":empty"],
163 linker_files = ":empty",
164 objcopy_files = ":empty",
165 static_runtime_libs = [":empty"],
166 strip_files = ":empty",
167 supports_param_files = 0,
168)
169
170toolchain(
171 name = "cc-toolchain-ios_x86_64",
172 exec_compatible_with = [
173 ],
174 target_compatible_with = [
175 "@bazel_tools//platforms:x86_64",
176 "@bazel_tools//platforms:ios",
177 ],
178 toolchain = ":cc-compiler-ios_x86_64",
179 toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
180)
181
182filegroup(
183 name = "every-file-x64_windows",
184 srcs = [
185 ":compile-x64_windows",
186 ],
187)
188
189filegroup(
190 name = "compile-x64_windows",
191 srcs = glob([
192 "wrapper/bin/msvc_*",
193 "wrapper/bin/pydir/msvc*",
194 ]),
195)
196
197filegroup(
198 name = "link_dynamic_library",
199 srcs = ["link_dynamic_library.sh"],
200)