1# 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 17load("@rules_cc//cc:cc_library.bzl", "cc_library") 18load("@rules_cc//cc/toolchains:cc_toolchain.bzl", "cc_toolchain") 19load("@rules_cc//cc/toolchains:cc_toolchain_suite.bzl", "cc_toolchain_suite") 20load(":windows_cc_toolchain_config.bzl", "cc_toolchain_config") 21load(":armeabi_cc_toolchain_config.bzl", "armeabi_cc_toolchain_config") 22 23package(default_visibility = ["//visibility:public"]) 24 25cc_library(name = "empty_lib") 26 27# Label flag for extra libraries to be linked into every binary. 28# TODO(bazel-team): Support passing flag multiple times to build a list. 29label_flag( 30 name = "link_extra_libs", 31 build_setting_default = ":empty_lib", 32) 33 34# The final extra library to be linked into every binary target. This collects 35# the above flag, but may also include more libraries depending on config. 36cc_library( 37 name = "link_extra_lib", 38 deps = [ 39 ":link_extra_libs", 40 ], 41) 42 43cc_library( 44 name = "malloc", 45) 46 47filegroup( 48 name = "empty", 49 srcs = [], 50) 51 52filegroup( 53 name = "mingw_compiler_files", 54 srcs = [":builtin_include_directory_paths_mingw"] 55) 56 57filegroup( 58 name = "clangcl_compiler_files", 59 srcs = [":builtin_include_directory_paths_clangcl"] 60) 61 62filegroup( 63 name = "msvc_compiler_files", 64 srcs = [ 65 ":builtin_include_directory_paths_msvc", 66 "%{msvc_deps_scanner_wrapper_path_x86}", 67 "%{msvc_deps_scanner_wrapper_path_x64}", 68 "%{msvc_deps_scanner_wrapper_path_arm}", 69 "%{msvc_deps_scanner_wrapper_path_arm64}", 70 ] 71) 72 73# Hardcoded toolchain, legacy behaviour. 74cc_toolchain_suite( 75 name = "toolchain", 76 toolchains = { 77 "armeabi-v7a|compiler": ":cc-compiler-armeabi-v7a", 78 "x64_windows|msvc-cl": ":cc-compiler-x64_windows", 79 "x64_x86_windows|msvc-cl": ":cc-compiler-x64_x86_windows", 80 "x64_arm_windows|msvc-cl": ":cc-compiler-x64_arm_windows", 81 "x64_arm64_windows|msvc-cl": ":cc-compiler-arm64_windows", 82 "arm64_windows|msvc-cl": ":cc-compiler-arm64_windows", 83 "x64_windows|msys-gcc": ":cc-compiler-x64_windows_msys", 84 "x64_x86_windows|msys-gcc": ":cc-compiler-x64_x86_windows_msys", 85 "x64_windows|mingw-gcc": ":cc-compiler-x64_windows_mingw", 86 "x64_x86_windows|mingw-gcc": ":cc-compiler-x64_x86_windows_mingw", 87 "x64_windows|clang-cl": ":cc-compiler-x64_windows-clang-cl", 88 "x64_windows_msys": ":cc-compiler-x64_windows_msys", 89 "x64_windows": ":cc-compiler-x64_windows", 90 "x64_x86_windows": ":cc-compiler-x64_x86_windows", 91 "x64_arm_windows": ":cc-compiler-x64_arm_windows", 92 "x64_arm64_windows": ":cc-compiler-arm64_windows", 93 "arm64_windows": ":cc-compiler-arm64_windows", 94 "x64_arm64_windows|clang-cl": ":cc-compiler-arm64_windows-clang-cl", 95 "arm64_windows|clang-cl": ":cc-compiler-arm64_windows-clang-cl", 96 "armeabi-v7a": ":cc-compiler-armeabi-v7a", 97 }, 98) 99 100cc_toolchain( 101 name = "cc-compiler-x64_windows_msys", 102 toolchain_identifier = "msys_x64", 103 toolchain_config = ":msys_x64", 104 all_files = ":empty", 105 ar_files = ":empty", 106 as_files = ":mingw_compiler_files", 107 compiler_files = ":mingw_compiler_files", 108 dwp_files = ":empty", 109 linker_files = ":empty", 110 objcopy_files = ":empty", 111 strip_files = ":empty", 112 supports_param_files = 1, 113) 114 115cc_toolchain_config( 116 name = "msys_x64", 117 cpu = "x64_windows", 118 compiler = "msys-gcc", 119 host_system_name = "local", 120 target_system_name = "local", 121 target_libc = "msys", 122 abi_version = "local", 123 abi_libc_version = "local", 124 cxx_builtin_include_directories = [%{cxx_builtin_include_directories}], 125 tool_paths = {%{tool_paths}}, 126 tool_bin_path = "%{tool_bin_path}", 127) 128 129toolchain( 130 name = "cc-toolchain-x64_windows_msys", 131 exec_compatible_with = [ 132 "@platforms//cpu:x86_64", 133 "@platforms//os:windows", 134 "@rules_cc//cc/private/toolchain:msys", 135 ], 136 target_compatible_with = [ 137 "@platforms//cpu:x86_64", 138 "@platforms//os:windows", 139 ], 140 toolchain = ":cc-compiler-x64_windows_msys", 141 toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", 142) 143 144cc_toolchain( 145 name = "cc-compiler-x64_x86_windows_msys", 146 toolchain_identifier = "msys_x64_x86", 147 toolchain_config = ":msys_x64_x86", 148 all_files = ":empty", 149 ar_files = ":empty", 150 as_files = ":mingw_compiler_files", 151 compiler_files = ":mingw_compiler_files", 152 dwp_files = ":empty", 153 linker_files = ":empty", 154 objcopy_files = ":empty", 155 strip_files = ":empty", 156 supports_param_files = 1, 157) 158 159cc_toolchain_config( 160 name = "msys_x64_x86", 161 cpu = "x64_x86_windows", 162 compiler = "msys-gcc", 163 host_system_name = "local", 164 target_system_name = "local", 165 target_libc = "msys", 166 abi_version = "local", 167 abi_libc_version = "local", 168 cxx_builtin_include_directories = [%{cxx_builtin_include_directories}], 169 tool_paths = {%{tool_paths}}, 170 tool_bin_path = "%{tool_bin_path}", 171 default_compile_flags = ["-m32"], 172 default_link_flags = ["-m32"], 173) 174 175toolchain( 176 name = "cc-toolchain-x64_x86_windows_msys", 177 exec_compatible_with = [ 178 "@platforms//cpu:x86_64", 179 "@platforms//os:windows", 180 "@rules_cc//cc/private/toolchain:msys", 181 ], 182 target_compatible_with = [ 183 "@platforms//cpu:x86_32", 184 "@platforms//os:windows", 185 ], 186 toolchain = ":cc-compiler-x64_x86_windows_msys", 187 toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", 188) 189 190cc_toolchain( 191 name = "cc-compiler-x64_windows_mingw", 192 toolchain_identifier = "msys_x64_mingw", 193 toolchain_config = ":msys_x64_mingw", 194 all_files = ":empty", 195 ar_files = ":empty", 196 as_files = ":mingw_compiler_files", 197 compiler_files = ":mingw_compiler_files", 198 dwp_files = ":empty", 199 linker_files = ":empty", 200 objcopy_files = ":empty", 201 strip_files = ":empty", 202 supports_param_files = 0, 203) 204 205cc_toolchain_config( 206 name = "msys_x64_mingw", 207 cpu = "x64_windows", 208 compiler = "mingw-gcc", 209 host_system_name = "local", 210 target_system_name = "local", 211 target_libc = "mingw", 212 abi_version = "local", 213 abi_libc_version = "local", 214 tool_bin_path = "%{mingw_tool_bin_path}", 215 cxx_builtin_include_directories = [%{mingw_cxx_builtin_include_directories}], 216 tool_paths = {%{mingw_tool_paths}}, 217) 218 219toolchain( 220 name = "cc-toolchain-x64_windows_mingw", 221 exec_compatible_with = [ 222 "@platforms//cpu:x86_64", 223 "@platforms//os:windows", 224 "@rules_cc//cc/private/toolchain:mingw", 225 ], 226 target_compatible_with = [ 227 "@platforms//cpu:x86_64", 228 "@platforms//os:windows", 229 ], 230 toolchain = ":cc-compiler-x64_windows_mingw", 231 toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", 232) 233 234cc_toolchain( 235 name = "cc-compiler-x64_x86_windows_mingw", 236 toolchain_identifier = "msys_x64_x86_mingw", 237 toolchain_config = ":msys_x64_x86_mingw", 238 all_files = ":empty", 239 ar_files = ":empty", 240 as_files = ":mingw_compiler_files", 241 compiler_files = ":mingw_compiler_files", 242 dwp_files = ":empty", 243 linker_files = ":empty", 244 objcopy_files = ":empty", 245 strip_files = ":empty", 246 supports_param_files = 0, 247) 248 249cc_toolchain_config( 250 name = "msys_x64_x86_mingw", 251 cpu = "x64_x86_windows", 252 compiler = "mingw-gcc", 253 host_system_name = "local", 254 target_system_name = "local", 255 target_libc = "mingw", 256 abi_version = "local", 257 abi_libc_version = "local", 258 tool_bin_path = "%{mingw_tool_bin_path}", 259 cxx_builtin_include_directories = [%{mingw_cxx_builtin_include_directories}], 260 tool_paths = {%{mingw_tool_paths}}, 261 default_compile_flags = ["-m32"], 262 default_link_flags = ["-m32"], 263) 264 265toolchain( 266 name = "cc-toolchain-x64_x86_windows_mingw", 267 exec_compatible_with = [ 268 "@platforms//cpu:x86_64", 269 "@platforms//os:windows", 270 "@rules_cc//cc/private/toolchain:mingw", 271 ], 272 target_compatible_with = [ 273 "@platforms//cpu:x86_32", 274 "@platforms//os:windows", 275 ], 276 toolchain = ":cc-compiler-x64_x86_windows_mingw", 277 toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", 278) 279 280cc_toolchain( 281 name = "cc-compiler-x64_windows", 282 toolchain_identifier = "msvc_x64", 283 toolchain_config = ":msvc_x64", 284 all_files = ":empty", 285 ar_files = ":empty", 286 as_files = ":msvc_compiler_files", 287 compiler_files = ":msvc_compiler_files", 288 dwp_files = ":empty", 289 linker_files = ":empty", 290 objcopy_files = ":empty", 291 strip_files = ":empty", 292 supports_param_files = 1, 293) 294 295cc_toolchain_config( 296 name = "msvc_x64", 297 cpu = "x64_windows", 298 compiler = "msvc-cl", 299 host_system_name = "local", 300 target_system_name = "local", 301 target_libc = "msvcrt", 302 abi_version = "local", 303 abi_libc_version = "local", 304 toolchain_identifier = "msvc_x64", 305 msvc_env_tmp = "%{msvc_env_tmp_x64}", 306 msvc_env_path = "%{msvc_env_path_x64}", 307 msvc_env_include = "%{msvc_env_include_x64}", 308 msvc_env_lib = "%{msvc_env_lib_x64}", 309 msvc_cl_path = "%{msvc_cl_path_x64}", 310 msvc_ml_path = "%{msvc_ml_path_x64}", 311 msvc_link_path = "%{msvc_link_path_x64}", 312 msvc_lib_path = "%{msvc_lib_path_x64}", 313 cxx_builtin_include_directories = [%{msvc_cxx_builtin_include_directories_x64}], 314 tool_paths = { 315 "ar": "%{msvc_lib_path_x64}", 316 "ml": "%{msvc_ml_path_x64}", 317 "cpp": "%{msvc_cl_path_x64}", 318 "gcc": "%{msvc_cl_path_x64}", 319 "gcov": "wrapper/bin/msvc_nop.bat", 320 "ld": "%{msvc_link_path_x64}", 321 "nm": "wrapper/bin/msvc_nop.bat", 322 "objcopy": "wrapper/bin/msvc_nop.bat", 323 "objdump": "wrapper/bin/msvc_nop.bat", 324 "strip": "wrapper/bin/msvc_nop.bat", 325 "dumpbin": "%{msvc_dumpbin_path_x64}", 326 "cpp-module-deps-scanner": "%{msvc_deps_scanner_wrapper_path_x64}", 327 }, 328 archiver_flags = ["/MACHINE:X64"], 329 default_link_flags = ["/MACHINE:X64"], 330 dbg_mode_debug_flag = "%{dbg_mode_debug_flag_x64}", 331 fastbuild_mode_debug_flag = "%{fastbuild_mode_debug_flag_x64}", 332 supports_parse_showincludes = %{msvc_parse_showincludes_x64}, 333) 334 335toolchain( 336 name = "cc-toolchain-x64_windows", 337 exec_compatible_with = [ 338 "@platforms//cpu:x86_64", 339 "@platforms//os:windows", 340 ], 341 target_compatible_with = [ 342 "@platforms//cpu:x86_64", 343 "@platforms//os:windows", 344 ], 345 toolchain = ":cc-compiler-x64_windows", 346 toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", 347) 348 349cc_toolchain( 350 name = "cc-compiler-x64_x86_windows", 351 toolchain_identifier = "msvc_x64_x86", 352 toolchain_config = ":msvc_x64_x86", 353 all_files = ":empty", 354 ar_files = ":empty", 355 as_files = ":msvc_compiler_files", 356 compiler_files = ":msvc_compiler_files", 357 dwp_files = ":empty", 358 linker_files = ":empty", 359 objcopy_files = ":empty", 360 strip_files = ":empty", 361 supports_param_files = 1, 362) 363 364cc_toolchain_config( 365 name = "msvc_x64_x86", 366 cpu = "x64_windows", 367 compiler = "msvc-cl", 368 host_system_name = "local", 369 target_system_name = "local", 370 target_libc = "msvcrt", 371 abi_version = "local", 372 abi_libc_version = "local", 373 toolchain_identifier = "msvc_x64_x86", 374 msvc_env_tmp = "%{msvc_env_tmp_x86}", 375 msvc_env_path = "%{msvc_env_path_x86}", 376 msvc_env_include = "%{msvc_env_include_x86}", 377 msvc_env_lib = "%{msvc_env_lib_x86}", 378 msvc_cl_path = "%{msvc_cl_path_x86}", 379 msvc_ml_path = "%{msvc_ml_path_x86}", 380 msvc_link_path = "%{msvc_link_path_x86}", 381 msvc_lib_path = "%{msvc_lib_path_x86}", 382 cxx_builtin_include_directories = [%{msvc_cxx_builtin_include_directories_x86}], 383 tool_paths = { 384 "ar": "%{msvc_lib_path_x86}", 385 "ml": "%{msvc_ml_path_x86}", 386 "cpp": "%{msvc_cl_path_x86}", 387 "gcc": "%{msvc_cl_path_x86}", 388 "gcov": "wrapper/bin/msvc_nop.bat", 389 "ld": "%{msvc_link_path_x86}", 390 "nm": "wrapper/bin/msvc_nop.bat", 391 "objcopy": "wrapper/bin/msvc_nop.bat", 392 "objdump": "wrapper/bin/msvc_nop.bat", 393 "strip": "wrapper/bin/msvc_nop.bat", 394 "dumpbin": "%{msvc_dumpbin_path_x86}", 395 "cpp-module-deps-scanner": "%{msvc_deps_scanner_wrapper_path_x86}", 396 }, 397 archiver_flags = ["/MACHINE:X86"], 398 default_link_flags = ["/MACHINE:X86"], 399 dbg_mode_debug_flag = "%{dbg_mode_debug_flag_x86}", 400 fastbuild_mode_debug_flag = "%{fastbuild_mode_debug_flag_x86}", 401 supports_parse_showincludes = %{msvc_parse_showincludes_x86}, 402) 403 404toolchain( 405 name = "cc-toolchain-x64_x86_windows", 406 exec_compatible_with = [ 407 "@platforms//cpu:x86_64", 408 "@platforms//os:windows", 409 ], 410 target_compatible_with = [ 411 "@platforms//cpu:x86_32", 412 "@platforms//os:windows", 413 ], 414 toolchain = ":cc-compiler-x64_x86_windows", 415 toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", 416) 417 418cc_toolchain( 419 name = "cc-compiler-x64_arm_windows", 420 toolchain_identifier = "msvc_x64_arm", 421 toolchain_config = ":msvc_x64_arm", 422 all_files = ":empty", 423 ar_files = ":empty", 424 as_files = ":msvc_compiler_files", 425 compiler_files = ":msvc_compiler_files", 426 dwp_files = ":empty", 427 linker_files = ":empty", 428 objcopy_files = ":empty", 429 strip_files = ":empty", 430 supports_param_files = 1, 431) 432 433cc_toolchain_config( 434 name = "msvc_x64_arm", 435 cpu = "x64_windows", 436 compiler = "msvc-cl", 437 host_system_name = "local", 438 target_system_name = "local", 439 target_libc = "msvcrt", 440 abi_version = "local", 441 abi_libc_version = "local", 442 toolchain_identifier = "msvc_x64_arm", 443 msvc_env_tmp = "%{msvc_env_tmp_arm}", 444 msvc_env_path = "%{msvc_env_path_arm}", 445 msvc_env_include = "%{msvc_env_include_arm}", 446 msvc_env_lib = "%{msvc_env_lib_arm}", 447 msvc_cl_path = "%{msvc_cl_path_arm}", 448 msvc_ml_path = "%{msvc_ml_path_arm}", 449 msvc_link_path = "%{msvc_link_path_arm}", 450 msvc_lib_path = "%{msvc_lib_path_arm}", 451 cxx_builtin_include_directories = [%{msvc_cxx_builtin_include_directories_arm}], 452 tool_paths = { 453 "ar": "%{msvc_lib_path_arm}", 454 "ml": "%{msvc_ml_path_arm}", 455 "cpp": "%{msvc_cl_path_arm}", 456 "gcc": "%{msvc_cl_path_arm}", 457 "gcov": "wrapper/bin/msvc_nop.bat", 458 "ld": "%{msvc_link_path_arm}", 459 "nm": "wrapper/bin/msvc_nop.bat", 460 "objcopy": "wrapper/bin/msvc_nop.bat", 461 "objdump": "wrapper/bin/msvc_nop.bat", 462 "strip": "wrapper/bin/msvc_nop.bat", 463 "dumpbin": "%{msvc_dumpbin_path_arm}", 464 "cpp-module-deps-scanner": "%{msvc_deps_scanner_wrapper_path_arm}", 465 }, 466 archiver_flags = ["/MACHINE:ARM"], 467 default_link_flags = ["/MACHINE:ARM"], 468 dbg_mode_debug_flag = "%{dbg_mode_debug_flag_arm}", 469 fastbuild_mode_debug_flag = "%{fastbuild_mode_debug_flag_arm}", 470 supports_parse_showincludes = %{msvc_parse_showincludes_arm}, 471) 472 473toolchain( 474 name = "cc-toolchain-x64_arm_windows", 475 exec_compatible_with = [ 476 "@platforms//cpu:x86_64", 477 "@platforms//os:windows", 478 ], 479 target_compatible_with = [ 480 "@platforms//cpu:arm", 481 "@platforms//os:windows", 482 ], 483 toolchain = ":cc-compiler-x64_arm_windows", 484 toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", 485) 486 487cc_toolchain( 488 name = "cc-compiler-arm64_windows", 489 toolchain_identifier = "msvc_arm64", 490 toolchain_config = ":msvc_arm64", 491 all_files = ":empty", 492 ar_files = ":empty", 493 as_files = ":msvc_compiler_files", 494 compiler_files = ":msvc_compiler_files", 495 dwp_files = ":empty", 496 linker_files = ":empty", 497 objcopy_files = ":empty", 498 strip_files = ":empty", 499 supports_param_files = 1, 500) 501 502cc_toolchain_config( 503 name = "msvc_arm64", 504 cpu = "x64_windows", 505 compiler = "msvc-cl", 506 host_system_name = "local", 507 target_system_name = "local", 508 target_libc = "msvcrt", 509 abi_version = "local", 510 abi_libc_version = "local", 511 toolchain_identifier = "msvc_arm64", 512 msvc_env_tmp = "%{msvc_env_tmp_arm64}", 513 msvc_env_path = "%{msvc_env_path_arm64}", 514 msvc_env_include = "%{msvc_env_include_arm64}", 515 msvc_env_lib = "%{msvc_env_lib_arm64}", 516 msvc_cl_path = "%{msvc_cl_path_arm64}", 517 msvc_ml_path = "%{msvc_ml_path_arm64}", 518 msvc_link_path = "%{msvc_link_path_arm64}", 519 msvc_lib_path = "%{msvc_lib_path_arm64}", 520 cxx_builtin_include_directories = [%{msvc_cxx_builtin_include_directories_arm64}], 521 tool_paths = { 522 "ar": "%{msvc_lib_path_arm64}", 523 "ml": "%{msvc_ml_path_arm64}", 524 "cpp": "%{msvc_cl_path_arm64}", 525 "gcc": "%{msvc_cl_path_arm64}", 526 "gcov": "wrapper/bin/msvc_nop.bat", 527 "ld": "%{msvc_link_path_arm64}", 528 "nm": "wrapper/bin/msvc_nop.bat", 529 "objcopy": "wrapper/bin/msvc_nop.bat", 530 "objdump": "wrapper/bin/msvc_nop.bat", 531 "strip": "wrapper/bin/msvc_nop.bat", 532 "dumpbin": "%{msvc_dumpbin_path_arm64}", 533 "cpp-module-deps-scanner": "%{msvc_deps_scanner_wrapper_path_arm64}", 534 }, 535 archiver_flags = ["/MACHINE:ARM64"], 536 default_link_flags = ["/MACHINE:ARM64"], 537 dbg_mode_debug_flag = "%{dbg_mode_debug_flag_arm64}", 538 fastbuild_mode_debug_flag = "%{fastbuild_mode_debug_flag_arm64}", 539 supports_parse_showincludes = %{msvc_parse_showincludes_arm64}, 540) 541 542toolchain( 543 name = "cc-toolchain-arm64_windows", 544 exec_compatible_with = [ 545 "@platforms//os:windows", 546 ], 547 target_compatible_with = [ 548 "@platforms//cpu:arm64", 549 "@platforms//os:windows", 550 ], 551 toolchain = ":cc-compiler-arm64_windows", 552 toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", 553) 554 555 556cc_toolchain( 557 name = "cc-compiler-x64_windows-clang-cl", 558 toolchain_identifier = "clang_cl_x64", 559 toolchain_config = ":clang_cl_x64", 560 all_files = ":empty", 561 ar_files = ":empty", 562 as_files = ":clangcl_compiler_files", 563 compiler_files = ":clangcl_compiler_files", 564 dwp_files = ":empty", 565 linker_files = ":empty", 566 objcopy_files = ":empty", 567 strip_files = ":empty", 568 supports_param_files = 1, 569) 570 571cc_toolchain_config( 572 name = "clang_cl_x64", 573 cpu = "x64_windows", 574 compiler = "clang-cl", 575 host_system_name = "local", 576 target_system_name = "local", 577 target_libc = "msvcrt", 578 abi_version = "local", 579 abi_libc_version = "local", 580 toolchain_identifier = "clang_cl_x64", 581 msvc_env_tmp = "%{clang_cl_env_tmp_x64}", 582 msvc_env_path = "%{clang_cl_env_path_x64}", 583 msvc_env_include = "%{clang_cl_env_include_x64}", 584 msvc_env_lib = "%{clang_cl_env_lib_x64}", 585 msvc_cl_path = "%{clang_cl_cl_path_x64}", 586 msvc_ml_path = "%{clang_cl_ml_path_x64}", 587 msvc_link_path = "%{clang_cl_link_path_x64}", 588 msvc_lib_path = "%{clang_cl_lib_path_x64}", 589 cxx_builtin_include_directories = [%{clang_cl_cxx_builtin_include_directories_x64}], 590 tool_paths = { 591 "ar": "%{clang_cl_lib_path_x64}", 592 "ml": "%{clang_cl_ml_path_x64}", 593 "cpp": "%{clang_cl_cl_path_x64}", 594 "gcc": "%{clang_cl_cl_path_x64}", 595 "gcov": "wrapper/bin/msvc_nop.bat", 596 "ld": "%{clang_cl_link_path_x64}", 597 "nm": "wrapper/bin/msvc_nop.bat", 598 "objcopy": "wrapper/bin/msvc_nop.bat", 599 "objdump": "wrapper/bin/msvc_nop.bat", 600 "strip": "wrapper/bin/msvc_nop.bat", 601 }, 602 archiver_flags = ["/MACHINE:X64"], 603 default_link_flags = ["/MACHINE:X64"], 604 dbg_mode_debug_flag = "%{clang_cl_dbg_mode_debug_flag_x64}", 605 fastbuild_mode_debug_flag = "%{clang_cl_fastbuild_mode_debug_flag_x64}", 606 supports_parse_showincludes = %{clang_cl_parse_showincludes_x64}, 607) 608 609toolchain( 610 name = "cc-toolchain-x64_windows-clang-cl", 611 exec_compatible_with = [ 612 "@platforms//cpu:x86_64", 613 "@platforms//os:windows", 614 "@rules_cc//cc/private/toolchain:clang-cl", 615 ], 616 target_compatible_with = [ 617 "@platforms//cpu:x86_64", 618 "@platforms//os:windows", 619 ], 620 toolchain = ":cc-compiler-x64_windows-clang-cl", 621 toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", 622) 623 624cc_toolchain( 625 name = "cc-compiler-arm64_windows-clang-cl", 626 toolchain_identifier = "clang_cl_arm64", 627 toolchain_config = ":clang_cl_arm64", 628 all_files = ":empty", 629 ar_files = ":empty", 630 as_files = ":clangcl_compiler_files", 631 compiler_files = ":clangcl_compiler_files", 632 dwp_files = ":empty", 633 linker_files = ":empty", 634 objcopy_files = ":empty", 635 strip_files = ":empty", 636 supports_param_files = 1, 637) 638 639cc_toolchain_config( 640 name = "clang_cl_arm64", 641 cpu = "arm64_windows", 642 compiler = "clang-cl", 643 host_system_name = "local", 644 target_system_name = "aarch64-pc-windows-msvc", 645 target_libc = "msvcrt", 646 abi_version = "local", 647 abi_libc_version = "local", 648 toolchain_identifier = "clang_cl_arm64", 649 msvc_env_tmp = "%{clang_cl_env_tmp_arm64}", 650 msvc_env_path = "%{clang_cl_env_path_arm64}", 651 msvc_env_include = "%{clang_cl_env_include_arm64}", 652 msvc_env_lib = "%{clang_cl_env_lib_arm64}", 653 msvc_cl_path = "%{clang_cl_cl_path_arm64}", 654 msvc_ml_path = "%{clang_cl_ml_path_arm64}", 655 msvc_link_path = "%{clang_cl_link_path_arm64}", 656 msvc_lib_path = "%{clang_cl_lib_path_arm64}", 657 cxx_builtin_include_directories = [%{clang_cl_cxx_builtin_include_directories_arm64}], 658 tool_paths = { 659 "ar": "%{clang_cl_lib_path_arm64}", 660 "ml": "%{clang_cl_ml_path_arm64}", 661 "cpp": "%{clang_cl_cl_path_arm64}", 662 "gcc": "%{clang_cl_cl_path_arm64}", 663 "gcov": "wrapper/bin/msvc_nop.bat", 664 "ld": "%{clang_cl_link_path_arm64}", 665 "nm": "wrapper/bin/msvc_nop.bat", 666 "objcopy": "wrapper/bin/msvc_nop.bat", 667 "objdump": "wrapper/bin/msvc_nop.bat", 668 "strip": "wrapper/bin/msvc_nop.bat", 669 }, 670 archiver_flags = ["/MACHINE:ARM64"], 671 default_link_flags = ["/MACHINE:ARM64"], 672 dbg_mode_debug_flag = "%{clang_cl_dbg_mode_debug_flag_arm64}", 673 fastbuild_mode_debug_flag = "%{clang_cl_fastbuild_mode_debug_flag_arm64}", 674 supports_parse_showincludes = %{clang_cl_parse_showincludes_arm64}, 675) 676 677toolchain( 678 name = "cc-toolchain-arm64_windows-clang-cl", 679 exec_compatible_with = [ 680 "@platforms//os:windows", 681 "@rules_cc//cc/private/toolchain:clang-cl", 682 ], 683 target_compatible_with = [ 684 "@platforms//cpu:arm64", 685 "@platforms//os:windows", 686 ], 687 toolchain = ":cc-compiler-arm64_windows-clang-cl", 688 toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", 689) 690 691cc_toolchain( 692 name = "cc-compiler-armeabi-v7a", 693 toolchain_identifier = "stub_armeabi-v7a", 694 toolchain_config = ":stub_armeabi-v7a", 695 all_files = ":empty", 696 ar_files = ":empty", 697 as_files = ":empty", 698 compiler_files = ":empty", 699 dwp_files = ":empty", 700 linker_files = ":empty", 701 objcopy_files = ":empty", 702 strip_files = ":empty", 703 supports_param_files = 1, 704) 705 706armeabi_cc_toolchain_config(name = "stub_armeabi-v7a") 707 708toolchain( 709 name = "cc-toolchain-armeabi-v7a", 710 exec_compatible_with = [ 711 ], 712 target_compatible_with = [ 713 "@platforms//cpu:armv7", 714 "@platforms//os:android", 715 ], 716 toolchain = ":cc-compiler-armeabi-v7a", 717 toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", 718) 719