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 4load(":cc_toolchain_config.bzl", "cc_toolchain_config") 5 6licenses(["restricted"]) 7 8package(default_visibility = ["//visibility:public"]) 9 10toolchain( 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 24cc_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 40cc_toolchain( 41 name = "cc-compiler-local", 42 all_files = ":crosstool_wrapper_driver_is_not_gcc", 43 ar_files = ":crosstool_wrapper_driver_is_not_gcc", 44 as_files = ":crosstool_wrapper_driver_is_not_gcc", 45 compiler_files = ":crosstool_wrapper_driver_is_not_gcc", 46 dwp_files = ":empty", 47 linker_files = ":crosstool_wrapper_driver_is_not_gcc", 48 objcopy_files = ":empty", 49 strip_files = ":empty", 50 # To support linker flags that need to go to the start of command line 51 # we need the toolchain to support parameter files. Parameter files are 52 # last on the command line and contain all shared libraries to link, so all 53 # regular options will be left of them. 54 supports_param_files = 1, 55 toolchain_config = ":cc-compiler-local-config", 56 toolchain_identifier = "local_linux", 57) 58 59cc_toolchain_config( 60 name = "cc-compiler-local-config", 61 builtin_include_directories = [ 62 "/dt7/usr/include/c++/7", 63 "/dt7/usr/include/c++/7/x86_64-pc-linux-gnu", 64 "/dt7/usr/include/c++/7/backward", 65 "/dt7/usr/lib/gcc/x86_64-pc-linux-gnu/7/include", 66 "/dt7/usr/lib/gcc/x86_64-pc-linux-gnu/7/include-fixed", 67 "/dt7/usr/include", 68 "/usr/local/cuda-10.0/targets/x86_64-linux/include", 69 "/usr/local/cuda-10.0/include", 70 "/usr/local/cuda-10.0/extras/CUPTI/include", 71 "/usr/include", 72 ], 73 cpu = "local", 74 extra_no_canonical_prefixes_flags = ["-fno-canonical-system-headers"], 75 host_compiler_path = "clang/bin/crosstool_wrapper_driver_is_not_gcc", 76 host_compiler_prefix = "/usr/bin", 77 host_compiler_warnings = [], 78 host_unfiltered_compile_flags = [], 79 linker_bin_path = "/usr/bin", 80) 81 82cc_toolchain( 83 name = "cc-compiler-darwin", 84 all_files = ":crosstool_wrapper_driver_is_not_gcc", 85 ar_files = ":crosstool_wrapper_driver_is_not_gcc", 86 as_files = ":crosstool_wrapper_driver_is_not_gcc", 87 compiler_files = ":crosstool_wrapper_driver_is_not_gcc", 88 dwp_files = ":empty", 89 linker_files = ":crosstool_wrapper_driver_is_not_gcc", 90 objcopy_files = ":empty", 91 strip_files = ":empty", 92 supports_param_files = 0, 93 toolchain_config = ":cc-compiler-local-darwin", 94 toolchain_identifier = "local_darwin", 95) 96 97cc_toolchain_config( 98 name = "cc-compiler-local-darwin", 99 builtin_include_directories = [ 100 "/dt7/usr/include/c++/7", 101 "/dt7/usr/include/c++/7/x86_64-pc-linux-gnu", 102 "/dt7/usr/include/c++/7/backward", 103 "/dt7/usr/lib/gcc/x86_64-pc-linux-gnu/7/include", 104 "/dt7/usr/lib/gcc/x86_64-pc-linux-gnu/7/include-fixed", 105 "/dt7/usr/include", 106 "/usr/local/cuda-10.0/targets/x86_64-linux/include", 107 "/usr/local/cuda-10.0/include", 108 "/usr/local/cuda-10.0/extras/CUPTI/include", 109 "/usr/include", 110 ], 111 cpu = "darwin", 112 extra_no_canonical_prefixes_flags = ["-fno-canonical-system-headers"], 113 host_compiler_path = "clang/bin/crosstool_wrapper_driver_is_not_gcc", 114 host_compiler_prefix = "/usr/bin", 115 host_compiler_warnings = [], 116 host_unfiltered_compile_flags = [], 117 linker_bin_path = "/usr/bin", 118) 119 120cc_toolchain( 121 name = "cc-compiler-windows", 122 all_files = ":windows_msvc_wrapper_files", 123 ar_files = ":windows_msvc_wrapper_files", 124 as_files = ":windows_msvc_wrapper_files", 125 compiler_files = ":windows_msvc_wrapper_files", 126 dwp_files = ":empty", 127 linker_files = ":windows_msvc_wrapper_files", 128 objcopy_files = ":empty", 129 strip_files = ":empty", 130 supports_param_files = 1, 131 toolchain_config = ":cc-compiler-windows-config", 132 toolchain_identifier = "local_windows", 133) 134 135cc_toolchain_config( 136 name = "cc-compiler-windows-config", 137 builtin_include_directories = [ 138 "/dt7/usr/include/c++/7", 139 "/dt7/usr/include/c++/7/x86_64-pc-linux-gnu", 140 "/dt7/usr/include/c++/7/backward", 141 "/dt7/usr/lib/gcc/x86_64-pc-linux-gnu/7/include", 142 "/dt7/usr/lib/gcc/x86_64-pc-linux-gnu/7/include-fixed", 143 "/dt7/usr/include", 144 "/usr/local/cuda-10.0/targets/x86_64-linux/include", 145 "/usr/local/cuda-10.0/include", 146 "/usr/local/cuda-10.0/extras/CUPTI/include", 147 "/usr/include", 148 ], 149 cpu = "x64_windows", 150 msvc_cl_path = "msvc_not_used", 151 msvc_env_include = "msvc_not_used", 152 msvc_env_lib = "msvc_not_used", 153 msvc_env_path = "msvc_not_used", 154 msvc_env_tmp = "msvc_not_used", 155 msvc_lib_path = "msvc_not_used", 156 msvc_link_path = "msvc_not_used", 157 msvc_ml_path = "msvc_not_used", 158) 159 160filegroup( 161 name = "empty", 162 srcs = [], 163) 164 165filegroup( 166 name = "crosstool_wrapper_driver_is_not_gcc", 167 srcs = ["clang/bin/crosstool_wrapper_driver_is_not_gcc"], 168) 169 170filegroup( 171 name = "windows_msvc_wrapper_files", 172 srcs = glob(["windows/msvc_*"]), 173) 174