|
| 1 | +# This file is expanded from a template by cuda_configure.bzl |
| 2 | +# Update cuda_configure.bzl#verify_build_defines when adding new variables. |
| 3 | + |
| 4 | +load(":cc_toolchain_config.bzl", "cc_toolchain_config") |
| 5 | + |
| 6 | +licenses(["restricted"]) |
| 7 | + |
| 8 | +package(default_visibility = ["//visibility:public"]) |
| 9 | + |
| 10 | +toolchain( |
| 11 | + name = "toolchain-linux-x86_64", |
| 12 | + exec_compatible_with = [ |
| 13 | + "@bazel_tools//platforms:linux", |
| 14 | + "@bazel_tools//platforms:x86_64", |
| 15 | + ], |
| 16 | + target_compatible_with = [ |
| 17 | + "@bazel_tools//platforms:linux", |
| 18 | + "@bazel_tools//platforms:x86_64", |
| 19 | + ], |
| 20 | + toolchain = ":cc-compiler-local", |
| 21 | + toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", |
| 22 | +) |
| 23 | + |
| 24 | +cc_toolchain_suite( |
| 25 | + name = "toolchain", |
| 26 | + toolchains = { |
| 27 | + "local|compiler": ":cc-compiler-local", |
| 28 | + "darwin|compiler": ":cc-compiler-darwin", |
| 29 | + "x64_windows|msvc-cl": ":cc-compiler-windows", |
| 30 | + "x64_windows": ":cc-compiler-windows", |
| 31 | + "arm": ":cc-compiler-local", |
| 32 | + "aarch64": ":cc-compiler-local", |
| 33 | + "k8": ":cc-compiler-local", |
| 34 | + "piii": ":cc-compiler-local", |
| 35 | + "ppc": ":cc-compiler-local", |
| 36 | + "darwin": ":cc-compiler-darwin", |
| 37 | + }, |
| 38 | +) |
| 39 | + |
| 40 | +cc_toolchain( |
| 41 | + name = "cc-compiler-local", |
| 42 | + all_files = ":crosstool_wrapper_driver_is_not_gcc", |
| 43 | + compiler_files = ":empty", |
| 44 | + dwp_files = ":empty", |
| 45 | + linker_files = ":crosstool_wrapper_driver_is_not_gcc", |
| 46 | + objcopy_files = ":empty", |
| 47 | + strip_files = ":empty", |
| 48 | + # To support linker flags that need to go to the start of command line |
| 49 | + # we need the toolchain to support parameter files. Parameter files are |
| 50 | + # last on the command line and contain all shared libraries to link, so all |
| 51 | + # regular options will be left of them. |
| 52 | + supports_param_files = 1, |
| 53 | + toolchain_config = ":cc-compiler-local-config", |
| 54 | + toolchain_identifier = "local_linux", |
| 55 | +) |
| 56 | + |
| 57 | +cc_toolchain_config( |
| 58 | + name = "cc-compiler-local-config", |
| 59 | + builtin_include_directories = [ |
| 60 | + "/dt7/usr/include/c++/7", |
| 61 | + "/dt7/usr/include/c++/7/x86_64-pc-linux-gnu", |
| 62 | + "/dt7/usr/include/c++/7/backward", |
| 63 | + "/dt7/usr/lib/gcc/x86_64-pc-linux-gnu/7/include", |
| 64 | + "/dt7/usr/lib/gcc/x86_64-pc-linux-gnu/7/include-fixed", |
| 65 | + "/dt7/usr/include", |
| 66 | + "/usr/local/cuda-10.0/targets/x86_64-linux/include", |
| 67 | + "/usr/local/cuda-10.0/include", |
| 68 | + "/usr/local/cuda-10.0/extras/CUPTI/include", |
| 69 | + "/usr/include", |
| 70 | + ], |
| 71 | + cpu = "local", |
| 72 | + extra_no_canonical_prefixes_flags = ["-fno-canonical-system-headers"], |
| 73 | + host_compiler_path = "clang/bin/crosstool_wrapper_driver_is_not_gcc", |
| 74 | + host_compiler_prefix = "/usr/bin", |
| 75 | + host_compiler_warnings = [], |
| 76 | + host_unfiltered_compile_flags = [], |
| 77 | + linker_bin_path = "/usr/bin", |
| 78 | +) |
| 79 | + |
| 80 | +cc_toolchain( |
| 81 | + name = "cc-compiler-darwin", |
| 82 | + all_files = ":crosstool_wrapper_driver_is_not_gcc", |
| 83 | + compiler_files = ":empty", |
| 84 | + dwp_files = ":empty", |
| 85 | + linker_files = ":crosstool_wrapper_driver_is_not_gcc", |
| 86 | + objcopy_files = ":empty", |
| 87 | + strip_files = ":empty", |
| 88 | + supports_param_files = 0, |
| 89 | + toolchain_config = ":cc-compiler-local-darwin", |
| 90 | + toolchain_identifier = "local_darwin", |
| 91 | +) |
| 92 | + |
| 93 | +cc_toolchain_config( |
| 94 | + name = "cc-compiler-local-darwin", |
| 95 | + builtin_include_directories = [ |
| 96 | + "/dt7/usr/include/c++/7", |
| 97 | + "/dt7/usr/include/c++/7/x86_64-pc-linux-gnu", |
| 98 | + "/dt7/usr/include/c++/7/backward", |
| 99 | + "/dt7/usr/lib/gcc/x86_64-pc-linux-gnu/7/include", |
| 100 | + "/dt7/usr/lib/gcc/x86_64-pc-linux-gnu/7/include-fixed", |
| 101 | + "/dt7/usr/include", |
| 102 | + "/usr/local/cuda-10.0/targets/x86_64-linux/include", |
| 103 | + "/usr/local/cuda-10.0/include", |
| 104 | + "/usr/local/cuda-10.0/extras/CUPTI/include", |
| 105 | + "/usr/include", |
| 106 | + ], |
| 107 | + cpu = "darwin", |
| 108 | + extra_no_canonical_prefixes_flags = ["-fno-canonical-system-headers"], |
| 109 | + host_compiler_path = "clang/bin/crosstool_wrapper_driver_is_not_gcc", |
| 110 | + host_compiler_prefix = "/usr/bin", |
| 111 | + host_compiler_warnings = [], |
| 112 | + host_unfiltered_compile_flags = [], |
| 113 | + linker_bin_path = "/usr/bin", |
| 114 | +) |
| 115 | + |
| 116 | +cc_toolchain( |
| 117 | + name = "cc-compiler-windows", |
| 118 | + all_files = ":windows_msvc_wrapper_files", |
| 119 | + compiler_files = ":empty", |
| 120 | + dwp_files = ":empty", |
| 121 | + linker_files = ":windows_msvc_wrapper_files", |
| 122 | + objcopy_files = ":empty", |
| 123 | + strip_files = ":empty", |
| 124 | + supports_param_files = 1, |
| 125 | + toolchain_config = ":cc-compiler-windows-config", |
| 126 | + toolchain_identifier = "local_windows", |
| 127 | +) |
| 128 | + |
| 129 | +cc_toolchain_config( |
| 130 | + name = "cc-compiler-windows-config", |
| 131 | + builtin_include_directories = [ |
| 132 | + "/dt7/usr/include/c++/7", |
| 133 | + "/dt7/usr/include/c++/7/x86_64-pc-linux-gnu", |
| 134 | + "/dt7/usr/include/c++/7/backward", |
| 135 | + "/dt7/usr/lib/gcc/x86_64-pc-linux-gnu/7/include", |
| 136 | + "/dt7/usr/lib/gcc/x86_64-pc-linux-gnu/7/include-fixed", |
| 137 | + "/dt7/usr/include", |
| 138 | + "/usr/local/cuda-10.0/targets/x86_64-linux/include", |
| 139 | + "/usr/local/cuda-10.0/include", |
| 140 | + "/usr/local/cuda-10.0/extras/CUPTI/include", |
| 141 | + "/usr/include", |
| 142 | + ], |
| 143 | + cpu = "x64_windows", |
| 144 | + msvc_cl_path = "msvc_not_used", |
| 145 | + msvc_env_include = "msvc_not_used", |
| 146 | + msvc_env_lib = "msvc_not_used", |
| 147 | + msvc_env_path = "msvc_not_used", |
| 148 | + msvc_env_tmp = "msvc_not_used", |
| 149 | + msvc_lib_path = "msvc_not_used", |
| 150 | + msvc_link_path = "msvc_not_used", |
| 151 | + msvc_ml_path = "msvc_not_used", |
| 152 | +) |
| 153 | + |
| 154 | +filegroup( |
| 155 | + name = "empty", |
| 156 | + srcs = [], |
| 157 | +) |
| 158 | + |
| 159 | +filegroup( |
| 160 | + name = "crosstool_wrapper_driver_is_not_gcc", |
| 161 | + srcs = ["clang/bin/crosstool_wrapper_driver_is_not_gcc"], |
| 162 | +) |
| 163 | + |
| 164 | +filegroup( |
| 165 | + name = "windows_msvc_wrapper_files", |
| 166 | + srcs = glob(["windows/msvc_*"]), |
| 167 | +) |
0 commit comments