blob: 7af39c27c0427ac4437a0e9e4062df80d6fb9d48 [file] [log] [blame]
Marat Dukhan08c4a432019-10-03 09:29:21 -07001"""Build definitions and rules for XNNPACK."""
2
3load(":emscripten.bzl", "xnnpack_emscripten_benchmark_linkopts", "xnnpack_emscripten_deps", "xnnpack_emscripten_minimal_linkopts", "xnnpack_emscripten_test_linkopts")
4
5def xnnpack_visibility():
6 """Visibility of :XNNPACK target.
7
8 All other targets have private visibility, and can not have external
9 dependencies.
10 """
Marat Dukhan9d056a42019-10-03 12:13:35 -070011 return ["//visibility:public"]
Marat Dukhan08c4a432019-10-03 09:29:21 -070012
13def xnnpack_min_size_copts():
14 """Compiler flags for size-optimized builds."""
15 return ["-Os"]
16
Marat Dukhan10a38082020-04-17 03:58:35 -070017def xnnpack_gcc_std_copts():
18 """GCC-like compiler flags to specify language standard for C sources."""
Marat Dukhan08c4a432019-10-03 09:29:21 -070019 return ["-std=c99"]
20
Marat Dukhan10a38082020-04-17 03:58:35 -070021def xnnpack_msvc_std_copts():
22 """MSVC compiler flags to specify language standard for C sources."""
23 return ["/Drestrict="]
24
Marat Dukhan08c4a432019-10-03 09:29:21 -070025def xnnpack_std_cxxopts():
26 """Compiler flags to specify language standard for C++ sources."""
27 return ["-std=gnu++11"]
28
29def xnnpack_optional_ruy_copts():
30 """Compiler flags to optionally enable Ruy benchmarks."""
31 return []
32
33def xnnpack_optional_gemmlowp_copts():
34 """Compiler flags to optionally enable Gemmlowp benchmarks."""
35 return []
36
37def xnnpack_optional_tflite_copts():
38 """Compiler flags to optionally enable TensorFlow Lite benchmarks."""
39 return []
40
41def xnnpack_optional_armcl_copts():
42 """Compiler flags to optionally enable ARM ComputeLibrary benchmarks."""
43 return []
44
Marat Dukhan8d3c6932020-03-06 20:27:27 -080045def xnnpack_optional_dnnl_copts():
46 """Compiler flags to optionally enable Intel DNNL benchmarks."""
47 return []
48
Marat Dukhan08c4a432019-10-03 09:29:21 -070049def xnnpack_optional_ruy_deps():
50 """Optional Ruy dependencies."""
51 return []
52
53def xnnpack_optional_gemmlowp_deps():
54 """Optional Gemmlowp dependencies."""
55 return []
56
57def xnnpack_optional_tflite_deps():
58 """Optional TensorFlow Lite dependencies."""
59 return []
60
61def xnnpack_optional_armcl_deps():
62 """Optional ARM ComputeLibrary dependencies."""
63 return []
64
Marat Dukhan8d3c6932020-03-06 20:27:27 -080065def xnnpack_optional_dnnl_deps():
66 """Optional Intel DNNL dependencies."""
67 return []
68
Marat Dukhan08c4a432019-10-03 09:29:21 -070069def xnnpack_cc_library(
70 name,
71 srcs = [],
Marat Dukhan102e9ea2020-12-05 22:35:18 -080072 psimd_srcs = [],
Marat Dukhan08c4a432019-10-03 09:29:21 -070073 x86_srcs = [],
74 aarch32_srcs = [],
75 aarch64_srcs = [],
Marat Dukhancf056b22019-10-07 10:26:29 -070076 wasm_srcs = [],
77 wasmsimd_srcs = [],
Marat Dukhan08c4a432019-10-03 09:29:21 -070078 copts = [],
Marat Dukhan10a38082020-04-17 03:58:35 -070079 gcc_copts = [],
80 msvc_copts = [],
81 mingw_copts = [],
82 msys_copts = [],
83 gcc_x86_copts = [],
84 msvc_x86_32_copts = [],
85 msvc_x86_64_copts = [],
Marat Dukhanbc69ed62020-06-09 21:34:56 -070086 apple_aarch32_copts = [],
Marat Dukhan08c4a432019-10-03 09:29:21 -070087 aarch32_copts = [],
88 aarch64_copts = [],
Marat Dukhancf056b22019-10-07 10:26:29 -070089 wasm_copts = [],
90 wasmsimd_copts = [],
Marat Dukhan08c4a432019-10-03 09:29:21 -070091 optimized_copts = ["-O2"],
92 hdrs = [],
Marat Dukhan10a38082020-04-17 03:58:35 -070093 defines = [],
94 includes = [],
95 deps = [],
96 visibility = []):
Marat Dukhancf056b22019-10-07 10:26:29 -070097 """C/C++/assembly library with architecture-specific configuration.
Marat Dukhan08c4a432019-10-03 09:29:21 -070098
99 Define a static library with architecture- and instruction-specific
Marat Dukhancf056b22019-10-07 10:26:29 -0700100 source files and/or compiler flags.
Marat Dukhan08c4a432019-10-03 09:29:21 -0700101
102 Args:
103 name: The name of the library target to define.
104 srcs: The list of architecture-independent source files.
Marat Dukhan102e9ea2020-12-05 22:35:18 -0800105 psimd_srcs: The list of psimd-specific source files.
Marat Dukhan08c4a432019-10-03 09:29:21 -0700106 x86_srcs: The list of x86-specific source files.
107 aarch32_srcs: The list of AArch32-specific source files.
108 aarch64_srcs: The list of AArch64-specific source files.
Marat Dukhancf056b22019-10-07 10:26:29 -0700109 wasm_srcs: The list of WebAssembly/MVP-specific source files.
110 wasmsimd_srcs: The list of WebAssembly/SIMD-specific source files.
Marat Dukhan08c4a432019-10-03 09:29:21 -0700111 copts: The list of compiler flags to use in all builds. -I flags for
112 include/ and src/ directories of XNNPACK are always prepended
113 before these user-specified flags.
Marat Dukhan10a38082020-04-17 03:58:35 -0700114 gcc_copts: The list of compiler flags to use with GCC-like compilers.
115 msvc_copts: The list of compiler flags to use with MSVC compiler.
116 mingw_copts: The list of compiler flags to use with MinGW GCC compilers.
Marat Dukhanbc69ed62020-06-09 21:34:56 -0700117 msys_copts: The list of compiler flags to use with MSYS (Cygwin) GCC
118 compilers.
119 gcc_x86_copts: The list of GCC-like compiler flags to use in x86 (32-bit
120 and 64-bit) builds.
121 msvc_x86_32_copts: The list of MSVC compiler flags to use in x86 (32-bit)
122 builds.
123 msvc_x86_64_copts: The list of MSVC compiler flags to use in x86 (64-bit)
124 builds.
125 apple_aarch32_copts: The list of compiler flags to use in AArch32 builds
126 with Apple Clang.
Marat Dukhan08c4a432019-10-03 09:29:21 -0700127 aarch32_copts: The list of compiler flags to use in AArch32 builds.
128 aarch64_copts: The list of compiler flags to use in AArch64 builds.
Marat Dukhancf056b22019-10-07 10:26:29 -0700129 wasm_copts: The list of compiler flags to use in WebAssembly/MVP builds.
130 wasmsimd_copts: The list of compiler flags to use in WebAssembly/SIMD
131 builds.
Marat Dukhan08c4a432019-10-03 09:29:21 -0700132 optimized_copts: The list of compiler flags to use in optimized builds.
133 Defaults to -O2.
134 hdrs: The list of header files published by this library to be textually
135 included by sources in dependent rules.
Marat Dukhan10a38082020-04-17 03:58:35 -0700136 defines: List of predefines macros to be added to the compile line.
137 includes: List of include dirs to be added to the compile line.
Marat Dukhan08c4a432019-10-03 09:29:21 -0700138 deps: The list of other libraries to be linked.
Marat Dukhan10a38082020-04-17 03:58:35 -0700139 visibility: The list of packages that can depend on this target.
Marat Dukhan08c4a432019-10-03 09:29:21 -0700140 """
141 native.cc_library(
142 name = name,
143 srcs = srcs + select({
Marat Dukhan102e9ea2020-12-05 22:35:18 -0800144 ":linux_k8": psimd_srcs + x86_srcs,
145 ":linux_arm": psimd_srcs + aarch32_srcs,
146 ":linux_armeabi": psimd_srcs + aarch32_srcs,
147 ":linux_armhf": psimd_srcs + aarch32_srcs,
148 ":linux_armv7a": psimd_srcs + aarch32_srcs,
149 ":linux_aarch64": psimd_srcs + aarch64_srcs,
150 ":macos_x86_64": psimd_srcs + x86_srcs,
151 ":windows_x86_64_clang": psimd_srcs + x86_srcs,
152 ":windows_x86_64_mingw": psimd_srcs + x86_srcs,
153 ":windows_x86_64_msys": psimd_srcs + x86_srcs,
Marat Dukhan10a38082020-04-17 03:58:35 -0700154 ":windows_x86_64": x86_srcs,
Marat Dukhan102e9ea2020-12-05 22:35:18 -0800155 ":android_armv7": psimd_srcs + aarch32_srcs,
156 ":android_arm64": psimd_srcs + aarch64_srcs,
157 ":android_x86": psimd_srcs + x86_srcs,
158 ":android_x86_64": psimd_srcs + x86_srcs,
159 ":ios_armv7": psimd_srcs + aarch32_srcs,
160 ":ios_arm64": psimd_srcs + aarch64_srcs,
161 ":ios_arm64e": psimd_srcs + aarch64_srcs,
162 ":ios_x86": psimd_srcs + x86_srcs,
163 ":ios_x86_64": psimd_srcs + x86_srcs,
164 ":watchos_armv7k": psimd_srcs + aarch32_srcs,
165 ":watchos_arm64_32": psimd_srcs + aarch64_srcs,
166 ":watchos_x86": psimd_srcs + x86_srcs,
167 ":watchos_x86_64": psimd_srcs + x86_srcs,
168 ":tvos_arm64": psimd_srcs + aarch64_srcs,
169 ":tvos_x86_64": psimd_srcs + x86_srcs,
Marat Dukhancf056b22019-10-07 10:26:29 -0700170 ":emscripten_wasm": wasm_srcs,
Marat Dukhan102e9ea2020-12-05 22:35:18 -0800171 ":emscripten_wasmsimd": psimd_srcs + wasmsimd_srcs,
Marat Dukhan08c4a432019-10-03 09:29:21 -0700172 "//conditions:default": [],
173 }),
174 copts = [
175 "-Iinclude",
176 "-Isrc",
177 ] + copts + select({
Marat Dukhan10a38082020-04-17 03:58:35 -0700178 ":linux_k8": gcc_x86_copts,
Marat Dukhan582094e2020-04-30 17:21:25 -0700179 ":linux_arm": aarch32_copts,
Marat Dukhanf0bd4de2020-06-15 15:53:19 -0700180 ":linux_armeabi": aarch32_copts,
Terry Heo68eef3f2020-04-13 22:53:52 -0700181 ":linux_armhf": aarch32_copts,
Marat Dukhan24567892020-06-10 13:15:48 -0700182 ":linux_armv7a": aarch32_copts,
Marat Dukhan582094e2020-04-30 17:21:25 -0700183 ":linux_aarch64": aarch64_copts,
Marat Dukhan10a38082020-04-17 03:58:35 -0700184 ":macos_x86_64": gcc_x86_copts,
185 ":windows_x86_64_clang": ["/clang:" + opt for opt in gcc_x86_copts],
186 ":windows_x86_64_mingw": mingw_copts + gcc_x86_copts,
187 ":windows_x86_64_msys": msys_copts + gcc_x86_copts,
188 ":windows_x86_64": msvc_x86_64_copts,
Marat Dukhan08c4a432019-10-03 09:29:21 -0700189 ":android_armv7": aarch32_copts,
190 ":android_arm64": aarch64_copts,
Marat Dukhan10a38082020-04-17 03:58:35 -0700191 ":android_x86": gcc_x86_copts,
192 ":android_x86_64": gcc_x86_copts,
Marat Dukhanbc69ed62020-06-09 21:34:56 -0700193 ":ios_armv7": apple_aarch32_copts,
Marat Dukhan1498d1d2020-02-11 20:00:05 -0800194 ":ios_arm64": aarch64_copts,
195 ":ios_arm64e": aarch64_copts,
Marat Dukhan10a38082020-04-17 03:58:35 -0700196 ":ios_x86": gcc_x86_copts,
197 ":ios_x86_64": gcc_x86_copts,
Marat Dukhanbc69ed62020-06-09 21:34:56 -0700198 ":watchos_armv7k": apple_aarch32_copts,
Marat Dukhan1498d1d2020-02-11 20:00:05 -0800199 ":watchos_arm64_32": aarch64_copts,
Marat Dukhan10a38082020-04-17 03:58:35 -0700200 ":watchos_x86": gcc_x86_copts,
201 ":watchos_x86_64": gcc_x86_copts,
Marat Dukhan1498d1d2020-02-11 20:00:05 -0800202 ":tvos_arm64": aarch64_copts,
Marat Dukhan10a38082020-04-17 03:58:35 -0700203 ":tvos_x86_64": gcc_x86_copts,
Marat Dukhancf056b22019-10-07 10:26:29 -0700204 ":emscripten_wasm": wasm_copts,
205 ":emscripten_wasmsimd": wasmsimd_copts,
Marat Dukhan08c4a432019-10-03 09:29:21 -0700206 "//conditions:default": [],
207 }) + select({
Marat Dukhan10a38082020-04-17 03:58:35 -0700208 ":windows_x86_64_clang": ["/clang:" + opt for opt in gcc_copts],
209 ":windows_x86_64_mingw": gcc_copts,
210 ":windows_x86_64_msys": gcc_copts,
211 ":windows_x86_64": msvc_copts,
212 "//conditions:default": gcc_copts,
213 }) + select({
Marat Dukhan08c4a432019-10-03 09:29:21 -0700214 ":optimized_build": optimized_copts,
215 "//conditions:default": [],
216 }),
Marat Dukhan10a38082020-04-17 03:58:35 -0700217 defines = defines,
218 deps = deps,
219 includes = ["include", "src"] + includes,
Marat Dukhan08c4a432019-10-03 09:29:21 -0700220 linkstatic = True,
221 linkopts = select({
222 ":linux_k8": ["-lpthread"],
Marat Dukhan582094e2020-04-30 17:21:25 -0700223 ":linux_arm": ["-lpthread"],
Marat Dukhanf0bd4de2020-06-15 15:53:19 -0700224 ":linux_armeabi": ["-lpthread"],
Terry Heo68eef3f2020-04-13 22:53:52 -0700225 ":linux_armhf": ["-lpthread"],
Marat Dukhan24567892020-06-10 13:15:48 -0700226 ":linux_armv7a": ["-lpthread"],
Marat Dukhan582094e2020-04-30 17:21:25 -0700227 ":linux_aarch64": ["-lpthread"],
Marat Dukhan08c4a432019-10-03 09:29:21 -0700228 ":android": ["-lm"],
229 "//conditions:default": [],
230 }),
231 textual_hdrs = hdrs,
Marat Dukhan10a38082020-04-17 03:58:35 -0700232 visibility = visibility,
Marat Dukhan08c4a432019-10-03 09:29:21 -0700233 )
234
235def xnnpack_aggregate_library(
236 name,
237 generic_deps = [],
Marat Dukhan102e9ea2020-12-05 22:35:18 -0800238 psimd_deps = [],
Marat Dukhan08c4a432019-10-03 09:29:21 -0700239 x86_deps = [],
240 aarch32_deps = [],
241 aarch64_deps = [],
242 wasm_deps = [],
243 wasmsimd_deps = []):
244 """Static library that aggregates architecture-specific dependencies.
245
246 Args:
247 name: The name of the library target to define.
248 generic_deps: The list of libraries to link on all architectures.
Marat Dukhan102e9ea2020-12-05 22:35:18 -0800249 psimd_deps: The list of libraries to link in psimd-enabled builds.
Marat Dukhan08c4a432019-10-03 09:29:21 -0700250 x86_deps: The list of libraries to link in x86 and x86-64 builds.
251 aarch32_deps: The list of libraries to link in AArch32 builds.
252 aarch64_deps: The list of libraries to link in AArch32 builds.
253 wasm_deps: The list of libraries to link in WebAssembly (MVP) builds.
254 wasmsimd_deps: The list of libraries to link in WebAssembly SIMD builds.
255 """
256
257 native.cc_library(
258 name = name,
259 linkstatic = True,
260 deps = generic_deps + select({
Marat Dukhan102e9ea2020-12-05 22:35:18 -0800261 ":linux_k8": psimd_deps + x86_deps,
262 ":linux_arm": psimd_deps + aarch32_deps,
263 ":linux_armeabi": psimd_deps + aarch32_deps,
264 ":linux_armhf": psimd_deps + aarch32_deps,
265 ":linux_armv7a": psimd_deps + aarch32_deps,
266 ":linux_aarch64": psimd_deps + aarch64_deps,
267 ":macos_x86_64": psimd_deps + x86_deps,
268 ":windows_x86_64_clang": psimd_deps + x86_deps,
269 ":windows_x86_64_mingw": psimd_deps + x86_deps,
270 ":windows_x86_64_msys": psimd_deps + x86_deps,
Marat Dukhan10a38082020-04-17 03:58:35 -0700271 ":windows_x86_64": x86_deps,
Marat Dukhan102e9ea2020-12-05 22:35:18 -0800272 ":android_armv7": psimd_deps + aarch32_deps,
273 ":android_arm64": psimd_deps + aarch64_deps,
274 ":android_x86": psimd_deps + x86_deps,
275 ":android_x86_64": psimd_deps + x86_deps,
276 ":ios_armv7": psimd_deps + aarch32_deps,
277 ":ios_arm64": psimd_deps + aarch64_deps,
278 ":ios_arm64e": psimd_deps + aarch64_deps,
279 ":ios_x86": psimd_deps + x86_deps,
280 ":ios_x86_64": psimd_deps + x86_deps,
281 ":watchos_armv7k": psimd_deps + aarch32_deps,
282 ":watchos_arm64_32": psimd_deps + aarch64_deps,
283 ":watchos_x86": psimd_deps + x86_deps,
284 ":watchos_x86_64": psimd_deps + x86_deps,
285 ":tvos_arm64": psimd_deps + aarch64_deps,
286 ":tvos_x86_64": psimd_deps + x86_deps,
Marat Dukhan08c4a432019-10-03 09:29:21 -0700287 ":emscripten_wasm": wasm_deps,
Marat Dukhan102e9ea2020-12-05 22:35:18 -0800288 ":emscripten_wasmsimd": psimd_deps + wasmsimd_deps,
Marat Dukhan08c4a432019-10-03 09:29:21 -0700289 }),
290 )
291
Artsiom Ablavatskic1aa2972020-12-08 11:23:34 -0800292def xnnpack_unit_test(name, srcs, copts = [], mingw_copts = [], msys_copts = [], deps = [], tags = [], automatic = True, timeout = "short"):
Marat Dukhan08c4a432019-10-03 09:29:21 -0700293 """Unit test binary based on Google Test.
294
295 Args:
296 name: The name of the test target to define.
297 srcs: The list of source and header files.
298 copts: The list of additional compiler flags for the target. -I flags
299 for include/ and src/ directories of XNNPACK are always prepended
300 before these user-specified flags.
Marat Dukhan10a38082020-04-17 03:58:35 -0700301 mingw_copts: The list of compiler flags to use with MinGW GCC compilers.
302 msys_copts: The list of compiler flags to use with MSYS (Cygwin) GCC compilers.
Marat Dukhan08c4a432019-10-03 09:29:21 -0700303 deps: The list of additional libraries to be linked. Google Test library
304 (with main() function) is always added as a dependency and does not
305 need to be explicitly specified.
Artsiom Ablavatskic1aa2972020-12-08 11:23:34 -0800306 tags: List of arbitrary text tags.
307 automatic: Whether to create the test or testable binary.
308 timeout: How long the test is expected to run before returning.
Marat Dukhan08c4a432019-10-03 09:29:21 -0700309 """
310
Marat Dukhan22eed3d2020-05-11 20:13:37 -0700311 if automatic:
312 native.cc_test(
313 name = name,
314 srcs = srcs,
315 copts = xnnpack_std_cxxopts() + [
316 "-Iinclude",
317 "-Isrc",
318 ] + select({
319 ":windows_x86_64_mingw": mingw_copts,
320 ":windows_x86_64_msys": msys_copts,
321 "//conditions:default": [],
322 }) + select({
323 ":windows_x86_64_clang": ["/clang:-Wno-unused-function"],
324 ":windows_x86_64_mingw": ["-Wno-unused-function"],
325 ":windows_x86_64_msys": ["-Wno-unused-function"],
326 ":windows_x86_64": [],
327 "//conditions:default": ["-Wno-unused-function"],
328 }) + copts,
329 linkopts = select({
330 ":emscripten": xnnpack_emscripten_test_linkopts(),
331 "//conditions:default": [],
332 }),
333 linkstatic = True,
334 deps = [
335 "@com_google_googletest//:gtest_main",
336 ] + deps + select({
337 ":emscripten": xnnpack_emscripten_deps(),
338 "//conditions:default": [],
339 }),
340 tags = tags,
Artsiom Ablavatskic1aa2972020-12-08 11:23:34 -0800341 timeout = timeout,
Marat Dukhan22eed3d2020-05-11 20:13:37 -0700342 )
343 else:
344 native.cc_binary(
345 name = name,
346 srcs = srcs,
347 copts = xnnpack_std_cxxopts() + [
348 "-Iinclude",
349 "-Isrc",
350 ] + select({
351 ":windows_x86_64_mingw": mingw_copts,
352 ":windows_x86_64_msys": msys_copts,
353 "//conditions:default": [],
354 }) + select({
355 ":windows_x86_64_clang": ["/clang:-Wno-unused-function"],
356 ":windows_x86_64_mingw": ["-Wno-unused-function"],
357 ":windows_x86_64_msys": ["-Wno-unused-function"],
358 ":windows_x86_64": [],
359 "//conditions:default": ["-Wno-unused-function"],
360 }) + copts,
361 linkopts = select({
362 ":emscripten": xnnpack_emscripten_test_linkopts(),
363 "//conditions:default": [],
364 }),
365 linkstatic = True,
366 deps = [
367 "@com_google_googletest//:gtest_main",
368 ] + deps + select({
369 ":emscripten": xnnpack_emscripten_deps(),
370 "//conditions:default": [],
371 }),
372 testonly = True,
373 tags = tags,
374 )
Marat Dukhan08c4a432019-10-03 09:29:21 -0700375
376def xnnpack_binary(name, srcs, copts = [], deps = []):
377 """Minimal binary
378
379 Args:
380 name: The name of the binary target to define.
381 srcs: The list of source and header files.
382 copts: The list of additional compiler flags for the target. -I flags
383 for include/ and src/ directories of XNNPACK are always prepended
384 before these user-specified flags.
385 deps: The list of libraries to be linked.
386 """
387 native.cc_binary(
388 name = name,
389 srcs = srcs,
390 copts = [
391 "-Iinclude",
392 "-Isrc",
393 ] + copts,
394 linkopts = select({
395 ":emscripten": xnnpack_emscripten_minimal_linkopts(),
396 "//conditions:default": [],
397 }),
398 linkstatic = True,
399 deps = deps,
400 )
401
Marat Dukhana98efa12020-05-04 17:07:49 -0700402def xnnpack_benchmark(name, srcs, copts = [], deps = [], tags = []):
Marat Dukhan08c4a432019-10-03 09:29:21 -0700403 """Microbenchmark binary based on Google Benchmark
404
405 Args:
406 name: The name of the binary target to define.
407 srcs: The list of source and header files.
408 copts: The list of additional compiler flags for the target. -I flags
409 for include/ and src/ directories of XNNPACK are always prepended
410 before these user-specified flags.
411 deps: The list of additional libraries to be linked. Google Benchmark
412 library is always added as a dependency and does not need to be
413 explicitly specified.
414 """
415 native.cc_binary(
416 name = name,
417 srcs = srcs,
418 copts = xnnpack_std_cxxopts() + [
419 "-Iinclude",
420 "-Isrc",
Marat Dukhana98efa12020-05-04 17:07:49 -0700421 ] + select({
422 ":windows_x86_64_clang": ["/clang:-Wno-unused-function"],
423 ":windows_x86_64_mingw": ["-Wno-unused-function"],
424 ":windows_x86_64_msys": ["-Wno-unused-function"],
425 ":windows_x86_64": [],
426 "//conditions:default": ["-Wno-unused-function"],
427 }) + copts,
Marat Dukhan08c4a432019-10-03 09:29:21 -0700428 linkopts = select({
429 ":emscripten": xnnpack_emscripten_benchmark_linkopts(),
Marat Dukhan10a38082020-04-17 03:58:35 -0700430 ":windows_x86_64_mingw": ["-lshlwapi"],
431 ":windows_x86_64_msys": ["-lshlwapi"],
Marat Dukhan08c4a432019-10-03 09:29:21 -0700432 "//conditions:default": [],
433 }),
434 linkstatic = True,
435 deps = [
436 "@com_google_benchmark//:benchmark",
437 ] + deps + select({
438 ":emscripten": xnnpack_emscripten_deps(),
439 "//conditions:default": [],
440 }),
Marat Dukhan8ea0b072020-04-23 16:12:18 -0700441 tags = tags,
Marat Dukhan08c4a432019-10-03 09:29:21 -0700442 )