From a0257d8bb0ae718e8c543d59b0996cf05a03cce7 Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Thu, 21 Mar 2024 09:32:31 +0000 Subject: [PATCH] ci: Disable windows build and toolchains Signed-off-by: Ryan Northey --- .github/workflows/_build_image.yml | 26 +- .github/workflows/build.yml | 22 - toolchains/BUILD | 10 - toolchains/configs/windows/.latest.bazelrc | 18 - toolchains/configs/windows/clang-cl/LICENSE | 202 --- toolchains/configs/windows/clang-cl/cc/BUILD | 621 ------- .../configs/windows/clang-cl/cc/WORKSPACE | 2 - .../cc/armeabi_cc_toolchain_config.bzl | 82 - .../builtin_include_directory_paths_clangcl | 7 - .../cc/builtin_include_directory_paths_mingw | 8 - .../cc/builtin_include_directory_paths_msvc | 7 - .../configs/windows/clang-cl/cc/get_env.bat | 3 - .../cc/msys_gcc_installation_error.bat | 23 - .../clang-cl/cc/vc_installation_error_arm.bat | 29 - .../cc/vc_installation_error_arm64.bat | 29 - .../clang-cl/cc/vc_installation_error_x86.bat | 29 - .../cc/windows_cc_toolchain_config.bzl | 1421 ----------------- .../configs/windows/clang-cl/config/BUILD | 46 - toolchains/configs/windows/msvc-cl/LICENSE | 202 --- toolchains/configs/windows/msvc-cl/cc/BUILD | 619 ------- .../configs/windows/msvc-cl/cc/WORKSPACE | 2 - .../cc/armeabi_cc_toolchain_config.bzl | 82 - .../builtin_include_directory_paths_clangcl | 7 - .../cc/builtin_include_directory_paths_mingw | 8 - .../cc/builtin_include_directory_paths_msvc | 7 - .../configs/windows/msvc-cl/cc/get_env.bat | 3 - .../cc/msys_gcc_installation_error.bat | 23 - .../msvc-cl/cc/vc_installation_error_arm.bat | 29 - .../cc/vc_installation_error_arm64.bat | 29 - .../msvc-cl/cc/vc_installation_error_x86.bat | 29 - .../cc/windows_cc_toolchain_config.bzl | 1421 ----------------- .../configs/windows/msvc-cl/config/BUILD | 46 - 32 files changed, 1 insertion(+), 5091 deletions(-) delete mode 100644 toolchains/configs/windows/.latest.bazelrc delete mode 100644 toolchains/configs/windows/clang-cl/LICENSE delete mode 100644 toolchains/configs/windows/clang-cl/cc/BUILD delete mode 100644 toolchains/configs/windows/clang-cl/cc/WORKSPACE delete mode 100644 toolchains/configs/windows/clang-cl/cc/armeabi_cc_toolchain_config.bzl delete mode 100644 toolchains/configs/windows/clang-cl/cc/builtin_include_directory_paths_clangcl delete mode 100644 toolchains/configs/windows/clang-cl/cc/builtin_include_directory_paths_mingw delete mode 100644 toolchains/configs/windows/clang-cl/cc/builtin_include_directory_paths_msvc delete mode 100644 toolchains/configs/windows/clang-cl/cc/get_env.bat delete mode 100644 toolchains/configs/windows/clang-cl/cc/msys_gcc_installation_error.bat delete mode 100644 toolchains/configs/windows/clang-cl/cc/vc_installation_error_arm.bat delete mode 100644 toolchains/configs/windows/clang-cl/cc/vc_installation_error_arm64.bat delete mode 100644 toolchains/configs/windows/clang-cl/cc/vc_installation_error_x86.bat delete mode 100644 toolchains/configs/windows/clang-cl/cc/windows_cc_toolchain_config.bzl delete mode 100644 toolchains/configs/windows/clang-cl/config/BUILD delete mode 100644 toolchains/configs/windows/msvc-cl/LICENSE delete mode 100644 toolchains/configs/windows/msvc-cl/cc/BUILD delete mode 100644 toolchains/configs/windows/msvc-cl/cc/WORKSPACE delete mode 100644 toolchains/configs/windows/msvc-cl/cc/armeabi_cc_toolchain_config.bzl delete mode 100644 toolchains/configs/windows/msvc-cl/cc/builtin_include_directory_paths_clangcl delete mode 100644 toolchains/configs/windows/msvc-cl/cc/builtin_include_directory_paths_mingw delete mode 100644 toolchains/configs/windows/msvc-cl/cc/builtin_include_directory_paths_msvc delete mode 100644 toolchains/configs/windows/msvc-cl/cc/get_env.bat delete mode 100644 toolchains/configs/windows/msvc-cl/cc/msys_gcc_installation_error.bat delete mode 100644 toolchains/configs/windows/msvc-cl/cc/vc_installation_error_arm.bat delete mode 100644 toolchains/configs/windows/msvc-cl/cc/vc_installation_error_arm64.bat delete mode 100644 toolchains/configs/windows/msvc-cl/cc/vc_installation_error_x86.bat delete mode 100644 toolchains/configs/windows/msvc-cl/cc/windows_cc_toolchain_config.bzl delete mode 100644 toolchains/configs/windows/msvc-cl/config/BUILD diff --git a/.github/workflows/_build_image.yml b/.github/workflows/_build_image.yml index 66d51afd..e0b146cc 100644 --- a/.github/workflows/_build_image.yml +++ b/.github/workflows/_build_image.yml @@ -48,7 +48,6 @@ jobs: steps: - uses: envoyproxy/toolshed/gh-actions/diskspace@actions-v0.0.17 name: 'Free disk space' - if: ${{ inputs.os_family != 'windows' }} - name: 'Checkout repository' uses: actions/checkout@v3 - run: | @@ -57,24 +56,7 @@ jobs: id: container shell: bash name: Container hash - - uses: actions/setup-python@v4 - if: ${{ inputs.os_family == 'windows' }} - with: - python-version: '3.10' - - run: | - curl -fsSL --output "$TEMP/gcloud-sdk.zip" "$GCLOUD_SDK_ARCHIVE_URL" - echo "${GCLOUD_SDK_ARCHIVE_CHECKSUM} $TEMP/gcloud-sdk.zip" | sha256sum --check - unzip -q "$TEMP/gcloud-sdk.zip" -d "$PROGRAMFILES" - name: Install gcloud (Windows) - shell: bash - if: ${{ inputs.os_family == 'windows' }} - env: - GCLOUD_SDK_ARCHIVE_URL: https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-289.0.0-windows-x86_64.zip - GCLOUD_SDK_ARCHIVE_CHECKSUM: c81e80040f7f609dbc50c42cd0cd402988a5c47f467372d40b5aaca0733f46f4 - run: | - if [[ "${{inputs.os_family }}" == "windows" ]]; then - export PATH="${PROGRAMFILES}/google-cloud-sdk/bin:${PATH}" - fi cd docker ./push.sh name: Build (${{ inputs.image_prefix }}${{ inputs.distro }}@${{ steps.container.outputs.tag }}) @@ -97,16 +79,10 @@ jobs: go-version: ${{ inputs.go_version }} cache: false - uses: envoyproxy/toolshed/gh-actions/docker/registry@actions-v0.0.18 - if: ${{ inputs.test_toolchain && inputs.os_family != 'windows' }} + if: ${{ inputs.test_toolchain && inputs.os_family }} name: 'Start and load Docker registry' with: load: envoyproxy/envoy-build-ubuntu:${{ steps.container.outputs.tag }} - - uses: envoyproxy/toolshed/gh-actions/docker/registry@actions-v0.0.18 - if: ${{ inputs.test_toolchain && inputs.os_family == 'windows' }} - name: 'Start and load Docker registry (Windows)' - with: - image: stefanscherer/registry-windows:2.6.2 - load: envoyproxy/envoy-build-windows2019:${{ steps.container.outputs.tag }} - run: | toolchains/regenerate.sh if: ${{ inputs.test_toolchain }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5573a4d1..5a5a2b97 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,12 +31,6 @@ jobs: - target: centos name: Linux Centos gcr_push: false - - target: windows2019 - name: Windows 2019 - gcr_push: true - gcr_name: envoy-build-windows - host_platform: windows-2019 - os_family: windows name: Build (${{ matrix.name || matrix.target }}) uses: ./.github/workflows/_build_image.yml with: @@ -62,19 +56,3 @@ jobs: secrets: bot_key: ${{ secrets.ENVOY_CI_UPDATE_BOT_KEY }} bot_id: ${{ secrets.ENVOY_CI_UPDATE_APP_ID }} - - regenerate_windows: - permissions: - contents: write - name: Regenerate toolchains (Windows) - uses: ./.github/workflows/_regenerate_toolchain.yml - if: ${{ github.event_name != 'pull_request' }} - needs: - - regenerate_linux - with: - gcr_name: envoy-build-windows - os_family: windows - host_platform: windows-2019 - secrets: - bot_key: ${{ secrets.ENVOY_CI_UPDATE_BOT_KEY }} - bot_id: ${{ secrets.ENVOY_CI_UPDATE_APP_ID }} diff --git a/toolchains/BUILD b/toolchains/BUILD index f7456713..089e7cae 100644 --- a/toolchains/BUILD +++ b/toolchains/BUILD @@ -30,13 +30,3 @@ platform( ), parents = ["//toolchains/configs/linux/gcc/config:platform"], ) - -platform( - name = "rbe_windows_clang_cl_platform", - parents = ["//toolchains/configs/windows/clang-cl/config:platform"], -) - -platform( - name = "rbe_windows_msvc_cl_platform", - parents = ["//toolchains/configs/windows/msvc-cl/config:platform"], -) diff --git a/toolchains/configs/windows/.latest.bazelrc b/toolchains/configs/windows/.latest.bazelrc deleted file mode 100644 index 29f1dd88..00000000 --- a/toolchains/configs/windows/.latest.bazelrc +++ /dev/null @@ -1,18 +0,0 @@ -# This .bazelrc file is generated by toolchains/regenerate.sh script -# It contains some of the flags required for the provided -# toolchain with Remote Build Execution. -# Specifically, it includes all toolchain/platform flags -# This file is used for testing purposes. - -build:remote --host_javabase=//toolchains/configs/windows/clang-cl/java:jdk -build:remote --javabase=//toolchains/configs/windows/clang-cl/java:jdk -build:remote --crosstool_top=//toolchains/configs/windows/clang-cl/cc:toolchain -build:remote --extra_toolchains=//toolchains/configs/windows/clang-cl/config:cc-toolchain -build:remote --extra_execution_platforms=//toolchains/configs/windows/clang-cl/config:platform -build:remote --host_platform=//toolchains/configs/windows/clang-cl/config:platform -build:remote --platforms=//toolchains/configs/windows/clang-cl/config:platform - -# Import the default bazelrc file in bazel-toolchains repo. -# This will only work for tests executed from bazel-toolchains -# repo. -try-import %workspace%/bazelrc/.bazelrc.notoolchain diff --git a/toolchains/configs/windows/clang-cl/LICENSE b/toolchains/configs/windows/clang-cl/LICENSE deleted file mode 100644 index f0a1f59a..00000000 --- a/toolchains/configs/windows/clang-cl/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2021 Google LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/toolchains/configs/windows/clang-cl/cc/BUILD b/toolchains/configs/windows/clang-cl/cc/BUILD deleted file mode 100644 index 7acd70a2..00000000 --- a/toolchains/configs/windows/clang-cl/cc/BUILD +++ /dev/null @@ -1,621 +0,0 @@ -# Copyright 2018 The Bazel Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This becomes the BUILD file for @local_config_cc// under Windows. - -load("@rules_cc//cc:defs.bzl", "cc_toolchain", "cc_toolchain_suite", "cc_library") -load(":windows_cc_toolchain_config.bzl", "cc_toolchain_config") -load(":armeabi_cc_toolchain_config.bzl", "armeabi_cc_toolchain_config") - -package(default_visibility = ["//visibility:public"]) - -cc_library( - name = "malloc", -) - -filegroup( - name = "empty", - srcs = [], -) - -filegroup( - name = "mingw_compiler_files", - srcs = [":builtin_include_directory_paths_mingw"] -) - -filegroup( - name = "clangcl_compiler_files", - srcs = [":builtin_include_directory_paths_clangcl"] -) - -filegroup( - name = "msvc_compiler_files", - srcs = [":builtin_include_directory_paths_msvc"] -) - -# Hardcoded toolchain, legacy behaviour. -cc_toolchain_suite( - name = "toolchain", - toolchains = { - "armeabi-v7a|compiler": ":cc-compiler-armeabi-v7a", - "x64_windows|msvc-cl": ":cc-compiler-x64_windows", - "x64_x86_windows|msvc-cl": ":cc-compiler-x64_x86_windows", - "x64_arm_windows|msvc-cl": ":cc-compiler-x64_arm_windows", - "x64_arm64_windows|msvc-cl": ":cc-compiler-arm64_windows", - "arm64_windows|msvc-cl": ":cc-compiler-arm64_windows", - "x64_windows|msys-gcc": ":cc-compiler-x64_windows_msys", - "x64_windows|mingw-gcc": ":cc-compiler-x64_windows_mingw", - "x64_windows|clang-cl": ":cc-compiler-x64_windows-clang-cl", - "x64_windows_msys": ":cc-compiler-x64_windows_msys", - "x64_windows": ":cc-compiler-x64_windows", - "x64_x86_windows": ":cc-compiler-x64_x86_windows", - "x64_arm_windows": ":cc-compiler-x64_arm_windows", - "x64_arm64_windows": ":cc-compiler-arm64_windows", - "arm64_windows": ":cc-compiler-arm64_windows", - "x64_arm64_windows|clang-cl": ":cc-compiler-arm64_windows-clang-cl", - "arm64_windows|clang-cl": ":cc-compiler-arm64_windows-clang-cl", - "armeabi-v7a": ":cc-compiler-armeabi-v7a", - }, -) - -cc_toolchain( - name = "cc-compiler-x64_windows_msys", - toolchain_identifier = "msys_x64", - toolchain_config = ":msys_x64", - all_files = ":empty", - ar_files = ":empty", - as_files = ":mingw_compiler_files", - compiler_files = ":mingw_compiler_files", - dwp_files = ":empty", - linker_files = ":empty", - objcopy_files = ":empty", - strip_files = ":empty", - supports_param_files = 1, -) - -cc_toolchain_config( - name = "msys_x64", - cpu = "x64_windows", - compiler = "msys-gcc", - host_system_name = "local", - target_system_name = "local", - target_libc = "msys", - abi_version = "local", - abi_libc_version = "local", - cxx_builtin_include_directories = [ "c:/tools/msys64/usr/", - ], - tool_paths = {"ar": "c:/tools/msys64/usr/bin/ar", - "cpp": "c:/tools/msys64/usr/bin/cpp", - "dwp": "c:/tools/msys64/usr/bin/dwp", - "gcc": "c:/tools/msys64/usr/bin/gcc", - "gcov": "c:/tools/msys64/usr/bin/gcov", - "ld": "c:/tools/msys64/usr/bin/ld", - "nm": "c:/tools/msys64/usr/bin/nm", - "objcopy": "c:/tools/msys64/usr/bin/objcopy", - "objdump": "c:/tools/msys64/usr/bin/objdump", - "strip": "c:/tools/msys64/usr/bin/strip"}, - tool_bin_path = "c:/tools/msys64/usr/bin", - dbg_mode_debug_flag = "/DEBUG", - fastbuild_mode_debug_flag = "/DEBUG", -) - -toolchain( - name = "cc-toolchain-x64_windows_msys", - exec_compatible_with = [ - "@platforms//cpu:x86_64", - "@platforms//os:windows", - "@bazel_tools//tools/cpp:msys", - ], - target_compatible_with = [ - "@platforms//cpu:x86_64", - "@platforms//os:windows", - ], - toolchain = ":cc-compiler-x64_windows_msys", - toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", -) - -cc_toolchain( - name = "cc-compiler-x64_windows_mingw", - toolchain_identifier = "msys_x64_mingw", - toolchain_config = ":msys_x64_mingw", - all_files = ":empty", - ar_files = ":empty", - as_files = ":mingw_compiler_files", - compiler_files = ":mingw_compiler_files", - dwp_files = ":empty", - linker_files = ":empty", - objcopy_files = ":empty", - strip_files = ":empty", - supports_param_files = 0, -) - -cc_toolchain_config( - name = "msys_x64_mingw", - cpu = "x64_windows", - compiler = "mingw-gcc", - host_system_name = "local", - target_system_name = "local", - target_libc = "mingw", - abi_version = "local", - abi_libc_version = "local", - tool_bin_path = "c:/tools/msys64/mingw64/bin", - cxx_builtin_include_directories = [ "c:/tools/msys64/mingw64/", - ], - tool_paths = {"ar": "c:/tools/msys64/mingw64/bin/ar", - "cpp": "c:/tools/msys64/mingw64/bin/cpp", - "dwp": "c:/tools/msys64/mingw64/bin/dwp", - "gcc": "c:/tools/msys64/mingw64/bin/gcc", - "gcov": "c:/tools/msys64/mingw64/bin/gcov", - "ld": "c:/tools/msys64/mingw64/bin/ld", - "nm": "c:/tools/msys64/mingw64/bin/nm", - "objcopy": "c:/tools/msys64/mingw64/bin/objcopy", - "objdump": "c:/tools/msys64/mingw64/bin/objdump", - "strip": "c:/tools/msys64/mingw64/bin/strip"}, - dbg_mode_debug_flag = "/DEBUG", - fastbuild_mode_debug_flag = "/DEBUG", -) - -toolchain( - name = "cc-toolchain-x64_windows_mingw", - exec_compatible_with = [ - "@platforms//cpu:x86_64", - "@platforms//os:windows", - "@bazel_tools//tools/cpp:mingw", - ], - target_compatible_with = [ - "@platforms//cpu:x86_64", - "@platforms//os:windows", - ], - toolchain = ":cc-compiler-x64_windows_mingw", - toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", -) - -cc_toolchain( - name = "cc-compiler-x64_windows", - toolchain_identifier = "msvc_x64", - toolchain_config = ":msvc_x64", - all_files = ":empty", - ar_files = ":empty", - as_files = ":msvc_compiler_files", - compiler_files = ":msvc_compiler_files", - dwp_files = ":empty", - linker_files = ":empty", - objcopy_files = ":empty", - strip_files = ":empty", - supports_param_files = 1, -) - -cc_toolchain_config( - name = "msvc_x64", - cpu = "x64_windows", - compiler = "msvc-cl", - host_system_name = "local", - target_system_name = "local", - target_libc = "msvcrt", - abi_version = "local", - abi_libc_version = "local", - toolchain_identifier = "msvc_x64", - msvc_env_tmp = "C:\\Windows\\Temp", - msvc_env_path = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX64\\x64;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\IDE\\VC\\VCPackages;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\IDE\\CommonExtensions\\Microsoft\\TestWindow;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\IDE\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\MSBuild\\Current\\bin\\Roslyn;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\Tools\\devinit;C:\\Program Files (x86)\\Windows Kits\\10\\bin\\10.0.22000.0\\x64;C:\\Program Files (x86)\\Windows Kits\\10\\bin\\x64;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\\\MSBuild\\Current\\Bin;C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\IDE\\;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\Tools\\;;C:\\Windows\\system32", - msvc_env_include = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\include;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\ucrt;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\shared;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\um;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\winrt;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\cppwinrt", - msvc_env_lib = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\lib\\x64;C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.22000.0\\ucrt\\x64;C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.22000.0\\um\\x64;C:\\Program Files\\LLVM\\lib\\clang\\16.0.0\\lib\\windows", - msvc_cl_path = "C:/Program Files/LLVM/bin/clang-cl.exe", - msvc_ml_path = "C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/ml64.exe", - msvc_link_path = "C:/Program Files/LLVM/bin/lld-link.exe", - msvc_lib_path = "C:/Program Files/LLVM/bin/llvm-lib.exe", - cxx_builtin_include_directories = [ "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\include", - "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\ucrt", - "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\shared", - "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\um", - "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\winrt", - "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\cppwinrt", - "C:\\Program Files\\LLVM\\lib\\clang\\16.0.0\\include"], - tool_paths = { - "ar": "C:/Program Files/LLVM/bin/llvm-lib.exe", - "ml": "C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/ml64.exe", - "cpp": "C:/Program Files/LLVM/bin/clang-cl.exe", - "gcc": "C:/Program Files/LLVM/bin/clang-cl.exe", - "gcov": "wrapper/bin/msvc_nop.bat", - "ld": "C:/Program Files/LLVM/bin/lld-link.exe", - "nm": "wrapper/bin/msvc_nop.bat", - "objcopy": "wrapper/bin/msvc_nop.bat", - "objdump": "wrapper/bin/msvc_nop.bat", - "strip": "wrapper/bin/msvc_nop.bat", - }, - archiver_flags = ["/MACHINE:X64"], - default_link_flags = ["/MACHINE:X64"], - dbg_mode_debug_flag = "/DEBUG", - fastbuild_mode_debug_flag = "/DEBUG", -) - -toolchain( - name = "cc-toolchain-x64_windows", - exec_compatible_with = [ - "@platforms//cpu:x86_64", - "@platforms//os:windows", - ], - target_compatible_with = [ - "@platforms//cpu:x86_64", - "@platforms//os:windows", - ], - toolchain = ":cc-compiler-x64_windows", - toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", -) - -cc_toolchain( - name = "cc-compiler-x64_x86_windows", - toolchain_identifier = "msvc_x64_x86", - toolchain_config = ":msvc_x64_x86", - all_files = ":empty", - ar_files = ":empty", - as_files = ":msvc_compiler_files", - compiler_files = ":msvc_compiler_files", - dwp_files = ":empty", - linker_files = ":empty", - objcopy_files = ":empty", - strip_files = ":empty", - supports_param_files = 1, -) - -cc_toolchain_config( - name = "msvc_x64_x86", - cpu = "x64_windows", - compiler = "msvc-cl", - host_system_name = "local", - target_system_name = "local", - target_libc = "msvcrt", - abi_version = "local", - abi_libc_version = "local", - toolchain_identifier = "msvc_x64_x86", - msvc_env_tmp = "msvc_not_found", - msvc_env_path = "msvc_not_found", - msvc_env_include = "msvc_not_found", - msvc_env_lib = "msvc_not_found", - msvc_cl_path = "vc_installation_error_x86.bat", - msvc_ml_path = "vc_installation_error_x86.bat", - msvc_link_path = "vc_installation_error_x86.bat", - msvc_lib_path = "vc_installation_error_x86.bat", - cxx_builtin_include_directories = [], - tool_paths = { - "ar": "vc_installation_error_x86.bat", - "ml": "vc_installation_error_x86.bat", - "cpp": "vc_installation_error_x86.bat", - "gcc": "vc_installation_error_x86.bat", - "gcov": "wrapper/bin/msvc_nop.bat", - "ld": "vc_installation_error_x86.bat", - "nm": "wrapper/bin/msvc_nop.bat", - "objcopy": "wrapper/bin/msvc_nop.bat", - "objdump": "wrapper/bin/msvc_nop.bat", - "strip": "wrapper/bin/msvc_nop.bat", - }, - archiver_flags = ["/MACHINE:X86"], - default_link_flags = ["/MACHINE:X86"], - dbg_mode_debug_flag = "/DEBUG", - fastbuild_mode_debug_flag = "/DEBUG", -) - -toolchain( - name = "cc-toolchain-x64_x86_windows", - exec_compatible_with = [ - "@platforms//cpu:x86_64", - "@platforms//os:windows", - ], - target_compatible_with = [ - "@platforms//cpu:x86_32", - "@platforms//os:windows", - ], - toolchain = ":cc-compiler-x64_x86_windows", - toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", -) - -cc_toolchain( - name = "cc-compiler-x64_arm_windows", - toolchain_identifier = "msvc_x64_arm", - toolchain_config = ":msvc_x64_arm", - all_files = ":empty", - ar_files = ":empty", - as_files = ":msvc_compiler_files", - compiler_files = ":msvc_compiler_files", - dwp_files = ":empty", - linker_files = ":empty", - objcopy_files = ":empty", - strip_files = ":empty", - supports_param_files = 1, -) - -cc_toolchain_config( - name = "msvc_x64_arm", - cpu = "x64_windows", - compiler = "msvc-cl", - host_system_name = "local", - target_system_name = "local", - target_libc = "msvcrt", - abi_version = "local", - abi_libc_version = "local", - toolchain_identifier = "msvc_x64_arm", - msvc_env_tmp = "msvc_not_found", - msvc_env_path = "msvc_not_found", - msvc_env_include = "msvc_not_found", - msvc_env_lib = "msvc_not_found", - msvc_cl_path = "vc_installation_error_arm.bat", - msvc_ml_path = "vc_installation_error_arm.bat", - msvc_link_path = "vc_installation_error_arm.bat", - msvc_lib_path = "vc_installation_error_arm.bat", - cxx_builtin_include_directories = [], - tool_paths = { - "ar": "vc_installation_error_arm.bat", - "ml": "vc_installation_error_arm.bat", - "cpp": "vc_installation_error_arm.bat", - "gcc": "vc_installation_error_arm.bat", - "gcov": "wrapper/bin/msvc_nop.bat", - "ld": "vc_installation_error_arm.bat", - "nm": "wrapper/bin/msvc_nop.bat", - "objcopy": "wrapper/bin/msvc_nop.bat", - "objdump": "wrapper/bin/msvc_nop.bat", - "strip": "wrapper/bin/msvc_nop.bat", - }, - archiver_flags = ["/MACHINE:ARM"], - default_link_flags = ["/MACHINE:ARM"], - dbg_mode_debug_flag = "/DEBUG", - fastbuild_mode_debug_flag = "/DEBUG", -) - -toolchain( - name = "cc-toolchain-x64_arm_windows", - exec_compatible_with = [ - "@platforms//cpu:x86_64", - "@platforms//os:windows", - ], - target_compatible_with = [ - "@platforms//cpu:arm", - "@platforms//os:windows", - ], - toolchain = ":cc-compiler-x64_arm_windows", - toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", -) - -cc_toolchain( - name = "cc-compiler-arm64_windows", - toolchain_identifier = "msvc_arm64", - toolchain_config = ":msvc_arm64", - all_files = ":empty", - ar_files = ":empty", - as_files = ":msvc_compiler_files", - compiler_files = ":msvc_compiler_files", - dwp_files = ":empty", - linker_files = ":empty", - objcopy_files = ":empty", - strip_files = ":empty", - supports_param_files = 1, -) - -cc_toolchain_config( - name = "msvc_arm64", - cpu = "x64_windows", - compiler = "msvc-cl", - host_system_name = "local", - target_system_name = "local", - target_libc = "msvcrt", - abi_version = "local", - abi_libc_version = "local", - toolchain_identifier = "msvc_arm64", - msvc_env_tmp = "msvc_not_found", - msvc_env_path = "msvc_not_found", - msvc_env_include = "msvc_not_found", - msvc_env_lib = "msvc_not_found", - msvc_cl_path = "vc_installation_error_arm64.bat", - msvc_ml_path = "vc_installation_error_arm64.bat", - msvc_link_path = "vc_installation_error_arm64.bat", - msvc_lib_path = "vc_installation_error_arm64.bat", - cxx_builtin_include_directories = [], - tool_paths = { - "ar": "vc_installation_error_arm64.bat", - "ml": "vc_installation_error_arm64.bat", - "cpp": "vc_installation_error_arm64.bat", - "gcc": "vc_installation_error_arm64.bat", - "gcov": "wrapper/bin/msvc_nop.bat", - "ld": "vc_installation_error_arm64.bat", - "nm": "wrapper/bin/msvc_nop.bat", - "objcopy": "wrapper/bin/msvc_nop.bat", - "objdump": "wrapper/bin/msvc_nop.bat", - "strip": "wrapper/bin/msvc_nop.bat", - }, - archiver_flags = ["/MACHINE:ARM64"], - default_link_flags = ["/MACHINE:ARM64"], - dbg_mode_debug_flag = "/DEBUG", - fastbuild_mode_debug_flag = "/DEBUG", -) - -toolchain( - name = "cc-toolchain-arm64_windows", - exec_compatible_with = [ - "@platforms//os:windows", - ], - target_compatible_with = [ - "@platforms//cpu:arm64", - "@platforms//os:windows", - ], - toolchain = ":cc-compiler-arm64_windows", - toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", -) - - -cc_toolchain( - name = "cc-compiler-x64_windows-clang-cl", - toolchain_identifier = "clang_cl_x64", - toolchain_config = ":clang_cl_x64", - all_files = ":empty", - ar_files = ":empty", - as_files = ":clangcl_compiler_files", - compiler_files = ":clangcl_compiler_files", - dwp_files = ":empty", - linker_files = ":empty", - objcopy_files = ":empty", - strip_files = ":empty", - supports_param_files = 1, -) - -cc_toolchain_config( - name = "clang_cl_x64", - cpu = "x64_windows", - compiler = "clang-cl", - host_system_name = "local", - target_system_name = "local", - target_libc = "msvcrt", - abi_version = "local", - abi_libc_version = "local", - toolchain_identifier = "clang_cl_x64", - msvc_env_tmp = "C:\\Windows\\Temp", - msvc_env_path = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX64\\x64;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\IDE\\VC\\VCPackages;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\IDE\\CommonExtensions\\Microsoft\\TestWindow;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\IDE\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\MSBuild\\Current\\bin\\Roslyn;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\Tools\\devinit;C:\\Program Files (x86)\\Windows Kits\\10\\bin\\10.0.22000.0\\x64;C:\\Program Files (x86)\\Windows Kits\\10\\bin\\x64;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\\\MSBuild\\Current\\Bin;C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\IDE\\;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\Tools\\;;C:\\Windows\\system32", - msvc_env_include = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\include;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\ucrt;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\shared;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\um;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\winrt;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\cppwinrt;C:\\Program Files\\LLVM\\lib\\clang\\16.0.0\\include", - msvc_env_lib = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\lib\\x64;C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.22000.0\\ucrt\\x64;C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.22000.0\\um\\x64;C:\\Program Files\\LLVM\\lib\\clang\\16.0.0\\lib\\windows;C:\\Program Files\\LLVM\\lib\\clang\\16.0.0\\lib\\windows", - msvc_cl_path = "C:/Program Files/LLVM/bin/clang-cl.exe", - msvc_ml_path = "C:/Program Files/LLVM/bin/clang-cl.exe", - msvc_link_path = "C:/Program Files/LLVM/bin/lld-link.exe", - msvc_lib_path = "C:/Program Files/LLVM/bin/llvm-lib.exe", - cxx_builtin_include_directories = [ "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\include", - "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\ucrt", - "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\shared", - "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\um", - "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\winrt", - "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\cppwinrt", - "C:\\Program Files\\LLVM\\lib\\clang\\16.0.0\\include", - "C:\\Program Files\\LLVM\\lib\\clang\\16.0.0\\include"], - tool_paths = { - "ar": "C:/Program Files/LLVM/bin/llvm-lib.exe", - "ml": "C:/Program Files/LLVM/bin/clang-cl.exe", - "cpp": "C:/Program Files/LLVM/bin/clang-cl.exe", - "gcc": "C:/Program Files/LLVM/bin/clang-cl.exe", - "gcov": "wrapper/bin/msvc_nop.bat", - "ld": "C:/Program Files/LLVM/bin/lld-link.exe", - "nm": "wrapper/bin/msvc_nop.bat", - "objcopy": "wrapper/bin/msvc_nop.bat", - "objdump": "wrapper/bin/msvc_nop.bat", - "strip": "wrapper/bin/msvc_nop.bat", - }, - archiver_flags = ["/MACHINE:X64"], - default_link_flags = ["/MACHINE:X64", "/DEFAULTLIB:clang_rt.builtins-x86_64.lib"], - dbg_mode_debug_flag = "/DEBUG", - fastbuild_mode_debug_flag = "/DEBUG", -) - -toolchain( - name = "cc-toolchain-x64_windows-clang-cl", - exec_compatible_with = [ - "@platforms//cpu:x86_64", - "@platforms//os:windows", - "@bazel_tools//tools/cpp:clang-cl", - ], - target_compatible_with = [ - "@platforms//cpu:x86_64", - "@platforms//os:windows", - ], - toolchain = ":cc-compiler-x64_windows-clang-cl", - toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", -) - -cc_toolchain( - name = "cc-compiler-arm64_windows-clang-cl", - toolchain_identifier = "clang_cl_arm64", - toolchain_config = ":clang_cl_arm64", - all_files = ":empty", - ar_files = ":empty", - as_files = ":clangcl_compiler_files", - compiler_files = ":clangcl_compiler_files", - dwp_files = ":empty", - linker_files = ":empty", - objcopy_files = ":empty", - strip_files = ":empty", - supports_param_files = 1, -) - -cc_toolchain_config( - name = "clang_cl_arm64", - cpu = "arm64_windows", - compiler = "clang-cl", - host_system_name = "local", - target_system_name = "aarch64-pc-windows-msvc", - target_libc = "msvcrt", - abi_version = "local", - abi_libc_version = "local", - toolchain_identifier = "clang_cl_arm64", - msvc_env_tmp = "clang_cl_not_found", - msvc_env_path = "clang_cl_not_found", - msvc_env_include = "clang_cl_not_found", - msvc_env_lib = "clang_cl_not_found", - msvc_cl_path = "vc_installation_error_arm64.bat", - msvc_ml_path = "vc_installation_error_arm64.bat", - msvc_link_path = "vc_installation_error_arm64.bat", - msvc_lib_path = "vc_installation_error_arm64.bat", - cxx_builtin_include_directories = [], - tool_paths = { - "ar": "vc_installation_error_arm64.bat", - "ml": "vc_installation_error_arm64.bat", - "cpp": "vc_installation_error_arm64.bat", - "gcc": "vc_installation_error_arm64.bat", - "gcov": "wrapper/bin/msvc_nop.bat", - "ld": "vc_installation_error_arm64.bat", - "nm": "wrapper/bin/msvc_nop.bat", - "objcopy": "wrapper/bin/msvc_nop.bat", - "objdump": "wrapper/bin/msvc_nop.bat", - "strip": "wrapper/bin/msvc_nop.bat", - }, - archiver_flags = ["/MACHINE:ARM64"], - default_link_flags = ["/MACHINE:ARM64"], - dbg_mode_debug_flag = "/DEBUG", - fastbuild_mode_debug_flag = "/DEBUG", -) - -toolchain( - name = "cc-toolchain-arm64_windows-clang-cl", - exec_compatible_with = [ - "@platforms//os:windows", - "@bazel_tools//tools/cpp:clang-cl", - ], - target_compatible_with = [ - "@platforms//cpu:arm64", - "@platforms//os:windows", - ], - toolchain = ":cc-compiler-arm64_windows-clang-cl", - toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", -) - -cc_toolchain( - name = "cc-compiler-armeabi-v7a", - toolchain_identifier = "stub_armeabi-v7a", - toolchain_config = ":stub_armeabi-v7a", - all_files = ":empty", - ar_files = ":empty", - as_files = ":empty", - compiler_files = ":empty", - dwp_files = ":empty", - linker_files = ":empty", - objcopy_files = ":empty", - strip_files = ":empty", - supports_param_files = 1, -) - -armeabi_cc_toolchain_config(name = "stub_armeabi-v7a") - -toolchain( - name = "cc-toolchain-armeabi-v7a", - exec_compatible_with = [ - ], - target_compatible_with = [ - "@platforms//cpu:armv7", - "@platforms//os:android", - ], - toolchain = ":cc-compiler-armeabi-v7a", - toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", -) diff --git a/toolchains/configs/windows/clang-cl/cc/WORKSPACE b/toolchains/configs/windows/clang-cl/cc/WORKSPACE deleted file mode 100644 index bc05b4c3..00000000 --- a/toolchains/configs/windows/clang-cl/cc/WORKSPACE +++ /dev/null @@ -1,2 +0,0 @@ -# DO NOT EDIT: automatically generated WORKSPACE file for cc_autoconf rule -workspace(name = "local_config_cc") diff --git a/toolchains/configs/windows/clang-cl/cc/armeabi_cc_toolchain_config.bzl b/toolchains/configs/windows/clang-cl/cc/armeabi_cc_toolchain_config.bzl deleted file mode 100644 index 72ef48ae..00000000 --- a/toolchains/configs/windows/clang-cl/cc/armeabi_cc_toolchain_config.bzl +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright 2019 The Bazel Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""A Starlark cc_toolchain configuration rule""" - -load( - "@bazel_tools//tools/cpp:cc_toolchain_config_lib.bzl", - "feature", - "tool_path", -) - -def _impl(ctx): - toolchain_identifier = "stub_armeabi-v7a" - host_system_name = "armeabi-v7a" - target_system_name = "armeabi-v7a" - target_cpu = "armeabi-v7a" - target_libc = "armeabi-v7a" - compiler = "compiler" - abi_version = "armeabi-v7a" - abi_libc_version = "armeabi-v7a" - cc_target_os = None - builtin_sysroot = None - action_configs = [] - - supports_pic_feature = feature(name = "supports_pic", enabled = True) - supports_dynamic_linker_feature = feature(name = "supports_dynamic_linker", enabled = True) - features = [supports_dynamic_linker_feature, supports_pic_feature] - - cxx_builtin_include_directories = [] - artifact_name_patterns = [] - make_variables = [] - - tool_paths = [ - tool_path(name = "ar", path = "/bin/false"), - tool_path(name = "cpp", path = "/bin/false"), - tool_path(name = "dwp", path = "/bin/false"), - tool_path(name = "gcc", path = "/bin/false"), - tool_path(name = "gcov", path = "/bin/false"), - tool_path(name = "ld", path = "/bin/false"), - tool_path(name = "llvm-profdata", path = "/bin/false"), - tool_path(name = "nm", path = "/bin/false"), - tool_path(name = "objcopy", path = "/bin/false"), - tool_path(name = "objdump", path = "/bin/false"), - tool_path(name = "strip", path = "/bin/false"), - ] - - return cc_common.create_cc_toolchain_config_info( - ctx = ctx, - features = features, - action_configs = action_configs, - artifact_name_patterns = artifact_name_patterns, - cxx_builtin_include_directories = cxx_builtin_include_directories, - toolchain_identifier = toolchain_identifier, - host_system_name = host_system_name, - target_system_name = target_system_name, - target_cpu = target_cpu, - target_libc = target_libc, - compiler = compiler, - abi_version = abi_version, - abi_libc_version = abi_libc_version, - tool_paths = tool_paths, - make_variables = make_variables, - builtin_sysroot = builtin_sysroot, - cc_target_os = cc_target_os, - ) - -armeabi_cc_toolchain_config = rule( - implementation = _impl, - attrs = {}, - provides = [CcToolchainConfigInfo], -) diff --git a/toolchains/configs/windows/clang-cl/cc/builtin_include_directory_paths_clangcl b/toolchains/configs/windows/clang-cl/cc/builtin_include_directory_paths_clangcl deleted file mode 100644 index f440b608..00000000 --- a/toolchains/configs/windows/clang-cl/cc/builtin_include_directory_paths_clangcl +++ /dev/null @@ -1,7 +0,0 @@ -This file is generated by cc_configure and contains builtin include directories -that clang-cl reported. This file is a dependency of every compilation action and -changes to it will be reflected in the action cache key. When some of these -paths change, Bazel will make sure to rerun the action, even though none of -declared action inputs or the action commandline changes. - - diff --git a/toolchains/configs/windows/clang-cl/cc/builtin_include_directory_paths_mingw b/toolchains/configs/windows/clang-cl/cc/builtin_include_directory_paths_mingw deleted file mode 100644 index 1621d8ea..00000000 --- a/toolchains/configs/windows/clang-cl/cc/builtin_include_directory_paths_mingw +++ /dev/null @@ -1,8 +0,0 @@ -This file is generated by cc_configure and contains builtin include directories -that mingw reported. This file is a dependency of every compilation action and -changes to it will be reflected in the action cache key. When some of these -paths change, Bazel will make sure to rerun the action, even though none of -declared action inputs or the action commandline changes. - - "c:/tools/msys64/mingw64/", - diff --git a/toolchains/configs/windows/clang-cl/cc/builtin_include_directory_paths_msvc b/toolchains/configs/windows/clang-cl/cc/builtin_include_directory_paths_msvc deleted file mode 100644 index 1380bc62..00000000 --- a/toolchains/configs/windows/clang-cl/cc/builtin_include_directory_paths_msvc +++ /dev/null @@ -1,7 +0,0 @@ -This file is generated by cc_configure and contains builtin include directories -that msvc reported. This file is a dependency of every compilation action and -changes to it will be reflected in the action cache key. When some of these -paths change, Bazel will make sure to rerun the action, even though none of -declared action inputs or the action commandline changes. - - diff --git a/toolchains/configs/windows/clang-cl/cc/get_env.bat b/toolchains/configs/windows/clang-cl/cc/get_env.bat deleted file mode 100644 index cc498d38..00000000 --- a/toolchains/configs/windows/clang-cl/cc/get_env.bat +++ /dev/null @@ -1,3 +0,0 @@ -@echo off -call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\VCVARSALL.BAT" amd64 -vcvars_ver=14.29.30133 > NUL -echo PATH=%PATH%,INCLUDE=%INCLUDE%,LIB=%LIB%,WINDOWSSDKDIR=%WINDOWSSDKDIR% diff --git a/toolchains/configs/windows/clang-cl/cc/msys_gcc_installation_error.bat b/toolchains/configs/windows/clang-cl/cc/msys_gcc_installation_error.bat deleted file mode 100644 index 25c35534..00000000 --- a/toolchains/configs/windows/clang-cl/cc/msys_gcc_installation_error.bat +++ /dev/null @@ -1,23 +0,0 @@ -:: Copyright 2018 The Bazel Authors. All rights reserved. -:: -:: Licensed under the Apache License, Version 2.0 (the "License"); -:: you may not use this file except in compliance with the License. -:: You may obtain a copy of the License at -:: -:: http://www.apache.org/licenses/LICENSE-2.0 -:: -:: Unless required by applicable law or agreed to in writing, software -:: distributed under the License is distributed on an "AS IS" BASIS, -:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -:: See the License for the specific language governing permissions and -:: limitations under the License. - -@echo OFF - -echo. 1>&2 -echo The target you are compiling requires MSYS gcc / MINGW gcc. 1>&2 -echo Bazel couldn't find gcc installation on your machine. 1>&2 -echo Please install MSYS gcc / MINGW gcc and set BAZEL_SH environment variable 1>&2 -echo. 1>&2 - -exit /b 1 diff --git a/toolchains/configs/windows/clang-cl/cc/vc_installation_error_arm.bat b/toolchains/configs/windows/clang-cl/cc/vc_installation_error_arm.bat deleted file mode 100644 index cd181a8e..00000000 --- a/toolchains/configs/windows/clang-cl/cc/vc_installation_error_arm.bat +++ /dev/null @@ -1,29 +0,0 @@ -:: Copyright 2017 The Bazel Authors. All rights reserved. -:: -:: Licensed under the Apache License, Version 2.0 (the "License"); -:: you may not use this file except in compliance with the License. -:: You may obtain a copy of the License at -:: -:: http://www.apache.org/licenses/LICENSE-2.0 -:: -:: Unless required by applicable law or agreed to in writing, software -:: distributed under the License is distributed on an "AS IS" BASIS, -:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -:: See the License for the specific language governing permissions and -:: limitations under the License. - -@echo OFF - -echo. 1>&2 -echo The target you are compiling requires Visual C++ build tools. 1>&2 -echo Bazel couldn't find a valid Visual C++ build tools installation on your machine. 1>&2 -echo. 1>&2 -echo Visual C++ build tools seems to be installed at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC 1>&2 -echo But Bazel can't find the following tools: 1>&2 -echo cl.exe, link.exe, lib.exe 1>&2 -echo for arm target architecture 1>&2 -echo. 1>&2 -echo Please check your installation following https://bazel.build/docs/windows#using 1>&2 -echo. 1>&2 - -exit /b 1 diff --git a/toolchains/configs/windows/clang-cl/cc/vc_installation_error_arm64.bat b/toolchains/configs/windows/clang-cl/cc/vc_installation_error_arm64.bat deleted file mode 100644 index 05536777..00000000 --- a/toolchains/configs/windows/clang-cl/cc/vc_installation_error_arm64.bat +++ /dev/null @@ -1,29 +0,0 @@ -:: Copyright 2017 The Bazel Authors. All rights reserved. -:: -:: Licensed under the Apache License, Version 2.0 (the "License"); -:: you may not use this file except in compliance with the License. -:: You may obtain a copy of the License at -:: -:: http://www.apache.org/licenses/LICENSE-2.0 -:: -:: Unless required by applicable law or agreed to in writing, software -:: distributed under the License is distributed on an "AS IS" BASIS, -:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -:: See the License for the specific language governing permissions and -:: limitations under the License. - -@echo OFF - -echo. 1>&2 -echo The target you are compiling requires Visual C++ build tools. 1>&2 -echo Bazel couldn't find a valid Visual C++ build tools installation on your machine. 1>&2 -echo. 1>&2 -echo Visual C++ build tools seems to be installed at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC 1>&2 -echo But Bazel can't find the following tools: 1>&2 -echo cl.exe, link.exe, lib.exe 1>&2 -echo for arm64 target architecture 1>&2 -echo. 1>&2 -echo Please check your installation following https://bazel.build/docs/windows#using 1>&2 -echo. 1>&2 - -exit /b 1 diff --git a/toolchains/configs/windows/clang-cl/cc/vc_installation_error_x86.bat b/toolchains/configs/windows/clang-cl/cc/vc_installation_error_x86.bat deleted file mode 100644 index 762a02ff..00000000 --- a/toolchains/configs/windows/clang-cl/cc/vc_installation_error_x86.bat +++ /dev/null @@ -1,29 +0,0 @@ -:: Copyright 2017 The Bazel Authors. All rights reserved. -:: -:: Licensed under the Apache License, Version 2.0 (the "License"); -:: you may not use this file except in compliance with the License. -:: You may obtain a copy of the License at -:: -:: http://www.apache.org/licenses/LICENSE-2.0 -:: -:: Unless required by applicable law or agreed to in writing, software -:: distributed under the License is distributed on an "AS IS" BASIS, -:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -:: See the License for the specific language governing permissions and -:: limitations under the License. - -@echo OFF - -echo. 1>&2 -echo The target you are compiling requires Visual C++ build tools. 1>&2 -echo Bazel couldn't find a valid Visual C++ build tools installation on your machine. 1>&2 -echo. 1>&2 -echo Visual C++ build tools seems to be installed at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC 1>&2 -echo But Bazel can't find the following tools: 1>&2 -echo cl.exe, link.exe, lib.exe, ml.exe 1>&2 -echo for x86 target architecture 1>&2 -echo. 1>&2 -echo Please check your installation following https://bazel.build/docs/windows#using 1>&2 -echo. 1>&2 - -exit /b 1 diff --git a/toolchains/configs/windows/clang-cl/cc/windows_cc_toolchain_config.bzl b/toolchains/configs/windows/clang-cl/cc/windows_cc_toolchain_config.bzl deleted file mode 100644 index e2f464a6..00000000 --- a/toolchains/configs/windows/clang-cl/cc/windows_cc_toolchain_config.bzl +++ /dev/null @@ -1,1421 +0,0 @@ -# Copyright 2019 The Bazel Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""A Starlark cc_toolchain configuration rule for Windows""" - -load( - "@bazel_tools//tools/cpp:cc_toolchain_config_lib.bzl", - "action_config", - "artifact_name_pattern", - "env_entry", - "env_set", - "feature", - "flag_group", - "flag_set", - "tool", - "tool_path", - "variable_with_value", - "with_feature_set", -) -load("@bazel_tools//tools/build_defs/cc:action_names.bzl", "ACTION_NAMES") - -all_compile_actions = [ - ACTION_NAMES.c_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.assemble, - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ACTION_NAMES.clif_match, - ACTION_NAMES.lto_backend, -] - -all_cpp_compile_actions = [ - ACTION_NAMES.cpp_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ACTION_NAMES.clif_match, -] - -preprocessor_compile_actions = [ - ACTION_NAMES.c_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.clif_match, -] - -codegen_compile_actions = [ - ACTION_NAMES.c_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.assemble, - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.cpp_module_codegen, - ACTION_NAMES.lto_backend, -] - -all_link_actions = [ - ACTION_NAMES.cpp_link_executable, - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, -] - -def _use_msvc_toolchain(ctx): - return ctx.attr.cpu in ["x64_windows", "arm64_windows"] and (ctx.attr.compiler == "msvc-cl" or ctx.attr.compiler == "clang-cl") - -def _impl(ctx): - if _use_msvc_toolchain(ctx): - artifact_name_patterns = [ - artifact_name_pattern( - category_name = "object_file", - prefix = "", - extension = ".obj", - ), - artifact_name_pattern( - category_name = "static_library", - prefix = "", - extension = ".lib", - ), - artifact_name_pattern( - category_name = "alwayslink_static_library", - prefix = "", - extension = ".lo.lib", - ), - artifact_name_pattern( - category_name = "executable", - prefix = "", - extension = ".exe", - ), - artifact_name_pattern( - category_name = "dynamic_library", - prefix = "", - extension = ".dll", - ), - artifact_name_pattern( - category_name = "interface_library", - prefix = "", - extension = ".if.lib", - ), - ] - else: - artifact_name_patterns = [ - artifact_name_pattern( - category_name = "executable", - prefix = "", - extension = ".exe", - ), - ] - - if _use_msvc_toolchain(ctx): - cpp_link_nodeps_dynamic_library_action = action_config( - action_name = ACTION_NAMES.cpp_link_nodeps_dynamic_library, - implies = [ - "nologo", - "shared_flag", - "linkstamps", - "output_execpath_flags", - "input_param_flags", - "user_link_flags", - "linker_subsystem_flag", - "linker_param_file", - "msvc_env", - "no_stripping", - "has_configured_linker_path", - "def_file", - ], - tools = [tool(path = ctx.attr.msvc_link_path)], - ) - - cpp_link_static_library_action = action_config( - action_name = ACTION_NAMES.cpp_link_static_library, - implies = [ - "nologo", - "archiver_flags", - "input_param_flags", - "linker_param_file", - "msvc_env", - ], - tools = [tool(path = ctx.attr.msvc_lib_path)], - ) - - assemble_action = action_config( - action_name = ACTION_NAMES.assemble, - implies = [ - "compiler_input_flags", - "compiler_output_flags", - "nologo", - "msvc_env", - "sysroot", - ], - tools = [tool(path = ctx.attr.msvc_ml_path)], - ) - - preprocess_assemble_action = action_config( - action_name = ACTION_NAMES.preprocess_assemble, - implies = [ - "compiler_input_flags", - "compiler_output_flags", - "nologo", - "msvc_env", - "sysroot", - ], - tools = [tool(path = ctx.attr.msvc_ml_path)], - ) - - c_compile_action = action_config( - action_name = ACTION_NAMES.c_compile, - implies = [ - "compiler_input_flags", - "compiler_output_flags", - "nologo", - "msvc_env", - "parse_showincludes", - "user_compile_flags", - "sysroot", - ], - tools = [tool(path = ctx.attr.msvc_cl_path)], - ) - - linkstamp_compile_action = action_config( - action_name = ACTION_NAMES.linkstamp_compile, - implies = [ - "compiler_input_flags", - "compiler_output_flags", - "default_compile_flags", - "nologo", - "msvc_env", - "parse_showincludes", - "user_compile_flags", - "sysroot", - "unfiltered_compile_flags", - ], - tools = [tool(path = ctx.attr.msvc_cl_path)], - ) - - cpp_compile_action = action_config( - action_name = ACTION_NAMES.cpp_compile, - implies = [ - "compiler_input_flags", - "compiler_output_flags", - "nologo", - "msvc_env", - "parse_showincludes", - "user_compile_flags", - "sysroot", - ], - tools = [tool(path = ctx.attr.msvc_cl_path)], - ) - - cpp_link_executable_action = action_config( - action_name = ACTION_NAMES.cpp_link_executable, - implies = [ - "nologo", - "linkstamps", - "output_execpath_flags", - "input_param_flags", - "user_link_flags", - "linker_subsystem_flag", - "linker_param_file", - "msvc_env", - "no_stripping", - ], - tools = [tool(path = ctx.attr.msvc_link_path)], - ) - - cpp_link_dynamic_library_action = action_config( - action_name = ACTION_NAMES.cpp_link_dynamic_library, - implies = [ - "nologo", - "shared_flag", - "linkstamps", - "output_execpath_flags", - "input_param_flags", - "user_link_flags", - "linker_subsystem_flag", - "linker_param_file", - "msvc_env", - "no_stripping", - "has_configured_linker_path", - "def_file", - ], - tools = [tool(path = ctx.attr.msvc_link_path)], - ) - - action_configs = [ - assemble_action, - preprocess_assemble_action, - c_compile_action, - linkstamp_compile_action, - cpp_compile_action, - cpp_link_executable_action, - cpp_link_dynamic_library_action, - cpp_link_nodeps_dynamic_library_action, - cpp_link_static_library_action, - ] - else: - action_configs = [] - - if _use_msvc_toolchain(ctx): - msvc_link_env_feature = feature( - name = "msvc_link_env", - env_sets = [ - env_set( - actions = all_link_actions + - [ACTION_NAMES.cpp_link_static_library], - env_entries = [env_entry(key = "LIB", value = ctx.attr.msvc_env_lib)], - ), - ], - ) - - shared_flag_feature = feature( - name = "shared_flag", - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ], - flag_groups = [flag_group(flags = ["/DLL"])], - ), - ], - ) - - determinism_feature = feature( - name = "determinism", - enabled = True, - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [ - flag_group( - flags = [ - "/wd4117", - "-D__DATE__=\"redacted\"", - "-D__TIMESTAMP__=\"redacted\"", - "-D__TIME__=\"redacted\"", - ] + (["-Wno-builtin-macro-redefined"] if ctx.attr.compiler == "clang-cl" else []), - ), - ], - ), - ], - ) - - sysroot_feature = feature( - name = "sysroot", - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.assemble, - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.c_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ACTION_NAMES.cpp_link_executable, - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ], - flag_groups = [ - flag_group( - flags = ["--sysroot=%{sysroot}"], - iterate_over = "sysroot", - expand_if_available = "sysroot", - ), - ], - ), - ], - ) - - unfiltered_compile_flags_feature = feature( - name = "unfiltered_compile_flags", - enabled = True, - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.c_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ], - flag_groups = [ - flag_group( - flags = ["%{unfiltered_compile_flags}"], - iterate_over = "unfiltered_compile_flags", - expand_if_available = "unfiltered_compile_flags", - ), - ], - ), - ], - ) - - archive_param_file_feature = feature( - name = "archive_param_file", - enabled = True, - ) - - compiler_param_file_feature = feature( - name = "compiler_param_file", - ) - - copy_dynamic_libraries_to_binary_feature = feature( - name = "copy_dynamic_libraries_to_binary", - ) - - input_param_flags_feature = feature( - name = "input_param_flags", - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ], - flag_groups = [ - flag_group( - flags = ["/IMPLIB:%{interface_library_output_path}"], - expand_if_available = "interface_library_output_path", - ), - ], - ), - flag_set( - actions = all_link_actions, - flag_groups = [ - flag_group( - flags = ["%{libopts}"], - iterate_over = "libopts", - expand_if_available = "libopts", - ), - ], - ), - flag_set( - actions = all_link_actions + - [ACTION_NAMES.cpp_link_static_library], - flag_groups = [ - flag_group( - iterate_over = "libraries_to_link", - flag_groups = [ - flag_group( - iterate_over = "libraries_to_link.object_files", - flag_groups = [flag_group(flags = ["%{libraries_to_link.object_files}"])], - expand_if_equal = variable_with_value( - name = "libraries_to_link.type", - value = "object_file_group", - ), - ), - flag_group( - flag_groups = [flag_group(flags = ["%{libraries_to_link.name}"])], - expand_if_equal = variable_with_value( - name = "libraries_to_link.type", - value = "object_file", - ), - ), - flag_group( - flag_groups = [flag_group(flags = ["%{libraries_to_link.name}"])], - expand_if_equal = variable_with_value( - name = "libraries_to_link.type", - value = "interface_library", - ), - ), - flag_group( - flag_groups = [ - flag_group( - flags = ["%{libraries_to_link.name}"], - expand_if_false = "libraries_to_link.is_whole_archive", - ), - flag_group( - flags = ["/WHOLEARCHIVE:%{libraries_to_link.name}"], - expand_if_true = "libraries_to_link.is_whole_archive", - ), - ], - expand_if_equal = variable_with_value( - name = "libraries_to_link.type", - value = "static_library", - ), - ), - ], - expand_if_available = "libraries_to_link", - ), - ], - ), - ], - ) - - fastbuild_feature = feature( - name = "fastbuild", - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [flag_group(flags = ["/Od", "/Z7"])], - ), - flag_set( - actions = all_link_actions, - flag_groups = [ - flag_group( - flags = [ctx.attr.fastbuild_mode_debug_flag, "/INCREMENTAL:NO"], - ), - ], - ), - ], - implies = ["generate_pdb_file"], - ) - - user_compile_flags_feature = feature( - name = "user_compile_flags", - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.c_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ], - flag_groups = [ - flag_group( - flags = ["%{user_compile_flags}"], - iterate_over = "user_compile_flags", - expand_if_available = "user_compile_flags", - ), - ], - ), - ], - ) - - archiver_flags_feature = feature( - name = "archiver_flags", - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.cpp_link_static_library], - flag_groups = [ - flag_group( - flags = ["/OUT:%{output_execpath}"], - expand_if_available = "output_execpath", - ), - flag_group( - flags = ctx.attr.archiver_flags, - ), - ], - ), - ], - ) - - default_link_flags_feature = feature( - name = "default_link_flags", - enabled = True, - flag_sets = [ - flag_set( - actions = all_link_actions, - flag_groups = [flag_group(flags = ctx.attr.default_link_flags)], - ), - ], - ) - - static_link_msvcrt_feature = feature( - name = "static_link_msvcrt", - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [flag_group(flags = ["/MT"])], - with_features = [with_feature_set(not_features = ["dbg"])], - ), - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [flag_group(flags = ["/MTd"])], - with_features = [with_feature_set(features = ["dbg"])], - ), - flag_set( - actions = all_link_actions, - flag_groups = [flag_group(flags = ["/DEFAULTLIB:libcmt.lib"])], - with_features = [with_feature_set(not_features = ["dbg"])], - ), - flag_set( - actions = all_link_actions, - flag_groups = [flag_group(flags = ["/DEFAULTLIB:libcmtd.lib"])], - with_features = [with_feature_set(features = ["dbg"])], - ), - ], - ) - - dynamic_link_msvcrt_feature = feature( - name = "dynamic_link_msvcrt", - enabled = True, - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [flag_group(flags = ["/MD"])], - with_features = [with_feature_set(not_features = ["dbg", "static_link_msvcrt"])], - ), - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [flag_group(flags = ["/MDd"])], - with_features = [with_feature_set(features = ["dbg"], not_features = ["static_link_msvcrt"])], - ), - flag_set( - actions = all_link_actions, - flag_groups = [flag_group(flags = ["/DEFAULTLIB:msvcrt.lib"])], - with_features = [with_feature_set(not_features = ["dbg", "static_link_msvcrt"])], - ), - flag_set( - actions = all_link_actions, - flag_groups = [flag_group(flags = ["/DEFAULTLIB:msvcrtd.lib"])], - with_features = [with_feature_set(features = ["dbg"], not_features = ["static_link_msvcrt"])], - ), - ], - ) - - dbg_feature = feature( - name = "dbg", - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [flag_group(flags = ["/Od", "/Z7"])], - ), - flag_set( - actions = all_link_actions, - flag_groups = [ - flag_group( - flags = [ctx.attr.dbg_mode_debug_flag, "/INCREMENTAL:NO"], - ), - ], - ), - ], - implies = ["generate_pdb_file"], - ) - - opt_feature = feature( - name = "opt", - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [flag_group(flags = ["/O2"])], - ), - ], - implies = ["frame_pointer"], - ) - - supports_interface_shared_libraries_feature = feature( - name = "supports_interface_shared_libraries", - enabled = True, - ) - - user_link_flags_feature = feature( - name = "user_link_flags", - flag_sets = [ - flag_set( - actions = all_link_actions, - flag_groups = [ - flag_group( - flags = ["%{user_link_flags}"], - iterate_over = "user_link_flags", - expand_if_available = "user_link_flags", - ), - ], - ), - ], - ) - - default_compile_flags_feature = feature( - name = "default_compile_flags", - enabled = True, - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.assemble, - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.c_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ACTION_NAMES.lto_backend, - ACTION_NAMES.clif_match, - ], - flag_groups = [ - flag_group( - flags = [ - "/DCOMPILER_MSVC", - "/DNOMINMAX", - "/D_WIN32_WINNT=0x0601", - "/D_CRT_SECURE_NO_DEPRECATE", - "/D_CRT_SECURE_NO_WARNINGS", - "/bigobj", - "/Zm500", - "/EHsc", - "/wd4351", - "/wd4291", - "/wd4250", - "/wd4996", - ], - ), - ], - ), - ], - ) - - msvc_compile_env_feature = feature( - name = "msvc_compile_env", - env_sets = [ - env_set( - actions = [ - ACTION_NAMES.c_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.assemble, - ACTION_NAMES.preprocess_assemble, - ], - env_entries = [env_entry(key = "INCLUDE", value = ctx.attr.msvc_env_include)], - ), - ], - ) - - preprocessor_defines_feature = feature( - name = "preprocessor_defines", - enabled = True, - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.assemble, - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.c_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ], - flag_groups = [ - flag_group( - flags = ["/D%{preprocessor_defines}"], - iterate_over = "preprocessor_defines", - ), - ], - ), - ], - ) - - generate_pdb_file_feature = feature( - name = "generate_pdb_file", - ) - - output_execpath_flags_feature = feature( - name = "output_execpath_flags", - flag_sets = [ - flag_set( - actions = all_link_actions, - flag_groups = [ - flag_group( - flags = ["/OUT:%{output_execpath}"], - expand_if_available = "output_execpath", - ), - ], - ), - ], - ) - - disable_assertions_feature = feature( - name = "disable_assertions", - enabled = True, - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [flag_group(flags = ["/DNDEBUG"])], - with_features = [with_feature_set(features = ["opt"])], - ), - ], - ) - - has_configured_linker_path_feature = feature(name = "has_configured_linker_path") - - supports_dynamic_linker_feature = feature(name = "supports_dynamic_linker", enabled = True) - - no_stripping_feature = feature(name = "no_stripping") - - linker_param_file_feature = feature( - name = "linker_param_file", - flag_sets = [ - flag_set( - actions = all_link_actions + - [ACTION_NAMES.cpp_link_static_library], - flag_groups = [ - flag_group( - flags = ["@%{linker_param_file}"], - expand_if_available = "linker_param_file", - ), - ], - ), - ], - ) - - ignore_noisy_warnings_feature = feature( - name = "ignore_noisy_warnings", - enabled = True, - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.cpp_link_static_library], - flag_groups = [flag_group(flags = ["/ignore:4221"])], - ), - ], - ) - - no_legacy_features_feature = feature(name = "no_legacy_features") - - parse_showincludes_feature = feature( - name = "parse_showincludes", - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.c_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_header_parsing, - ], - flag_groups = [flag_group(flags = ["/showIncludes"])], - ), - ], - ) - - treat_warnings_as_errors_feature = feature( - name = "treat_warnings_as_errors", - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile] + all_link_actions, - flag_groups = [flag_group(flags = ["/WX"])], - ), - ], - ) - - windows_export_all_symbols_feature = feature(name = "windows_export_all_symbols") - - no_windows_export_all_symbols_feature = feature(name = "no_windows_export_all_symbols") - - include_paths_feature = feature( - name = "include_paths", - enabled = True, - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.assemble, - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.c_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ], - flag_groups = [ - flag_group( - flags = ["/I%{quote_include_paths}"], - iterate_over = "quote_include_paths", - ), - flag_group( - flags = ["/I%{include_paths}"], - iterate_over = "include_paths", - ), - flag_group( - flags = ["/I%{system_include_paths}"], - iterate_over = "system_include_paths", - ), - ], - ), - ], - ) - - external_include_paths_feature = feature( - name = "external_include_paths", - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.c_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.clif_match, - ACTION_NAMES.objc_compile, - ACTION_NAMES.objcpp_compile, - ], - flag_groups = [ - flag_group( - flags = ["/external:I", "%{external_include_paths}"], - iterate_over = "external_include_paths", - expand_if_available = "external_include_paths", - ), - ], - ), - ], - ) - - linkstamps_feature = feature( - name = "linkstamps", - flag_sets = [ - flag_set( - actions = all_link_actions, - flag_groups = [ - flag_group( - flags = ["%{linkstamp_paths}"], - iterate_over = "linkstamp_paths", - expand_if_available = "linkstamp_paths", - ), - ], - ), - ], - ) - - targets_windows_feature = feature( - name = "targets_windows", - enabled = True, - implies = ["copy_dynamic_libraries_to_binary"], - ) - - linker_subsystem_flag_feature = feature( - name = "linker_subsystem_flag", - flag_sets = [ - flag_set( - actions = all_link_actions, - flag_groups = [flag_group(flags = ["/SUBSYSTEM:CONSOLE"])], - ), - ], - ) - - frame_pointer_feature = feature( - name = "frame_pointer", - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [flag_group(flags = ["/Oy-"])], - ), - ], - ) - - compiler_output_flags_feature = feature( - name = "compiler_output_flags", - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.assemble], - flag_groups = [ - flag_group( - flag_groups = [ - flag_group( - flags = ["/Fo%{output_file}", "/Zi"], - expand_if_available = "output_file", - expand_if_not_available = "output_assembly_file", - ), - ], - expand_if_not_available = "output_preprocess_file", - ), - ], - ), - flag_set( - actions = [ - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.c_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ], - flag_groups = [ - flag_group( - flag_groups = [ - flag_group( - flags = ["/Fo%{output_file}"], - expand_if_not_available = "output_preprocess_file", - ), - ], - expand_if_available = "output_file", - expand_if_not_available = "output_assembly_file", - ), - flag_group( - flag_groups = [ - flag_group( - flags = ["/Fa%{output_file}"], - expand_if_available = "output_assembly_file", - ), - ], - expand_if_available = "output_file", - ), - flag_group( - flag_groups = [ - flag_group( - flags = ["/P", "/Fi%{output_file}"], - expand_if_available = "output_preprocess_file", - ), - ], - expand_if_available = "output_file", - ), - ], - ), - ], - ) - - nologo_feature = feature( - name = "nologo", - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.c_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.assemble, - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.cpp_link_executable, - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ACTION_NAMES.cpp_link_static_library, - ], - flag_groups = [flag_group(flags = ["/nologo"])], - ), - ], - ) - - smaller_binary_feature = feature( - name = "smaller_binary", - enabled = True, - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [flag_group(flags = ["/Gy", "/Gw"])], - with_features = [with_feature_set(features = ["opt"])], - ), - flag_set( - actions = all_link_actions, - flag_groups = [flag_group(flags = ["/OPT:ICF", "/OPT:REF"])], - with_features = [with_feature_set(features = ["opt"])], - ), - ], - ) - - compiler_input_flags_feature = feature( - name = "compiler_input_flags", - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.assemble, - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.c_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ], - flag_groups = [ - flag_group( - flags = ["/c", "%{source_file}"], - expand_if_available = "source_file", - ), - ], - ), - ], - ) - - def_file_feature = feature( - name = "def_file", - flag_sets = [ - flag_set( - actions = all_link_actions, - flag_groups = [ - flag_group( - flags = ["/DEF:%{def_file_path}", "/ignore:4070"], - expand_if_available = "def_file_path", - ), - ], - ), - ], - ) - - msvc_env_feature = feature( - name = "msvc_env", - env_sets = [ - env_set( - actions = [ - ACTION_NAMES.c_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.assemble, - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.cpp_link_executable, - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ACTION_NAMES.cpp_link_static_library, - ], - env_entries = [ - env_entry(key = "PATH", value = ctx.attr.msvc_env_path), - env_entry(key = "TMP", value = ctx.attr.msvc_env_tmp), - env_entry(key = "TEMP", value = ctx.attr.msvc_env_tmp), - ], - ), - ], - implies = ["msvc_compile_env", "msvc_link_env"], - ) - features = [ - no_legacy_features_feature, - nologo_feature, - has_configured_linker_path_feature, - no_stripping_feature, - targets_windows_feature, - copy_dynamic_libraries_to_binary_feature, - default_compile_flags_feature, - msvc_env_feature, - msvc_compile_env_feature, - msvc_link_env_feature, - include_paths_feature, - external_include_paths_feature, - preprocessor_defines_feature, - parse_showincludes_feature, - generate_pdb_file_feature, - shared_flag_feature, - linkstamps_feature, - output_execpath_flags_feature, - archiver_flags_feature, - input_param_flags_feature, - linker_subsystem_flag_feature, - user_link_flags_feature, - default_link_flags_feature, - linker_param_file_feature, - static_link_msvcrt_feature, - dynamic_link_msvcrt_feature, - dbg_feature, - fastbuild_feature, - opt_feature, - frame_pointer_feature, - disable_assertions_feature, - determinism_feature, - treat_warnings_as_errors_feature, - smaller_binary_feature, - ignore_noisy_warnings_feature, - user_compile_flags_feature, - sysroot_feature, - unfiltered_compile_flags_feature, - archive_param_file_feature, - compiler_param_file_feature, - compiler_output_flags_feature, - compiler_input_flags_feature, - def_file_feature, - windows_export_all_symbols_feature, - no_windows_export_all_symbols_feature, - supports_dynamic_linker_feature, - supports_interface_shared_libraries_feature, - ] - else: - targets_windows_feature = feature( - name = "targets_windows", - implies = ["copy_dynamic_libraries_to_binary"], - enabled = True, - ) - - copy_dynamic_libraries_to_binary_feature = feature(name = "copy_dynamic_libraries_to_binary") - - gcc_env_feature = feature( - name = "gcc_env", - enabled = True, - env_sets = [ - env_set( - actions = [ - ACTION_NAMES.c_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.assemble, - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.cpp_link_executable, - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ACTION_NAMES.cpp_link_static_library, - ], - env_entries = [ - env_entry(key = "PATH", value = ctx.attr.tool_bin_path), - ], - ), - ], - ) - - default_compile_flags_feature = feature( - name = "default_compile_flags", - enabled = True, - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ACTION_NAMES.lto_backend, - ACTION_NAMES.clif_match, - ], - flag_groups = [flag_group(flags = ["-std=gnu++0x"])], - ), - ], - ) - - default_link_flags_feature = feature( - name = "default_link_flags", - enabled = True, - flag_sets = [ - flag_set( - actions = all_link_actions, - flag_groups = [flag_group(flags = ["-lstdc++"])], - ), - ], - ) - - supports_dynamic_linker_feature = feature( - name = "supports_dynamic_linker", - enabled = True, - ) - - dbg_feature = feature( - name = "dbg", - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [flag_group(flags = ["-g", "-Og"])], - ), - ], - ) - - opt_feature = feature( - name = "opt", - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [flag_group(flags = [ - "-g0", - "-O3", - "-DNDEBUG", - "-ffunction-sections", - "-fdata-sections", - ])], - ), - flag_set( - actions = all_link_actions, - flag_groups = [flag_group(flags = ["-Wl,--gc-sections"])], - ), - ], - ) - - if ctx.attr.cpu == "x64_windows" and ctx.attr.compiler == "mingw-gcc": - archive_param_file_feature = feature( - name = "archive_param_file", - enabled = True, - ) - - compiler_param_file_feature = feature( - name = "compiler_param_file", - ) - - features = [ - targets_windows_feature, - copy_dynamic_libraries_to_binary_feature, - gcc_env_feature, - default_compile_flags_feature, - archive_param_file_feature, - compiler_param_file_feature, - default_link_flags_feature, - supports_dynamic_linker_feature, - dbg_feature, - opt_feature, - ] - else: - supports_pic_feature = feature( - name = "supports_pic", - enabled = True, - ) - - sysroot_feature = feature( - name = "sysroot", - enabled = True, - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.c_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ACTION_NAMES.lto_backend, - ACTION_NAMES.clif_match, - ACTION_NAMES.cpp_link_executable, - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ], - flag_groups = [ - flag_group( - flags = ["--sysroot=%{sysroot}"], - expand_if_available = "sysroot", - ), - ], - ), - ], - ) - - fdo_optimize_feature = feature( - name = "fdo_optimize", - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [ - flag_group( - flags = [ - "-fprofile-use=%{fdo_profile_path}", - "-fprofile-correction", - ], - expand_if_available = "fdo_profile_path", - ), - ], - ), - ], - provides = ["profile"], - ) - - treat_warnings_as_errors_feature = feature( - name = "treat_warnings_as_errors", - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [flag_group(flags = ["-Werror"])], - ), - flag_set( - actions = all_link_actions, - flag_groups = [flag_group(flags = ["-Wl,-fatal-warnings"])], - ), - ], - ) - - user_compile_flags_feature = feature( - name = "user_compile_flags", - enabled = True, - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.assemble, - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.c_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ACTION_NAMES.lto_backend, - ACTION_NAMES.clif_match, - ], - flag_groups = [ - flag_group( - flags = ["%{user_compile_flags}"], - iterate_over = "user_compile_flags", - expand_if_available = "user_compile_flags", - ), - ], - ), - ], - ) - - features = [ - targets_windows_feature, - copy_dynamic_libraries_to_binary_feature, - gcc_env_feature, - supports_pic_feature, - default_compile_flags_feature, - default_link_flags_feature, - fdo_optimize_feature, - supports_dynamic_linker_feature, - dbg_feature, - opt_feature, - user_compile_flags_feature, - treat_warnings_as_errors_feature, - sysroot_feature, - ] - - tool_paths = [ - tool_path(name = name, path = path) - for name, path in ctx.attr.tool_paths.items() - ] - - return cc_common.create_cc_toolchain_config_info( - ctx = ctx, - features = features, - action_configs = action_configs, - artifact_name_patterns = artifact_name_patterns, - cxx_builtin_include_directories = ctx.attr.cxx_builtin_include_directories, - toolchain_identifier = ctx.attr.toolchain_identifier, - host_system_name = ctx.attr.host_system_name, - target_system_name = ctx.attr.target_system_name, - target_cpu = ctx.attr.cpu, - target_libc = ctx.attr.target_libc, - compiler = ctx.attr.compiler, - abi_version = ctx.attr.abi_version, - abi_libc_version = ctx.attr.abi_libc_version, - tool_paths = tool_paths, - ) - -cc_toolchain_config = rule( - implementation = _impl, - attrs = { - "cpu": attr.string(mandatory = True), - "compiler": attr.string(), - "toolchain_identifier": attr.string(), - "host_system_name": attr.string(), - "target_system_name": attr.string(), - "target_libc": attr.string(), - "abi_version": attr.string(), - "abi_libc_version": attr.string(), - "tool_paths": attr.string_dict(), - "cxx_builtin_include_directories": attr.string_list(), - "archiver_flags": attr.string_list(default = []), - "default_link_flags": attr.string_list(default = []), - "msvc_env_tmp": attr.string(default = "msvc_not_found"), - "msvc_env_path": attr.string(default = "msvc_not_found"), - "msvc_env_include": attr.string(default = "msvc_not_found"), - "msvc_env_lib": attr.string(default = "msvc_not_found"), - "msvc_cl_path": attr.string(default = "vc_installation_error.bat"), - "msvc_ml_path": attr.string(default = "vc_installation_error.bat"), - "msvc_link_path": attr.string(default = "vc_installation_error.bat"), - "msvc_lib_path": attr.string(default = "vc_installation_error.bat"), - "dbg_mode_debug_flag": attr.string(), - "fastbuild_mode_debug_flag": attr.string(), - "tool_bin_path": attr.string(default = "not_found"), - }, - provides = [CcToolchainConfigInfo], -) diff --git a/toolchains/configs/windows/clang-cl/config/BUILD b/toolchains/configs/windows/clang-cl/config/BUILD deleted file mode 100644 index 754d85fe..00000000 --- a/toolchains/configs/windows/clang-cl/config/BUILD +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 2020 The Bazel Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This file is auto-generated by github.com/bazelbuild/bazel-toolchains/pkg/rbeconfigsgen -# and should not be modified directly. - -package(default_visibility = ["//visibility:public"]) - - -toolchain( - name = "cc-toolchain", - exec_compatible_with = [ - "@platforms//os:windows", - "@platforms//cpu:x86_64", - ], - target_compatible_with = [ - "@platforms//os:windows", - "@platforms//cpu:x86_64", - ], - toolchain = "//toolchains/configs/windows/clang-cl/cc:cc-compiler-x64_windows", - toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", -) - -platform( - name = "platform", - parents = ["@local_config_platform//:host"], - constraint_values = [ - "@platforms//os:windows", - "@platforms//cpu:x86_64", - ], - exec_properties = { - "container-image": "docker://gcr.io/envoy-ci/envoy-build-windows@sha256:58d28de214e3b22907f59ebf5ce8b84424b1f938f7ee4eeb5c327c83388df264", - "OSFamily": "Windows", - }, -) diff --git a/toolchains/configs/windows/msvc-cl/LICENSE b/toolchains/configs/windows/msvc-cl/LICENSE deleted file mode 100644 index f0a1f59a..00000000 --- a/toolchains/configs/windows/msvc-cl/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2021 Google LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/toolchains/configs/windows/msvc-cl/cc/BUILD b/toolchains/configs/windows/msvc-cl/cc/BUILD deleted file mode 100644 index 685fef66..00000000 --- a/toolchains/configs/windows/msvc-cl/cc/BUILD +++ /dev/null @@ -1,619 +0,0 @@ -# Copyright 2018 The Bazel Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This becomes the BUILD file for @local_config_cc// under Windows. - -load("@rules_cc//cc:defs.bzl", "cc_toolchain", "cc_toolchain_suite", "cc_library") -load(":windows_cc_toolchain_config.bzl", "cc_toolchain_config") -load(":armeabi_cc_toolchain_config.bzl", "armeabi_cc_toolchain_config") - -package(default_visibility = ["//visibility:public"]) - -cc_library( - name = "malloc", -) - -filegroup( - name = "empty", - srcs = [], -) - -filegroup( - name = "mingw_compiler_files", - srcs = [":builtin_include_directory_paths_mingw"] -) - -filegroup( - name = "clangcl_compiler_files", - srcs = [":builtin_include_directory_paths_clangcl"] -) - -filegroup( - name = "msvc_compiler_files", - srcs = [":builtin_include_directory_paths_msvc"] -) - -# Hardcoded toolchain, legacy behaviour. -cc_toolchain_suite( - name = "toolchain", - toolchains = { - "armeabi-v7a|compiler": ":cc-compiler-armeabi-v7a", - "x64_windows|msvc-cl": ":cc-compiler-x64_windows", - "x64_x86_windows|msvc-cl": ":cc-compiler-x64_x86_windows", - "x64_arm_windows|msvc-cl": ":cc-compiler-x64_arm_windows", - "x64_arm64_windows|msvc-cl": ":cc-compiler-arm64_windows", - "arm64_windows|msvc-cl": ":cc-compiler-arm64_windows", - "x64_windows|msys-gcc": ":cc-compiler-x64_windows_msys", - "x64_windows|mingw-gcc": ":cc-compiler-x64_windows_mingw", - "x64_windows|clang-cl": ":cc-compiler-x64_windows-clang-cl", - "x64_windows_msys": ":cc-compiler-x64_windows_msys", - "x64_windows": ":cc-compiler-x64_windows", - "x64_x86_windows": ":cc-compiler-x64_x86_windows", - "x64_arm_windows": ":cc-compiler-x64_arm_windows", - "x64_arm64_windows": ":cc-compiler-arm64_windows", - "arm64_windows": ":cc-compiler-arm64_windows", - "x64_arm64_windows|clang-cl": ":cc-compiler-arm64_windows-clang-cl", - "arm64_windows|clang-cl": ":cc-compiler-arm64_windows-clang-cl", - "armeabi-v7a": ":cc-compiler-armeabi-v7a", - }, -) - -cc_toolchain( - name = "cc-compiler-x64_windows_msys", - toolchain_identifier = "msys_x64", - toolchain_config = ":msys_x64", - all_files = ":empty", - ar_files = ":empty", - as_files = ":mingw_compiler_files", - compiler_files = ":mingw_compiler_files", - dwp_files = ":empty", - linker_files = ":empty", - objcopy_files = ":empty", - strip_files = ":empty", - supports_param_files = 1, -) - -cc_toolchain_config( - name = "msys_x64", - cpu = "x64_windows", - compiler = "msys-gcc", - host_system_name = "local", - target_system_name = "local", - target_libc = "msys", - abi_version = "local", - abi_libc_version = "local", - cxx_builtin_include_directories = [ "c:/tools/msys64/usr/", - ], - tool_paths = {"ar": "c:/tools/msys64/usr/bin/ar", - "cpp": "c:/tools/msys64/usr/bin/cpp", - "dwp": "c:/tools/msys64/usr/bin/dwp", - "gcc": "c:/tools/msys64/usr/bin/gcc", - "gcov": "c:/tools/msys64/usr/bin/gcov", - "ld": "c:/tools/msys64/usr/bin/ld", - "nm": "c:/tools/msys64/usr/bin/nm", - "objcopy": "c:/tools/msys64/usr/bin/objcopy", - "objdump": "c:/tools/msys64/usr/bin/objdump", - "strip": "c:/tools/msys64/usr/bin/strip"}, - tool_bin_path = "c:/tools/msys64/usr/bin", - dbg_mode_debug_flag = "/DEBUG:FULL", - fastbuild_mode_debug_flag = "/DEBUG:FASTLINK", -) - -toolchain( - name = "cc-toolchain-x64_windows_msys", - exec_compatible_with = [ - "@platforms//cpu:x86_64", - "@platforms//os:windows", - "@bazel_tools//tools/cpp:msys", - ], - target_compatible_with = [ - "@platforms//cpu:x86_64", - "@platforms//os:windows", - ], - toolchain = ":cc-compiler-x64_windows_msys", - toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", -) - -cc_toolchain( - name = "cc-compiler-x64_windows_mingw", - toolchain_identifier = "msys_x64_mingw", - toolchain_config = ":msys_x64_mingw", - all_files = ":empty", - ar_files = ":empty", - as_files = ":mingw_compiler_files", - compiler_files = ":mingw_compiler_files", - dwp_files = ":empty", - linker_files = ":empty", - objcopy_files = ":empty", - strip_files = ":empty", - supports_param_files = 0, -) - -cc_toolchain_config( - name = "msys_x64_mingw", - cpu = "x64_windows", - compiler = "mingw-gcc", - host_system_name = "local", - target_system_name = "local", - target_libc = "mingw", - abi_version = "local", - abi_libc_version = "local", - tool_bin_path = "c:/tools/msys64/mingw64/bin", - cxx_builtin_include_directories = [ "c:/tools/msys64/mingw64/", - ], - tool_paths = {"ar": "c:/tools/msys64/mingw64/bin/ar", - "cpp": "c:/tools/msys64/mingw64/bin/cpp", - "dwp": "c:/tools/msys64/mingw64/bin/dwp", - "gcc": "c:/tools/msys64/mingw64/bin/gcc", - "gcov": "c:/tools/msys64/mingw64/bin/gcov", - "ld": "c:/tools/msys64/mingw64/bin/ld", - "nm": "c:/tools/msys64/mingw64/bin/nm", - "objcopy": "c:/tools/msys64/mingw64/bin/objcopy", - "objdump": "c:/tools/msys64/mingw64/bin/objdump", - "strip": "c:/tools/msys64/mingw64/bin/strip"}, - dbg_mode_debug_flag = "/DEBUG:FULL", - fastbuild_mode_debug_flag = "/DEBUG:FASTLINK", -) - -toolchain( - name = "cc-toolchain-x64_windows_mingw", - exec_compatible_with = [ - "@platforms//cpu:x86_64", - "@platforms//os:windows", - "@bazel_tools//tools/cpp:mingw", - ], - target_compatible_with = [ - "@platforms//cpu:x86_64", - "@platforms//os:windows", - ], - toolchain = ":cc-compiler-x64_windows_mingw", - toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", -) - -cc_toolchain( - name = "cc-compiler-x64_windows", - toolchain_identifier = "msvc_x64", - toolchain_config = ":msvc_x64", - all_files = ":empty", - ar_files = ":empty", - as_files = ":msvc_compiler_files", - compiler_files = ":msvc_compiler_files", - dwp_files = ":empty", - linker_files = ":empty", - objcopy_files = ":empty", - strip_files = ":empty", - supports_param_files = 1, -) - -cc_toolchain_config( - name = "msvc_x64", - cpu = "x64_windows", - compiler = "msvc-cl", - host_system_name = "local", - target_system_name = "local", - target_libc = "msvcrt", - abi_version = "local", - abi_libc_version = "local", - toolchain_identifier = "msvc_x64", - msvc_env_tmp = "C:\\Windows\\Temp", - msvc_env_path = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX64\\x64;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\IDE\\VC\\VCPackages;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\IDE\\CommonExtensions\\Microsoft\\TestWindow;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\IDE\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\MSBuild\\Current\\bin\\Roslyn;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\Tools\\devinit;C:\\Program Files (x86)\\Windows Kits\\10\\bin\\10.0.22000.0\\x64;C:\\Program Files (x86)\\Windows Kits\\10\\bin\\x64;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\\\MSBuild\\Current\\Bin;C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\IDE\\;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\Tools\\;;C:\\Windows\\system32", - msvc_env_include = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\include;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\ucrt;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\shared;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\um;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\winrt;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\cppwinrt", - msvc_env_lib = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\lib\\x64;C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.22000.0\\ucrt\\x64;C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.22000.0\\um\\x64", - msvc_cl_path = "C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/cl.exe", - msvc_ml_path = "C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/ml64.exe", - msvc_link_path = "C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/link.exe", - msvc_lib_path = "C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/lib.exe", - cxx_builtin_include_directories = [ "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\include", - "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\ucrt", - "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\shared", - "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\um", - "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\winrt", - "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\cppwinrt"], - tool_paths = { - "ar": "C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/lib.exe", - "ml": "C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/ml64.exe", - "cpp": "C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/cl.exe", - "gcc": "C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/cl.exe", - "gcov": "wrapper/bin/msvc_nop.bat", - "ld": "C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/link.exe", - "nm": "wrapper/bin/msvc_nop.bat", - "objcopy": "wrapper/bin/msvc_nop.bat", - "objdump": "wrapper/bin/msvc_nop.bat", - "strip": "wrapper/bin/msvc_nop.bat", - }, - archiver_flags = ["/MACHINE:X64"], - default_link_flags = ["/MACHINE:X64"], - dbg_mode_debug_flag = "/DEBUG:FULL", - fastbuild_mode_debug_flag = "/DEBUG:FASTLINK", -) - -toolchain( - name = "cc-toolchain-x64_windows", - exec_compatible_with = [ - "@platforms//cpu:x86_64", - "@platforms//os:windows", - ], - target_compatible_with = [ - "@platforms//cpu:x86_64", - "@platforms//os:windows", - ], - toolchain = ":cc-compiler-x64_windows", - toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", -) - -cc_toolchain( - name = "cc-compiler-x64_x86_windows", - toolchain_identifier = "msvc_x64_x86", - toolchain_config = ":msvc_x64_x86", - all_files = ":empty", - ar_files = ":empty", - as_files = ":msvc_compiler_files", - compiler_files = ":msvc_compiler_files", - dwp_files = ":empty", - linker_files = ":empty", - objcopy_files = ":empty", - strip_files = ":empty", - supports_param_files = 1, -) - -cc_toolchain_config( - name = "msvc_x64_x86", - cpu = "x64_windows", - compiler = "msvc-cl", - host_system_name = "local", - target_system_name = "local", - target_libc = "msvcrt", - abi_version = "local", - abi_libc_version = "local", - toolchain_identifier = "msvc_x64_x86", - msvc_env_tmp = "msvc_not_found", - msvc_env_path = "msvc_not_found", - msvc_env_include = "msvc_not_found", - msvc_env_lib = "msvc_not_found", - msvc_cl_path = "vc_installation_error_x86.bat", - msvc_ml_path = "vc_installation_error_x86.bat", - msvc_link_path = "vc_installation_error_x86.bat", - msvc_lib_path = "vc_installation_error_x86.bat", - cxx_builtin_include_directories = [], - tool_paths = { - "ar": "vc_installation_error_x86.bat", - "ml": "vc_installation_error_x86.bat", - "cpp": "vc_installation_error_x86.bat", - "gcc": "vc_installation_error_x86.bat", - "gcov": "wrapper/bin/msvc_nop.bat", - "ld": "vc_installation_error_x86.bat", - "nm": "wrapper/bin/msvc_nop.bat", - "objcopy": "wrapper/bin/msvc_nop.bat", - "objdump": "wrapper/bin/msvc_nop.bat", - "strip": "wrapper/bin/msvc_nop.bat", - }, - archiver_flags = ["/MACHINE:X86"], - default_link_flags = ["/MACHINE:X86"], - dbg_mode_debug_flag = "/DEBUG", - fastbuild_mode_debug_flag = "/DEBUG", -) - -toolchain( - name = "cc-toolchain-x64_x86_windows", - exec_compatible_with = [ - "@platforms//cpu:x86_64", - "@platforms//os:windows", - ], - target_compatible_with = [ - "@platforms//cpu:x86_32", - "@platforms//os:windows", - ], - toolchain = ":cc-compiler-x64_x86_windows", - toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", -) - -cc_toolchain( - name = "cc-compiler-x64_arm_windows", - toolchain_identifier = "msvc_x64_arm", - toolchain_config = ":msvc_x64_arm", - all_files = ":empty", - ar_files = ":empty", - as_files = ":msvc_compiler_files", - compiler_files = ":msvc_compiler_files", - dwp_files = ":empty", - linker_files = ":empty", - objcopy_files = ":empty", - strip_files = ":empty", - supports_param_files = 1, -) - -cc_toolchain_config( - name = "msvc_x64_arm", - cpu = "x64_windows", - compiler = "msvc-cl", - host_system_name = "local", - target_system_name = "local", - target_libc = "msvcrt", - abi_version = "local", - abi_libc_version = "local", - toolchain_identifier = "msvc_x64_arm", - msvc_env_tmp = "msvc_not_found", - msvc_env_path = "msvc_not_found", - msvc_env_include = "msvc_not_found", - msvc_env_lib = "msvc_not_found", - msvc_cl_path = "vc_installation_error_arm.bat", - msvc_ml_path = "vc_installation_error_arm.bat", - msvc_link_path = "vc_installation_error_arm.bat", - msvc_lib_path = "vc_installation_error_arm.bat", - cxx_builtin_include_directories = [], - tool_paths = { - "ar": "vc_installation_error_arm.bat", - "ml": "vc_installation_error_arm.bat", - "cpp": "vc_installation_error_arm.bat", - "gcc": "vc_installation_error_arm.bat", - "gcov": "wrapper/bin/msvc_nop.bat", - "ld": "vc_installation_error_arm.bat", - "nm": "wrapper/bin/msvc_nop.bat", - "objcopy": "wrapper/bin/msvc_nop.bat", - "objdump": "wrapper/bin/msvc_nop.bat", - "strip": "wrapper/bin/msvc_nop.bat", - }, - archiver_flags = ["/MACHINE:ARM"], - default_link_flags = ["/MACHINE:ARM"], - dbg_mode_debug_flag = "/DEBUG", - fastbuild_mode_debug_flag = "/DEBUG", -) - -toolchain( - name = "cc-toolchain-x64_arm_windows", - exec_compatible_with = [ - "@platforms//cpu:x86_64", - "@platforms//os:windows", - ], - target_compatible_with = [ - "@platforms//cpu:arm", - "@platforms//os:windows", - ], - toolchain = ":cc-compiler-x64_arm_windows", - toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", -) - -cc_toolchain( - name = "cc-compiler-arm64_windows", - toolchain_identifier = "msvc_arm64", - toolchain_config = ":msvc_arm64", - all_files = ":empty", - ar_files = ":empty", - as_files = ":msvc_compiler_files", - compiler_files = ":msvc_compiler_files", - dwp_files = ":empty", - linker_files = ":empty", - objcopy_files = ":empty", - strip_files = ":empty", - supports_param_files = 1, -) - -cc_toolchain_config( - name = "msvc_arm64", - cpu = "x64_windows", - compiler = "msvc-cl", - host_system_name = "local", - target_system_name = "local", - target_libc = "msvcrt", - abi_version = "local", - abi_libc_version = "local", - toolchain_identifier = "msvc_arm64", - msvc_env_tmp = "msvc_not_found", - msvc_env_path = "msvc_not_found", - msvc_env_include = "msvc_not_found", - msvc_env_lib = "msvc_not_found", - msvc_cl_path = "vc_installation_error_arm64.bat", - msvc_ml_path = "vc_installation_error_arm64.bat", - msvc_link_path = "vc_installation_error_arm64.bat", - msvc_lib_path = "vc_installation_error_arm64.bat", - cxx_builtin_include_directories = [], - tool_paths = { - "ar": "vc_installation_error_arm64.bat", - "ml": "vc_installation_error_arm64.bat", - "cpp": "vc_installation_error_arm64.bat", - "gcc": "vc_installation_error_arm64.bat", - "gcov": "wrapper/bin/msvc_nop.bat", - "ld": "vc_installation_error_arm64.bat", - "nm": "wrapper/bin/msvc_nop.bat", - "objcopy": "wrapper/bin/msvc_nop.bat", - "objdump": "wrapper/bin/msvc_nop.bat", - "strip": "wrapper/bin/msvc_nop.bat", - }, - archiver_flags = ["/MACHINE:ARM64"], - default_link_flags = ["/MACHINE:ARM64"], - dbg_mode_debug_flag = "/DEBUG", - fastbuild_mode_debug_flag = "/DEBUG", -) - -toolchain( - name = "cc-toolchain-arm64_windows", - exec_compatible_with = [ - "@platforms//os:windows", - ], - target_compatible_with = [ - "@platforms//cpu:arm64", - "@platforms//os:windows", - ], - toolchain = ":cc-compiler-arm64_windows", - toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", -) - - -cc_toolchain( - name = "cc-compiler-x64_windows-clang-cl", - toolchain_identifier = "clang_cl_x64", - toolchain_config = ":clang_cl_x64", - all_files = ":empty", - ar_files = ":empty", - as_files = ":clangcl_compiler_files", - compiler_files = ":clangcl_compiler_files", - dwp_files = ":empty", - linker_files = ":empty", - objcopy_files = ":empty", - strip_files = ":empty", - supports_param_files = 1, -) - -cc_toolchain_config( - name = "clang_cl_x64", - cpu = "x64_windows", - compiler = "clang-cl", - host_system_name = "local", - target_system_name = "local", - target_libc = "msvcrt", - abi_version = "local", - abi_libc_version = "local", - toolchain_identifier = "clang_cl_x64", - msvc_env_tmp = "C:\\Windows\\Temp", - msvc_env_path = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX64\\x64;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\IDE\\VC\\VCPackages;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\IDE\\CommonExtensions\\Microsoft\\TestWindow;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\IDE\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\MSBuild\\Current\\bin\\Roslyn;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\Tools\\devinit;C:\\Program Files (x86)\\Windows Kits\\10\\bin\\10.0.22000.0\\x64;C:\\Program Files (x86)\\Windows Kits\\10\\bin\\x64;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\\\MSBuild\\Current\\Bin;C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\IDE\\;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\Tools\\;;C:\\Windows\\system32", - msvc_env_include = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\include;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\ucrt;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\shared;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\um;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\winrt;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\cppwinrt;C:\\Program Files\\LLVM\\lib\\clang\\16.0.0\\include", - msvc_env_lib = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\lib\\x64;C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.22000.0\\ucrt\\x64;C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.22000.0\\um\\x64;C:\\Program Files\\LLVM\\lib\\clang\\16.0.0\\lib\\windows", - msvc_cl_path = "C:/Program Files/LLVM/bin/clang-cl.exe", - msvc_ml_path = "C:/Program Files/LLVM/bin/clang-cl.exe", - msvc_link_path = "C:/Program Files/LLVM/bin/lld-link.exe", - msvc_lib_path = "C:/Program Files/LLVM/bin/llvm-lib.exe", - cxx_builtin_include_directories = [ "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\include", - "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\ucrt", - "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\shared", - "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\um", - "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\winrt", - "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\cppwinrt", - "C:\\Program Files\\LLVM\\lib\\clang\\16.0.0\\include"], - tool_paths = { - "ar": "C:/Program Files/LLVM/bin/llvm-lib.exe", - "ml": "C:/Program Files/LLVM/bin/clang-cl.exe", - "cpp": "C:/Program Files/LLVM/bin/clang-cl.exe", - "gcc": "C:/Program Files/LLVM/bin/clang-cl.exe", - "gcov": "wrapper/bin/msvc_nop.bat", - "ld": "C:/Program Files/LLVM/bin/lld-link.exe", - "nm": "wrapper/bin/msvc_nop.bat", - "objcopy": "wrapper/bin/msvc_nop.bat", - "objdump": "wrapper/bin/msvc_nop.bat", - "strip": "wrapper/bin/msvc_nop.bat", - }, - archiver_flags = ["/MACHINE:X64"], - default_link_flags = ["/MACHINE:X64", "/DEFAULTLIB:clang_rt.builtins-x86_64.lib"], - dbg_mode_debug_flag = "/DEBUG", - fastbuild_mode_debug_flag = "/DEBUG", -) - -toolchain( - name = "cc-toolchain-x64_windows-clang-cl", - exec_compatible_with = [ - "@platforms//cpu:x86_64", - "@platforms//os:windows", - "@bazel_tools//tools/cpp:clang-cl", - ], - target_compatible_with = [ - "@platforms//cpu:x86_64", - "@platforms//os:windows", - ], - toolchain = ":cc-compiler-x64_windows-clang-cl", - toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", -) - -cc_toolchain( - name = "cc-compiler-arm64_windows-clang-cl", - toolchain_identifier = "clang_cl_arm64", - toolchain_config = ":clang_cl_arm64", - all_files = ":empty", - ar_files = ":empty", - as_files = ":clangcl_compiler_files", - compiler_files = ":clangcl_compiler_files", - dwp_files = ":empty", - linker_files = ":empty", - objcopy_files = ":empty", - strip_files = ":empty", - supports_param_files = 1, -) - -cc_toolchain_config( - name = "clang_cl_arm64", - cpu = "arm64_windows", - compiler = "clang-cl", - host_system_name = "local", - target_system_name = "aarch64-pc-windows-msvc", - target_libc = "msvcrt", - abi_version = "local", - abi_libc_version = "local", - toolchain_identifier = "clang_cl_arm64", - msvc_env_tmp = "clang_cl_not_found", - msvc_env_path = "clang_cl_not_found", - msvc_env_include = "clang_cl_not_found", - msvc_env_lib = "clang_cl_not_found", - msvc_cl_path = "vc_installation_error_arm64.bat", - msvc_ml_path = "vc_installation_error_arm64.bat", - msvc_link_path = "vc_installation_error_arm64.bat", - msvc_lib_path = "vc_installation_error_arm64.bat", - cxx_builtin_include_directories = [], - tool_paths = { - "ar": "vc_installation_error_arm64.bat", - "ml": "vc_installation_error_arm64.bat", - "cpp": "vc_installation_error_arm64.bat", - "gcc": "vc_installation_error_arm64.bat", - "gcov": "wrapper/bin/msvc_nop.bat", - "ld": "vc_installation_error_arm64.bat", - "nm": "wrapper/bin/msvc_nop.bat", - "objcopy": "wrapper/bin/msvc_nop.bat", - "objdump": "wrapper/bin/msvc_nop.bat", - "strip": "wrapper/bin/msvc_nop.bat", - }, - archiver_flags = ["/MACHINE:ARM64"], - default_link_flags = ["/MACHINE:ARM64"], - dbg_mode_debug_flag = "/DEBUG", - fastbuild_mode_debug_flag = "/DEBUG", -) - -toolchain( - name = "cc-toolchain-arm64_windows-clang-cl", - exec_compatible_with = [ - "@platforms//os:windows", - "@bazel_tools//tools/cpp:clang-cl", - ], - target_compatible_with = [ - "@platforms//cpu:arm64", - "@platforms//os:windows", - ], - toolchain = ":cc-compiler-arm64_windows-clang-cl", - toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", -) - -cc_toolchain( - name = "cc-compiler-armeabi-v7a", - toolchain_identifier = "stub_armeabi-v7a", - toolchain_config = ":stub_armeabi-v7a", - all_files = ":empty", - ar_files = ":empty", - as_files = ":empty", - compiler_files = ":empty", - dwp_files = ":empty", - linker_files = ":empty", - objcopy_files = ":empty", - strip_files = ":empty", - supports_param_files = 1, -) - -armeabi_cc_toolchain_config(name = "stub_armeabi-v7a") - -toolchain( - name = "cc-toolchain-armeabi-v7a", - exec_compatible_with = [ - ], - target_compatible_with = [ - "@platforms//cpu:armv7", - "@platforms//os:android", - ], - toolchain = ":cc-compiler-armeabi-v7a", - toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", -) diff --git a/toolchains/configs/windows/msvc-cl/cc/WORKSPACE b/toolchains/configs/windows/msvc-cl/cc/WORKSPACE deleted file mode 100644 index bc05b4c3..00000000 --- a/toolchains/configs/windows/msvc-cl/cc/WORKSPACE +++ /dev/null @@ -1,2 +0,0 @@ -# DO NOT EDIT: automatically generated WORKSPACE file for cc_autoconf rule -workspace(name = "local_config_cc") diff --git a/toolchains/configs/windows/msvc-cl/cc/armeabi_cc_toolchain_config.bzl b/toolchains/configs/windows/msvc-cl/cc/armeabi_cc_toolchain_config.bzl deleted file mode 100644 index 72ef48ae..00000000 --- a/toolchains/configs/windows/msvc-cl/cc/armeabi_cc_toolchain_config.bzl +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright 2019 The Bazel Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""A Starlark cc_toolchain configuration rule""" - -load( - "@bazel_tools//tools/cpp:cc_toolchain_config_lib.bzl", - "feature", - "tool_path", -) - -def _impl(ctx): - toolchain_identifier = "stub_armeabi-v7a" - host_system_name = "armeabi-v7a" - target_system_name = "armeabi-v7a" - target_cpu = "armeabi-v7a" - target_libc = "armeabi-v7a" - compiler = "compiler" - abi_version = "armeabi-v7a" - abi_libc_version = "armeabi-v7a" - cc_target_os = None - builtin_sysroot = None - action_configs = [] - - supports_pic_feature = feature(name = "supports_pic", enabled = True) - supports_dynamic_linker_feature = feature(name = "supports_dynamic_linker", enabled = True) - features = [supports_dynamic_linker_feature, supports_pic_feature] - - cxx_builtin_include_directories = [] - artifact_name_patterns = [] - make_variables = [] - - tool_paths = [ - tool_path(name = "ar", path = "/bin/false"), - tool_path(name = "cpp", path = "/bin/false"), - tool_path(name = "dwp", path = "/bin/false"), - tool_path(name = "gcc", path = "/bin/false"), - tool_path(name = "gcov", path = "/bin/false"), - tool_path(name = "ld", path = "/bin/false"), - tool_path(name = "llvm-profdata", path = "/bin/false"), - tool_path(name = "nm", path = "/bin/false"), - tool_path(name = "objcopy", path = "/bin/false"), - tool_path(name = "objdump", path = "/bin/false"), - tool_path(name = "strip", path = "/bin/false"), - ] - - return cc_common.create_cc_toolchain_config_info( - ctx = ctx, - features = features, - action_configs = action_configs, - artifact_name_patterns = artifact_name_patterns, - cxx_builtin_include_directories = cxx_builtin_include_directories, - toolchain_identifier = toolchain_identifier, - host_system_name = host_system_name, - target_system_name = target_system_name, - target_cpu = target_cpu, - target_libc = target_libc, - compiler = compiler, - abi_version = abi_version, - abi_libc_version = abi_libc_version, - tool_paths = tool_paths, - make_variables = make_variables, - builtin_sysroot = builtin_sysroot, - cc_target_os = cc_target_os, - ) - -armeabi_cc_toolchain_config = rule( - implementation = _impl, - attrs = {}, - provides = [CcToolchainConfigInfo], -) diff --git a/toolchains/configs/windows/msvc-cl/cc/builtin_include_directory_paths_clangcl b/toolchains/configs/windows/msvc-cl/cc/builtin_include_directory_paths_clangcl deleted file mode 100644 index f440b608..00000000 --- a/toolchains/configs/windows/msvc-cl/cc/builtin_include_directory_paths_clangcl +++ /dev/null @@ -1,7 +0,0 @@ -This file is generated by cc_configure and contains builtin include directories -that clang-cl reported. This file is a dependency of every compilation action and -changes to it will be reflected in the action cache key. When some of these -paths change, Bazel will make sure to rerun the action, even though none of -declared action inputs or the action commandline changes. - - diff --git a/toolchains/configs/windows/msvc-cl/cc/builtin_include_directory_paths_mingw b/toolchains/configs/windows/msvc-cl/cc/builtin_include_directory_paths_mingw deleted file mode 100644 index 1621d8ea..00000000 --- a/toolchains/configs/windows/msvc-cl/cc/builtin_include_directory_paths_mingw +++ /dev/null @@ -1,8 +0,0 @@ -This file is generated by cc_configure and contains builtin include directories -that mingw reported. This file is a dependency of every compilation action and -changes to it will be reflected in the action cache key. When some of these -paths change, Bazel will make sure to rerun the action, even though none of -declared action inputs or the action commandline changes. - - "c:/tools/msys64/mingw64/", - diff --git a/toolchains/configs/windows/msvc-cl/cc/builtin_include_directory_paths_msvc b/toolchains/configs/windows/msvc-cl/cc/builtin_include_directory_paths_msvc deleted file mode 100644 index 1380bc62..00000000 --- a/toolchains/configs/windows/msvc-cl/cc/builtin_include_directory_paths_msvc +++ /dev/null @@ -1,7 +0,0 @@ -This file is generated by cc_configure and contains builtin include directories -that msvc reported. This file is a dependency of every compilation action and -changes to it will be reflected in the action cache key. When some of these -paths change, Bazel will make sure to rerun the action, even though none of -declared action inputs or the action commandline changes. - - diff --git a/toolchains/configs/windows/msvc-cl/cc/get_env.bat b/toolchains/configs/windows/msvc-cl/cc/get_env.bat deleted file mode 100644 index cc498d38..00000000 --- a/toolchains/configs/windows/msvc-cl/cc/get_env.bat +++ /dev/null @@ -1,3 +0,0 @@ -@echo off -call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\VCVARSALL.BAT" amd64 -vcvars_ver=14.29.30133 > NUL -echo PATH=%PATH%,INCLUDE=%INCLUDE%,LIB=%LIB%,WINDOWSSDKDIR=%WINDOWSSDKDIR% diff --git a/toolchains/configs/windows/msvc-cl/cc/msys_gcc_installation_error.bat b/toolchains/configs/windows/msvc-cl/cc/msys_gcc_installation_error.bat deleted file mode 100644 index 25c35534..00000000 --- a/toolchains/configs/windows/msvc-cl/cc/msys_gcc_installation_error.bat +++ /dev/null @@ -1,23 +0,0 @@ -:: Copyright 2018 The Bazel Authors. All rights reserved. -:: -:: Licensed under the Apache License, Version 2.0 (the "License"); -:: you may not use this file except in compliance with the License. -:: You may obtain a copy of the License at -:: -:: http://www.apache.org/licenses/LICENSE-2.0 -:: -:: Unless required by applicable law or agreed to in writing, software -:: distributed under the License is distributed on an "AS IS" BASIS, -:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -:: See the License for the specific language governing permissions and -:: limitations under the License. - -@echo OFF - -echo. 1>&2 -echo The target you are compiling requires MSYS gcc / MINGW gcc. 1>&2 -echo Bazel couldn't find gcc installation on your machine. 1>&2 -echo Please install MSYS gcc / MINGW gcc and set BAZEL_SH environment variable 1>&2 -echo. 1>&2 - -exit /b 1 diff --git a/toolchains/configs/windows/msvc-cl/cc/vc_installation_error_arm.bat b/toolchains/configs/windows/msvc-cl/cc/vc_installation_error_arm.bat deleted file mode 100644 index cd181a8e..00000000 --- a/toolchains/configs/windows/msvc-cl/cc/vc_installation_error_arm.bat +++ /dev/null @@ -1,29 +0,0 @@ -:: Copyright 2017 The Bazel Authors. All rights reserved. -:: -:: Licensed under the Apache License, Version 2.0 (the "License"); -:: you may not use this file except in compliance with the License. -:: You may obtain a copy of the License at -:: -:: http://www.apache.org/licenses/LICENSE-2.0 -:: -:: Unless required by applicable law or agreed to in writing, software -:: distributed under the License is distributed on an "AS IS" BASIS, -:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -:: See the License for the specific language governing permissions and -:: limitations under the License. - -@echo OFF - -echo. 1>&2 -echo The target you are compiling requires Visual C++ build tools. 1>&2 -echo Bazel couldn't find a valid Visual C++ build tools installation on your machine. 1>&2 -echo. 1>&2 -echo Visual C++ build tools seems to be installed at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC 1>&2 -echo But Bazel can't find the following tools: 1>&2 -echo cl.exe, link.exe, lib.exe 1>&2 -echo for arm target architecture 1>&2 -echo. 1>&2 -echo Please check your installation following https://bazel.build/docs/windows#using 1>&2 -echo. 1>&2 - -exit /b 1 diff --git a/toolchains/configs/windows/msvc-cl/cc/vc_installation_error_arm64.bat b/toolchains/configs/windows/msvc-cl/cc/vc_installation_error_arm64.bat deleted file mode 100644 index 05536777..00000000 --- a/toolchains/configs/windows/msvc-cl/cc/vc_installation_error_arm64.bat +++ /dev/null @@ -1,29 +0,0 @@ -:: Copyright 2017 The Bazel Authors. All rights reserved. -:: -:: Licensed under the Apache License, Version 2.0 (the "License"); -:: you may not use this file except in compliance with the License. -:: You may obtain a copy of the License at -:: -:: http://www.apache.org/licenses/LICENSE-2.0 -:: -:: Unless required by applicable law or agreed to in writing, software -:: distributed under the License is distributed on an "AS IS" BASIS, -:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -:: See the License for the specific language governing permissions and -:: limitations under the License. - -@echo OFF - -echo. 1>&2 -echo The target you are compiling requires Visual C++ build tools. 1>&2 -echo Bazel couldn't find a valid Visual C++ build tools installation on your machine. 1>&2 -echo. 1>&2 -echo Visual C++ build tools seems to be installed at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC 1>&2 -echo But Bazel can't find the following tools: 1>&2 -echo cl.exe, link.exe, lib.exe 1>&2 -echo for arm64 target architecture 1>&2 -echo. 1>&2 -echo Please check your installation following https://bazel.build/docs/windows#using 1>&2 -echo. 1>&2 - -exit /b 1 diff --git a/toolchains/configs/windows/msvc-cl/cc/vc_installation_error_x86.bat b/toolchains/configs/windows/msvc-cl/cc/vc_installation_error_x86.bat deleted file mode 100644 index 762a02ff..00000000 --- a/toolchains/configs/windows/msvc-cl/cc/vc_installation_error_x86.bat +++ /dev/null @@ -1,29 +0,0 @@ -:: Copyright 2017 The Bazel Authors. All rights reserved. -:: -:: Licensed under the Apache License, Version 2.0 (the "License"); -:: you may not use this file except in compliance with the License. -:: You may obtain a copy of the License at -:: -:: http://www.apache.org/licenses/LICENSE-2.0 -:: -:: Unless required by applicable law or agreed to in writing, software -:: distributed under the License is distributed on an "AS IS" BASIS, -:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -:: See the License for the specific language governing permissions and -:: limitations under the License. - -@echo OFF - -echo. 1>&2 -echo The target you are compiling requires Visual C++ build tools. 1>&2 -echo Bazel couldn't find a valid Visual C++ build tools installation on your machine. 1>&2 -echo. 1>&2 -echo Visual C++ build tools seems to be installed at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC 1>&2 -echo But Bazel can't find the following tools: 1>&2 -echo cl.exe, link.exe, lib.exe, ml.exe 1>&2 -echo for x86 target architecture 1>&2 -echo. 1>&2 -echo Please check your installation following https://bazel.build/docs/windows#using 1>&2 -echo. 1>&2 - -exit /b 1 diff --git a/toolchains/configs/windows/msvc-cl/cc/windows_cc_toolchain_config.bzl b/toolchains/configs/windows/msvc-cl/cc/windows_cc_toolchain_config.bzl deleted file mode 100644 index e2f464a6..00000000 --- a/toolchains/configs/windows/msvc-cl/cc/windows_cc_toolchain_config.bzl +++ /dev/null @@ -1,1421 +0,0 @@ -# Copyright 2019 The Bazel Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""A Starlark cc_toolchain configuration rule for Windows""" - -load( - "@bazel_tools//tools/cpp:cc_toolchain_config_lib.bzl", - "action_config", - "artifact_name_pattern", - "env_entry", - "env_set", - "feature", - "flag_group", - "flag_set", - "tool", - "tool_path", - "variable_with_value", - "with_feature_set", -) -load("@bazel_tools//tools/build_defs/cc:action_names.bzl", "ACTION_NAMES") - -all_compile_actions = [ - ACTION_NAMES.c_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.assemble, - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ACTION_NAMES.clif_match, - ACTION_NAMES.lto_backend, -] - -all_cpp_compile_actions = [ - ACTION_NAMES.cpp_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ACTION_NAMES.clif_match, -] - -preprocessor_compile_actions = [ - ACTION_NAMES.c_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.clif_match, -] - -codegen_compile_actions = [ - ACTION_NAMES.c_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.assemble, - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.cpp_module_codegen, - ACTION_NAMES.lto_backend, -] - -all_link_actions = [ - ACTION_NAMES.cpp_link_executable, - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, -] - -def _use_msvc_toolchain(ctx): - return ctx.attr.cpu in ["x64_windows", "arm64_windows"] and (ctx.attr.compiler == "msvc-cl" or ctx.attr.compiler == "clang-cl") - -def _impl(ctx): - if _use_msvc_toolchain(ctx): - artifact_name_patterns = [ - artifact_name_pattern( - category_name = "object_file", - prefix = "", - extension = ".obj", - ), - artifact_name_pattern( - category_name = "static_library", - prefix = "", - extension = ".lib", - ), - artifact_name_pattern( - category_name = "alwayslink_static_library", - prefix = "", - extension = ".lo.lib", - ), - artifact_name_pattern( - category_name = "executable", - prefix = "", - extension = ".exe", - ), - artifact_name_pattern( - category_name = "dynamic_library", - prefix = "", - extension = ".dll", - ), - artifact_name_pattern( - category_name = "interface_library", - prefix = "", - extension = ".if.lib", - ), - ] - else: - artifact_name_patterns = [ - artifact_name_pattern( - category_name = "executable", - prefix = "", - extension = ".exe", - ), - ] - - if _use_msvc_toolchain(ctx): - cpp_link_nodeps_dynamic_library_action = action_config( - action_name = ACTION_NAMES.cpp_link_nodeps_dynamic_library, - implies = [ - "nologo", - "shared_flag", - "linkstamps", - "output_execpath_flags", - "input_param_flags", - "user_link_flags", - "linker_subsystem_flag", - "linker_param_file", - "msvc_env", - "no_stripping", - "has_configured_linker_path", - "def_file", - ], - tools = [tool(path = ctx.attr.msvc_link_path)], - ) - - cpp_link_static_library_action = action_config( - action_name = ACTION_NAMES.cpp_link_static_library, - implies = [ - "nologo", - "archiver_flags", - "input_param_flags", - "linker_param_file", - "msvc_env", - ], - tools = [tool(path = ctx.attr.msvc_lib_path)], - ) - - assemble_action = action_config( - action_name = ACTION_NAMES.assemble, - implies = [ - "compiler_input_flags", - "compiler_output_flags", - "nologo", - "msvc_env", - "sysroot", - ], - tools = [tool(path = ctx.attr.msvc_ml_path)], - ) - - preprocess_assemble_action = action_config( - action_name = ACTION_NAMES.preprocess_assemble, - implies = [ - "compiler_input_flags", - "compiler_output_flags", - "nologo", - "msvc_env", - "sysroot", - ], - tools = [tool(path = ctx.attr.msvc_ml_path)], - ) - - c_compile_action = action_config( - action_name = ACTION_NAMES.c_compile, - implies = [ - "compiler_input_flags", - "compiler_output_flags", - "nologo", - "msvc_env", - "parse_showincludes", - "user_compile_flags", - "sysroot", - ], - tools = [tool(path = ctx.attr.msvc_cl_path)], - ) - - linkstamp_compile_action = action_config( - action_name = ACTION_NAMES.linkstamp_compile, - implies = [ - "compiler_input_flags", - "compiler_output_flags", - "default_compile_flags", - "nologo", - "msvc_env", - "parse_showincludes", - "user_compile_flags", - "sysroot", - "unfiltered_compile_flags", - ], - tools = [tool(path = ctx.attr.msvc_cl_path)], - ) - - cpp_compile_action = action_config( - action_name = ACTION_NAMES.cpp_compile, - implies = [ - "compiler_input_flags", - "compiler_output_flags", - "nologo", - "msvc_env", - "parse_showincludes", - "user_compile_flags", - "sysroot", - ], - tools = [tool(path = ctx.attr.msvc_cl_path)], - ) - - cpp_link_executable_action = action_config( - action_name = ACTION_NAMES.cpp_link_executable, - implies = [ - "nologo", - "linkstamps", - "output_execpath_flags", - "input_param_flags", - "user_link_flags", - "linker_subsystem_flag", - "linker_param_file", - "msvc_env", - "no_stripping", - ], - tools = [tool(path = ctx.attr.msvc_link_path)], - ) - - cpp_link_dynamic_library_action = action_config( - action_name = ACTION_NAMES.cpp_link_dynamic_library, - implies = [ - "nologo", - "shared_flag", - "linkstamps", - "output_execpath_flags", - "input_param_flags", - "user_link_flags", - "linker_subsystem_flag", - "linker_param_file", - "msvc_env", - "no_stripping", - "has_configured_linker_path", - "def_file", - ], - tools = [tool(path = ctx.attr.msvc_link_path)], - ) - - action_configs = [ - assemble_action, - preprocess_assemble_action, - c_compile_action, - linkstamp_compile_action, - cpp_compile_action, - cpp_link_executable_action, - cpp_link_dynamic_library_action, - cpp_link_nodeps_dynamic_library_action, - cpp_link_static_library_action, - ] - else: - action_configs = [] - - if _use_msvc_toolchain(ctx): - msvc_link_env_feature = feature( - name = "msvc_link_env", - env_sets = [ - env_set( - actions = all_link_actions + - [ACTION_NAMES.cpp_link_static_library], - env_entries = [env_entry(key = "LIB", value = ctx.attr.msvc_env_lib)], - ), - ], - ) - - shared_flag_feature = feature( - name = "shared_flag", - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ], - flag_groups = [flag_group(flags = ["/DLL"])], - ), - ], - ) - - determinism_feature = feature( - name = "determinism", - enabled = True, - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [ - flag_group( - flags = [ - "/wd4117", - "-D__DATE__=\"redacted\"", - "-D__TIMESTAMP__=\"redacted\"", - "-D__TIME__=\"redacted\"", - ] + (["-Wno-builtin-macro-redefined"] if ctx.attr.compiler == "clang-cl" else []), - ), - ], - ), - ], - ) - - sysroot_feature = feature( - name = "sysroot", - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.assemble, - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.c_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ACTION_NAMES.cpp_link_executable, - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ], - flag_groups = [ - flag_group( - flags = ["--sysroot=%{sysroot}"], - iterate_over = "sysroot", - expand_if_available = "sysroot", - ), - ], - ), - ], - ) - - unfiltered_compile_flags_feature = feature( - name = "unfiltered_compile_flags", - enabled = True, - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.c_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ], - flag_groups = [ - flag_group( - flags = ["%{unfiltered_compile_flags}"], - iterate_over = "unfiltered_compile_flags", - expand_if_available = "unfiltered_compile_flags", - ), - ], - ), - ], - ) - - archive_param_file_feature = feature( - name = "archive_param_file", - enabled = True, - ) - - compiler_param_file_feature = feature( - name = "compiler_param_file", - ) - - copy_dynamic_libraries_to_binary_feature = feature( - name = "copy_dynamic_libraries_to_binary", - ) - - input_param_flags_feature = feature( - name = "input_param_flags", - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ], - flag_groups = [ - flag_group( - flags = ["/IMPLIB:%{interface_library_output_path}"], - expand_if_available = "interface_library_output_path", - ), - ], - ), - flag_set( - actions = all_link_actions, - flag_groups = [ - flag_group( - flags = ["%{libopts}"], - iterate_over = "libopts", - expand_if_available = "libopts", - ), - ], - ), - flag_set( - actions = all_link_actions + - [ACTION_NAMES.cpp_link_static_library], - flag_groups = [ - flag_group( - iterate_over = "libraries_to_link", - flag_groups = [ - flag_group( - iterate_over = "libraries_to_link.object_files", - flag_groups = [flag_group(flags = ["%{libraries_to_link.object_files}"])], - expand_if_equal = variable_with_value( - name = "libraries_to_link.type", - value = "object_file_group", - ), - ), - flag_group( - flag_groups = [flag_group(flags = ["%{libraries_to_link.name}"])], - expand_if_equal = variable_with_value( - name = "libraries_to_link.type", - value = "object_file", - ), - ), - flag_group( - flag_groups = [flag_group(flags = ["%{libraries_to_link.name}"])], - expand_if_equal = variable_with_value( - name = "libraries_to_link.type", - value = "interface_library", - ), - ), - flag_group( - flag_groups = [ - flag_group( - flags = ["%{libraries_to_link.name}"], - expand_if_false = "libraries_to_link.is_whole_archive", - ), - flag_group( - flags = ["/WHOLEARCHIVE:%{libraries_to_link.name}"], - expand_if_true = "libraries_to_link.is_whole_archive", - ), - ], - expand_if_equal = variable_with_value( - name = "libraries_to_link.type", - value = "static_library", - ), - ), - ], - expand_if_available = "libraries_to_link", - ), - ], - ), - ], - ) - - fastbuild_feature = feature( - name = "fastbuild", - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [flag_group(flags = ["/Od", "/Z7"])], - ), - flag_set( - actions = all_link_actions, - flag_groups = [ - flag_group( - flags = [ctx.attr.fastbuild_mode_debug_flag, "/INCREMENTAL:NO"], - ), - ], - ), - ], - implies = ["generate_pdb_file"], - ) - - user_compile_flags_feature = feature( - name = "user_compile_flags", - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.c_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ], - flag_groups = [ - flag_group( - flags = ["%{user_compile_flags}"], - iterate_over = "user_compile_flags", - expand_if_available = "user_compile_flags", - ), - ], - ), - ], - ) - - archiver_flags_feature = feature( - name = "archiver_flags", - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.cpp_link_static_library], - flag_groups = [ - flag_group( - flags = ["/OUT:%{output_execpath}"], - expand_if_available = "output_execpath", - ), - flag_group( - flags = ctx.attr.archiver_flags, - ), - ], - ), - ], - ) - - default_link_flags_feature = feature( - name = "default_link_flags", - enabled = True, - flag_sets = [ - flag_set( - actions = all_link_actions, - flag_groups = [flag_group(flags = ctx.attr.default_link_flags)], - ), - ], - ) - - static_link_msvcrt_feature = feature( - name = "static_link_msvcrt", - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [flag_group(flags = ["/MT"])], - with_features = [with_feature_set(not_features = ["dbg"])], - ), - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [flag_group(flags = ["/MTd"])], - with_features = [with_feature_set(features = ["dbg"])], - ), - flag_set( - actions = all_link_actions, - flag_groups = [flag_group(flags = ["/DEFAULTLIB:libcmt.lib"])], - with_features = [with_feature_set(not_features = ["dbg"])], - ), - flag_set( - actions = all_link_actions, - flag_groups = [flag_group(flags = ["/DEFAULTLIB:libcmtd.lib"])], - with_features = [with_feature_set(features = ["dbg"])], - ), - ], - ) - - dynamic_link_msvcrt_feature = feature( - name = "dynamic_link_msvcrt", - enabled = True, - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [flag_group(flags = ["/MD"])], - with_features = [with_feature_set(not_features = ["dbg", "static_link_msvcrt"])], - ), - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [flag_group(flags = ["/MDd"])], - with_features = [with_feature_set(features = ["dbg"], not_features = ["static_link_msvcrt"])], - ), - flag_set( - actions = all_link_actions, - flag_groups = [flag_group(flags = ["/DEFAULTLIB:msvcrt.lib"])], - with_features = [with_feature_set(not_features = ["dbg", "static_link_msvcrt"])], - ), - flag_set( - actions = all_link_actions, - flag_groups = [flag_group(flags = ["/DEFAULTLIB:msvcrtd.lib"])], - with_features = [with_feature_set(features = ["dbg"], not_features = ["static_link_msvcrt"])], - ), - ], - ) - - dbg_feature = feature( - name = "dbg", - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [flag_group(flags = ["/Od", "/Z7"])], - ), - flag_set( - actions = all_link_actions, - flag_groups = [ - flag_group( - flags = [ctx.attr.dbg_mode_debug_flag, "/INCREMENTAL:NO"], - ), - ], - ), - ], - implies = ["generate_pdb_file"], - ) - - opt_feature = feature( - name = "opt", - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [flag_group(flags = ["/O2"])], - ), - ], - implies = ["frame_pointer"], - ) - - supports_interface_shared_libraries_feature = feature( - name = "supports_interface_shared_libraries", - enabled = True, - ) - - user_link_flags_feature = feature( - name = "user_link_flags", - flag_sets = [ - flag_set( - actions = all_link_actions, - flag_groups = [ - flag_group( - flags = ["%{user_link_flags}"], - iterate_over = "user_link_flags", - expand_if_available = "user_link_flags", - ), - ], - ), - ], - ) - - default_compile_flags_feature = feature( - name = "default_compile_flags", - enabled = True, - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.assemble, - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.c_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ACTION_NAMES.lto_backend, - ACTION_NAMES.clif_match, - ], - flag_groups = [ - flag_group( - flags = [ - "/DCOMPILER_MSVC", - "/DNOMINMAX", - "/D_WIN32_WINNT=0x0601", - "/D_CRT_SECURE_NO_DEPRECATE", - "/D_CRT_SECURE_NO_WARNINGS", - "/bigobj", - "/Zm500", - "/EHsc", - "/wd4351", - "/wd4291", - "/wd4250", - "/wd4996", - ], - ), - ], - ), - ], - ) - - msvc_compile_env_feature = feature( - name = "msvc_compile_env", - env_sets = [ - env_set( - actions = [ - ACTION_NAMES.c_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.assemble, - ACTION_NAMES.preprocess_assemble, - ], - env_entries = [env_entry(key = "INCLUDE", value = ctx.attr.msvc_env_include)], - ), - ], - ) - - preprocessor_defines_feature = feature( - name = "preprocessor_defines", - enabled = True, - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.assemble, - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.c_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ], - flag_groups = [ - flag_group( - flags = ["/D%{preprocessor_defines}"], - iterate_over = "preprocessor_defines", - ), - ], - ), - ], - ) - - generate_pdb_file_feature = feature( - name = "generate_pdb_file", - ) - - output_execpath_flags_feature = feature( - name = "output_execpath_flags", - flag_sets = [ - flag_set( - actions = all_link_actions, - flag_groups = [ - flag_group( - flags = ["/OUT:%{output_execpath}"], - expand_if_available = "output_execpath", - ), - ], - ), - ], - ) - - disable_assertions_feature = feature( - name = "disable_assertions", - enabled = True, - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [flag_group(flags = ["/DNDEBUG"])], - with_features = [with_feature_set(features = ["opt"])], - ), - ], - ) - - has_configured_linker_path_feature = feature(name = "has_configured_linker_path") - - supports_dynamic_linker_feature = feature(name = "supports_dynamic_linker", enabled = True) - - no_stripping_feature = feature(name = "no_stripping") - - linker_param_file_feature = feature( - name = "linker_param_file", - flag_sets = [ - flag_set( - actions = all_link_actions + - [ACTION_NAMES.cpp_link_static_library], - flag_groups = [ - flag_group( - flags = ["@%{linker_param_file}"], - expand_if_available = "linker_param_file", - ), - ], - ), - ], - ) - - ignore_noisy_warnings_feature = feature( - name = "ignore_noisy_warnings", - enabled = True, - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.cpp_link_static_library], - flag_groups = [flag_group(flags = ["/ignore:4221"])], - ), - ], - ) - - no_legacy_features_feature = feature(name = "no_legacy_features") - - parse_showincludes_feature = feature( - name = "parse_showincludes", - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.c_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_header_parsing, - ], - flag_groups = [flag_group(flags = ["/showIncludes"])], - ), - ], - ) - - treat_warnings_as_errors_feature = feature( - name = "treat_warnings_as_errors", - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile] + all_link_actions, - flag_groups = [flag_group(flags = ["/WX"])], - ), - ], - ) - - windows_export_all_symbols_feature = feature(name = "windows_export_all_symbols") - - no_windows_export_all_symbols_feature = feature(name = "no_windows_export_all_symbols") - - include_paths_feature = feature( - name = "include_paths", - enabled = True, - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.assemble, - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.c_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ], - flag_groups = [ - flag_group( - flags = ["/I%{quote_include_paths}"], - iterate_over = "quote_include_paths", - ), - flag_group( - flags = ["/I%{include_paths}"], - iterate_over = "include_paths", - ), - flag_group( - flags = ["/I%{system_include_paths}"], - iterate_over = "system_include_paths", - ), - ], - ), - ], - ) - - external_include_paths_feature = feature( - name = "external_include_paths", - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.c_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.clif_match, - ACTION_NAMES.objc_compile, - ACTION_NAMES.objcpp_compile, - ], - flag_groups = [ - flag_group( - flags = ["/external:I", "%{external_include_paths}"], - iterate_over = "external_include_paths", - expand_if_available = "external_include_paths", - ), - ], - ), - ], - ) - - linkstamps_feature = feature( - name = "linkstamps", - flag_sets = [ - flag_set( - actions = all_link_actions, - flag_groups = [ - flag_group( - flags = ["%{linkstamp_paths}"], - iterate_over = "linkstamp_paths", - expand_if_available = "linkstamp_paths", - ), - ], - ), - ], - ) - - targets_windows_feature = feature( - name = "targets_windows", - enabled = True, - implies = ["copy_dynamic_libraries_to_binary"], - ) - - linker_subsystem_flag_feature = feature( - name = "linker_subsystem_flag", - flag_sets = [ - flag_set( - actions = all_link_actions, - flag_groups = [flag_group(flags = ["/SUBSYSTEM:CONSOLE"])], - ), - ], - ) - - frame_pointer_feature = feature( - name = "frame_pointer", - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [flag_group(flags = ["/Oy-"])], - ), - ], - ) - - compiler_output_flags_feature = feature( - name = "compiler_output_flags", - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.assemble], - flag_groups = [ - flag_group( - flag_groups = [ - flag_group( - flags = ["/Fo%{output_file}", "/Zi"], - expand_if_available = "output_file", - expand_if_not_available = "output_assembly_file", - ), - ], - expand_if_not_available = "output_preprocess_file", - ), - ], - ), - flag_set( - actions = [ - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.c_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ], - flag_groups = [ - flag_group( - flag_groups = [ - flag_group( - flags = ["/Fo%{output_file}"], - expand_if_not_available = "output_preprocess_file", - ), - ], - expand_if_available = "output_file", - expand_if_not_available = "output_assembly_file", - ), - flag_group( - flag_groups = [ - flag_group( - flags = ["/Fa%{output_file}"], - expand_if_available = "output_assembly_file", - ), - ], - expand_if_available = "output_file", - ), - flag_group( - flag_groups = [ - flag_group( - flags = ["/P", "/Fi%{output_file}"], - expand_if_available = "output_preprocess_file", - ), - ], - expand_if_available = "output_file", - ), - ], - ), - ], - ) - - nologo_feature = feature( - name = "nologo", - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.c_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.assemble, - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.cpp_link_executable, - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ACTION_NAMES.cpp_link_static_library, - ], - flag_groups = [flag_group(flags = ["/nologo"])], - ), - ], - ) - - smaller_binary_feature = feature( - name = "smaller_binary", - enabled = True, - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [flag_group(flags = ["/Gy", "/Gw"])], - with_features = [with_feature_set(features = ["opt"])], - ), - flag_set( - actions = all_link_actions, - flag_groups = [flag_group(flags = ["/OPT:ICF", "/OPT:REF"])], - with_features = [with_feature_set(features = ["opt"])], - ), - ], - ) - - compiler_input_flags_feature = feature( - name = "compiler_input_flags", - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.assemble, - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.c_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ], - flag_groups = [ - flag_group( - flags = ["/c", "%{source_file}"], - expand_if_available = "source_file", - ), - ], - ), - ], - ) - - def_file_feature = feature( - name = "def_file", - flag_sets = [ - flag_set( - actions = all_link_actions, - flag_groups = [ - flag_group( - flags = ["/DEF:%{def_file_path}", "/ignore:4070"], - expand_if_available = "def_file_path", - ), - ], - ), - ], - ) - - msvc_env_feature = feature( - name = "msvc_env", - env_sets = [ - env_set( - actions = [ - ACTION_NAMES.c_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.assemble, - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.cpp_link_executable, - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ACTION_NAMES.cpp_link_static_library, - ], - env_entries = [ - env_entry(key = "PATH", value = ctx.attr.msvc_env_path), - env_entry(key = "TMP", value = ctx.attr.msvc_env_tmp), - env_entry(key = "TEMP", value = ctx.attr.msvc_env_tmp), - ], - ), - ], - implies = ["msvc_compile_env", "msvc_link_env"], - ) - features = [ - no_legacy_features_feature, - nologo_feature, - has_configured_linker_path_feature, - no_stripping_feature, - targets_windows_feature, - copy_dynamic_libraries_to_binary_feature, - default_compile_flags_feature, - msvc_env_feature, - msvc_compile_env_feature, - msvc_link_env_feature, - include_paths_feature, - external_include_paths_feature, - preprocessor_defines_feature, - parse_showincludes_feature, - generate_pdb_file_feature, - shared_flag_feature, - linkstamps_feature, - output_execpath_flags_feature, - archiver_flags_feature, - input_param_flags_feature, - linker_subsystem_flag_feature, - user_link_flags_feature, - default_link_flags_feature, - linker_param_file_feature, - static_link_msvcrt_feature, - dynamic_link_msvcrt_feature, - dbg_feature, - fastbuild_feature, - opt_feature, - frame_pointer_feature, - disable_assertions_feature, - determinism_feature, - treat_warnings_as_errors_feature, - smaller_binary_feature, - ignore_noisy_warnings_feature, - user_compile_flags_feature, - sysroot_feature, - unfiltered_compile_flags_feature, - archive_param_file_feature, - compiler_param_file_feature, - compiler_output_flags_feature, - compiler_input_flags_feature, - def_file_feature, - windows_export_all_symbols_feature, - no_windows_export_all_symbols_feature, - supports_dynamic_linker_feature, - supports_interface_shared_libraries_feature, - ] - else: - targets_windows_feature = feature( - name = "targets_windows", - implies = ["copy_dynamic_libraries_to_binary"], - enabled = True, - ) - - copy_dynamic_libraries_to_binary_feature = feature(name = "copy_dynamic_libraries_to_binary") - - gcc_env_feature = feature( - name = "gcc_env", - enabled = True, - env_sets = [ - env_set( - actions = [ - ACTION_NAMES.c_compile, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.assemble, - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.cpp_link_executable, - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ACTION_NAMES.cpp_link_static_library, - ], - env_entries = [ - env_entry(key = "PATH", value = ctx.attr.tool_bin_path), - ], - ), - ], - ) - - default_compile_flags_feature = feature( - name = "default_compile_flags", - enabled = True, - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ACTION_NAMES.lto_backend, - ACTION_NAMES.clif_match, - ], - flag_groups = [flag_group(flags = ["-std=gnu++0x"])], - ), - ], - ) - - default_link_flags_feature = feature( - name = "default_link_flags", - enabled = True, - flag_sets = [ - flag_set( - actions = all_link_actions, - flag_groups = [flag_group(flags = ["-lstdc++"])], - ), - ], - ) - - supports_dynamic_linker_feature = feature( - name = "supports_dynamic_linker", - enabled = True, - ) - - dbg_feature = feature( - name = "dbg", - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [flag_group(flags = ["-g", "-Og"])], - ), - ], - ) - - opt_feature = feature( - name = "opt", - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [flag_group(flags = [ - "-g0", - "-O3", - "-DNDEBUG", - "-ffunction-sections", - "-fdata-sections", - ])], - ), - flag_set( - actions = all_link_actions, - flag_groups = [flag_group(flags = ["-Wl,--gc-sections"])], - ), - ], - ) - - if ctx.attr.cpu == "x64_windows" and ctx.attr.compiler == "mingw-gcc": - archive_param_file_feature = feature( - name = "archive_param_file", - enabled = True, - ) - - compiler_param_file_feature = feature( - name = "compiler_param_file", - ) - - features = [ - targets_windows_feature, - copy_dynamic_libraries_to_binary_feature, - gcc_env_feature, - default_compile_flags_feature, - archive_param_file_feature, - compiler_param_file_feature, - default_link_flags_feature, - supports_dynamic_linker_feature, - dbg_feature, - opt_feature, - ] - else: - supports_pic_feature = feature( - name = "supports_pic", - enabled = True, - ) - - sysroot_feature = feature( - name = "sysroot", - enabled = True, - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.c_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ACTION_NAMES.lto_backend, - ACTION_NAMES.clif_match, - ACTION_NAMES.cpp_link_executable, - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ], - flag_groups = [ - flag_group( - flags = ["--sysroot=%{sysroot}"], - expand_if_available = "sysroot", - ), - ], - ), - ], - ) - - fdo_optimize_feature = feature( - name = "fdo_optimize", - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [ - flag_group( - flags = [ - "-fprofile-use=%{fdo_profile_path}", - "-fprofile-correction", - ], - expand_if_available = "fdo_profile_path", - ), - ], - ), - ], - provides = ["profile"], - ) - - treat_warnings_as_errors_feature = feature( - name = "treat_warnings_as_errors", - flag_sets = [ - flag_set( - actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile], - flag_groups = [flag_group(flags = ["-Werror"])], - ), - flag_set( - actions = all_link_actions, - flag_groups = [flag_group(flags = ["-Wl,-fatal-warnings"])], - ), - ], - ) - - user_compile_flags_feature = feature( - name = "user_compile_flags", - enabled = True, - flag_sets = [ - flag_set( - actions = [ - ACTION_NAMES.assemble, - ACTION_NAMES.preprocess_assemble, - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.c_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ACTION_NAMES.lto_backend, - ACTION_NAMES.clif_match, - ], - flag_groups = [ - flag_group( - flags = ["%{user_compile_flags}"], - iterate_over = "user_compile_flags", - expand_if_available = "user_compile_flags", - ), - ], - ), - ], - ) - - features = [ - targets_windows_feature, - copy_dynamic_libraries_to_binary_feature, - gcc_env_feature, - supports_pic_feature, - default_compile_flags_feature, - default_link_flags_feature, - fdo_optimize_feature, - supports_dynamic_linker_feature, - dbg_feature, - opt_feature, - user_compile_flags_feature, - treat_warnings_as_errors_feature, - sysroot_feature, - ] - - tool_paths = [ - tool_path(name = name, path = path) - for name, path in ctx.attr.tool_paths.items() - ] - - return cc_common.create_cc_toolchain_config_info( - ctx = ctx, - features = features, - action_configs = action_configs, - artifact_name_patterns = artifact_name_patterns, - cxx_builtin_include_directories = ctx.attr.cxx_builtin_include_directories, - toolchain_identifier = ctx.attr.toolchain_identifier, - host_system_name = ctx.attr.host_system_name, - target_system_name = ctx.attr.target_system_name, - target_cpu = ctx.attr.cpu, - target_libc = ctx.attr.target_libc, - compiler = ctx.attr.compiler, - abi_version = ctx.attr.abi_version, - abi_libc_version = ctx.attr.abi_libc_version, - tool_paths = tool_paths, - ) - -cc_toolchain_config = rule( - implementation = _impl, - attrs = { - "cpu": attr.string(mandatory = True), - "compiler": attr.string(), - "toolchain_identifier": attr.string(), - "host_system_name": attr.string(), - "target_system_name": attr.string(), - "target_libc": attr.string(), - "abi_version": attr.string(), - "abi_libc_version": attr.string(), - "tool_paths": attr.string_dict(), - "cxx_builtin_include_directories": attr.string_list(), - "archiver_flags": attr.string_list(default = []), - "default_link_flags": attr.string_list(default = []), - "msvc_env_tmp": attr.string(default = "msvc_not_found"), - "msvc_env_path": attr.string(default = "msvc_not_found"), - "msvc_env_include": attr.string(default = "msvc_not_found"), - "msvc_env_lib": attr.string(default = "msvc_not_found"), - "msvc_cl_path": attr.string(default = "vc_installation_error.bat"), - "msvc_ml_path": attr.string(default = "vc_installation_error.bat"), - "msvc_link_path": attr.string(default = "vc_installation_error.bat"), - "msvc_lib_path": attr.string(default = "vc_installation_error.bat"), - "dbg_mode_debug_flag": attr.string(), - "fastbuild_mode_debug_flag": attr.string(), - "tool_bin_path": attr.string(default = "not_found"), - }, - provides = [CcToolchainConfigInfo], -) diff --git a/toolchains/configs/windows/msvc-cl/config/BUILD b/toolchains/configs/windows/msvc-cl/config/BUILD deleted file mode 100644 index c7a487f2..00000000 --- a/toolchains/configs/windows/msvc-cl/config/BUILD +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 2020 The Bazel Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This file is auto-generated by github.com/bazelbuild/bazel-toolchains/pkg/rbeconfigsgen -# and should not be modified directly. - -package(default_visibility = ["//visibility:public"]) - - -toolchain( - name = "cc-toolchain", - exec_compatible_with = [ - "@platforms//os:windows", - "@platforms//cpu:x86_64", - ], - target_compatible_with = [ - "@platforms//os:windows", - "@platforms//cpu:x86_64", - ], - toolchain = "//toolchains/configs/windows/msvc-cl/cc:cc-compiler-x64_windows", - toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", -) - -platform( - name = "platform", - parents = ["@local_config_platform//:host"], - constraint_values = [ - "@platforms//os:windows", - "@platforms//cpu:x86_64", - ], - exec_properties = { - "container-image": "docker://gcr.io/envoy-ci/envoy-build-windows@sha256:58d28de214e3b22907f59ebf5ce8b84424b1f938f7ee4eeb5c327c83388df264", - "OSFamily": "Windows", - }, -)