diff options
-rw-r--r-- | third_party/gpus/crosstool/BUILD.tpl | 8 | ||||
-rw-r--r-- | third_party/gpus/cuda_configure.bzl | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/third_party/gpus/crosstool/BUILD.tpl b/third_party/gpus/crosstool/BUILD.tpl index 7d8b600513..98cb326572 100644 --- a/third_party/gpus/crosstool/BUILD.tpl +++ b/third_party/gpus/crosstool/BUILD.tpl @@ -12,12 +12,12 @@ cc_toolchain_suite( cc_toolchain( name = "cc-compiler-local", - all_files = ":crosstool_wrapper_driver_is_not_gcc", + all_files = "%{linker_files}", compiler_files = ":empty", cpu = "local", dwp_files = ":empty", dynamic_runtime_libs = [":empty"], - linker_files = ":crosstool_wrapper_driver_is_not_gcc", + linker_files = "%{linker_files}", objcopy_files = ":empty", static_runtime_libs = [":empty"], strip_files = ":empty", @@ -30,12 +30,12 @@ cc_toolchain( cc_toolchain( name = "cc-compiler-darwin", - all_files = ":crosstool_wrapper_driver_is_not_gcc", + all_files = "%{linker_files}", compiler_files = ":empty", cpu = "darwin", dwp_files = ":empty", dynamic_runtime_libs = [":empty"], - linker_files = ":crosstool_wrapper_driver_is_not_gcc", + linker_files = "%{linker_files}", objcopy_files = ":empty", static_runtime_libs = [":empty"], strip_files = ":empty", diff --git a/third_party/gpus/cuda_configure.bzl b/third_party/gpus/cuda_configure.bzl index b85e565f36..4a0f471088 100644 --- a/third_party/gpus/cuda_configure.bzl +++ b/third_party/gpus/cuda_configure.bzl @@ -971,7 +971,6 @@ def _create_local_cuda_repository(repository_ctx): ' ":cudnn-include",') }) # Set up crosstool/ - _file(repository_ctx, "crosstool:BUILD") cc = find_cc(repository_ctx) host_compiler_includes = _host_compiler_includes(repository_ctx, cc) cuda_defines = { @@ -981,11 +980,14 @@ def _create_local_cuda_repository(repository_ctx): } if _use_cuda_clang(repository_ctx): cuda_defines["%{clang_path}"] = cc + _tpl(repository_ctx, "crosstool:BUILD", {"%{linker_files}": ":empty"}) _tpl(repository_ctx, "crosstool:CROSSTOOL_clang", cuda_defines, out="crosstool/CROSSTOOL") else: nvcc_path = str(repository_ctx.path("%s/bin/nvcc%s" % (cuda_config.cuda_toolkit_path, ".exe" if cuda_config.cpu_value == "Windows" else ""))) + _tpl(repository_ctx, "crosstool:BUILD", + {"%{linker_files}": ":crosstool_wrapper_driver_is_not_gcc"}) _tpl(repository_ctx, "crosstool:CROSSTOOL_nvcc", cuda_defines, out="crosstool/CROSSTOOL") _tpl(repository_ctx, "crosstool:clang/bin/crosstool_wrapper_driver_is_not_gcc", |