Skip to content

Commit

Permalink
Update toolchain paths
Browse files Browse the repository at this point in the history
This is needed to allow XLA to be consumed as a bazel dep

PiperOrigin-RevId: 507624196
  • Loading branch information
jakeharmon8 authored and copybara-github committed Feb 7, 2023
1 parent eeded16 commit a5443fa
Show file tree
Hide file tree
Showing 17 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ load("@bazel_tools//tools/cpp:lib_cc_configure.bzl", "auto_configure_fail")

def _def_file_filter_configure_impl(repository_ctx):
if repository_ctx.os.name.lower().find("windows") == -1:
repository_ctx.symlink(Label("@//tools/def_file_filter:BUILD.tpl"), "BUILD")
repository_ctx.symlink(Label("//tools/def_file_filter:BUILD.tpl"), "BUILD")
repository_ctx.file("def_file_filter.py", "")
return
vc_path = find_vc_path(repository_ctx)
Expand All @@ -44,13 +44,13 @@ def _def_file_filter_configure_impl(repository_ctx):

repository_ctx.template(
"def_file_filter.py",
Label("@//tools/def_file_filter:def_file_filter.py.tpl"),
Label("//tools/def_file_filter:def_file_filter.py.tpl"),
{
"%{undname_bin_path}": undname_bin_path,
"%{dumpbin_bin_path}": dumpbin_bin_path,
},
)
repository_ctx.symlink(Label("@//tools/def_file_filter:BUILD.tpl"), "BUILD")
repository_ctx.symlink(Label("//tools/def_file_filter:BUILD.tpl"), "BUILD")

def_file_filter_configure = repository_rule(
implementation = _def_file_filter_configure_impl,
Expand Down
2 changes: 1 addition & 1 deletion third_party/tsl/tools/toolchains/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@//tools/toolchains/remote_config:containers.bzl", "container_digests")
load("//tools/toolchains/remote_config:containers.bzl", "container_digests")

licenses(["restricted"])

Expand Down
4 changes: 2 additions & 2 deletions third_party/tsl/tools/toolchains/clang6/repo.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ clang6_configure = repository_rule(
implementation = _clang6_configure,
attrs = {
"_build": attr.label(
default = str(Label("@//tools/toolchains/clang6:clang.BUILD")),
default = str(Label("//tools/toolchains/clang6:clang.BUILD")),
),
"_crosstool": attr.label(
default = str(Label("@//tools/toolchains/clang6:CROSSTOOL.tpl")),
default = str(Label("//tools/toolchains/clang6:CROSSTOOL.tpl")),
),
},
)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Configurations of AARCH64 builds used with Docker container."""

load("@//tools/toolchains:cpus/aarch64/aarch64.bzl", "remote_aarch64_configure")
load("//tools/toolchains:cpus/aarch64/aarch64.bzl", "remote_aarch64_configure")
load("//third_party/remote_config:remote_platform_configure.bzl", "remote_platform_configure")
load("//third_party/py:python_configure.bzl", "remote_python_configure")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def _tpl(repository_ctx, tpl, substitutions = {}, out = None):
out = tpl
repository_ctx.template(
out,
Label("@//tools/toolchains/cpus/arm:%s.tpl" % tpl),
Label("//tools/toolchains/cpus/arm:%s.tpl" % tpl),
substitutions,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def _tpl(repository_ctx, tpl, substitutions = {}, out = None):
out = tpl
repository_ctx.template(
out,
Label("@//tools/toolchains/embedded/arm-linux:%s.tpl" % tpl),
Label("//tools/toolchains/embedded/arm-linux:%s.tpl" % tpl),
substitutions,
)

Expand Down
4 changes: 2 additions & 2 deletions third_party/tsl/tools/toolchains/remote/configure.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ def _remote_execution_configure(repository_ctx):
gpu_test_tags = "\"remote-gpu\""
repository_ctx.template(
"remote_execution.bzl",
Label("@//tools/toolchains/remote:execution.bzl.tpl"),
Label("//tools/toolchains/remote:execution.bzl.tpl"),
{
"%{gpu_test_tags}": gpu_test_tags,
},
)
repository_ctx.template(
"BUILD",
Label("@//tools/toolchains/remote:BUILD.tpl"),
Label("//tools/toolchains/remote:BUILD.tpl"),
)

remote_execution_configure = repository_rule(
Expand Down
2 changes: 1 addition & 1 deletion third_party/tsl/tools/toolchains/remote_config/configs.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Configurations of RBE builds used with remote config."""

load("@//tools/toolchains/remote_config:rbe_config.bzl", "sigbuild_tf_configs", "tensorflow_local_config", "tensorflow_rbe_config", "tensorflow_rbe_win_config")
load("//tools/toolchains/remote_config:rbe_config.bzl", "sigbuild_tf_configs", "tensorflow_local_config", "tensorflow_rbe_config", "tensorflow_rbe_win_config")

def initialize_rbe_configs():
tensorflow_local_config(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ load("//third_party/gpus:cuda_configure.bzl", "remote_cuda_configure")
load("//third_party/nccl:nccl_configure.bzl", "remote_nccl_configure")
load("//third_party/gpus:rocm_configure.bzl", "remote_rocm_configure")
load("//third_party/tensorrt:tensorrt_configure.bzl", "remote_tensorrt_configure")
load("@//tools/toolchains/remote_config:containers.bzl", "containers")
load("//tools/toolchains/remote_config:containers.bzl", "containers")
load("//third_party/remote_config:remote_platform_configure.bzl", "remote_platform_configure")

def _container_image_uri(container_name):
Expand Down
2 changes: 1 addition & 1 deletion tools/toolchains/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@//tools/toolchains/remote_config:containers.bzl", "container_digests")
load("//tools/toolchains/remote_config:containers.bzl", "container_digests")

licenses(["restricted"])

Expand Down
4 changes: 2 additions & 2 deletions tools/toolchains/clang6/repo.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ clang6_configure = repository_rule(
implementation = _clang6_configure,
attrs = {
"_build": attr.label(
default = str(Label("@//tools/toolchains/clang6:clang.BUILD")),
default = str(Label("//tools/toolchains/clang6:clang.BUILD")),
),
"_crosstool": attr.label(
default = str(Label("@//tools/toolchains/clang6:CROSSTOOL.tpl")),
default = str(Label("//tools/toolchains/clang6:CROSSTOOL.tpl")),
),
},
)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Configurations of AARCH64 builds used with Docker container."""

load("@//tools/toolchains:cpus/aarch64/aarch64.bzl", "remote_aarch64_configure")
load("//tools/toolchains:cpus/aarch64/aarch64.bzl", "remote_aarch64_configure")
load("//third_party/remote_config:remote_platform_configure.bzl", "remote_platform_configure")
load("//third_party/py:python_configure.bzl", "remote_python_configure")

Expand Down
2 changes: 1 addition & 1 deletion tools/toolchains/cpus/arm/arm_compiler_configure.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def _tpl(repository_ctx, tpl, substitutions = {}, out = None):
out = tpl
repository_ctx.template(
out,
Label("@//tools/toolchains/cpus/arm:%s.tpl" % tpl),
Label("//tools/toolchains/cpus/arm:%s.tpl" % tpl),
substitutions,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def _tpl(repository_ctx, tpl, substitutions = {}, out = None):
out = tpl
repository_ctx.template(
out,
Label("@//tools/toolchains/embedded/arm-linux:%s.tpl" % tpl),
Label("//tools/toolchains/embedded/arm-linux:%s.tpl" % tpl),
substitutions,
)

Expand Down
4 changes: 2 additions & 2 deletions tools/toolchains/remote/configure.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ def _remote_execution_configure(repository_ctx):
gpu_test_tags = "\"remote-gpu\""
repository_ctx.template(
"remote_execution.bzl",
Label("@//tools/toolchains/remote:execution.bzl.tpl"),
Label("//tools/toolchains/remote:execution.bzl.tpl"),
{
"%{gpu_test_tags}": gpu_test_tags,
},
)
repository_ctx.template(
"BUILD",
Label("@//tools/toolchains/remote:BUILD.tpl"),
Label("//tools/toolchains/remote:BUILD.tpl"),
)

remote_execution_configure = repository_rule(
Expand Down
2 changes: 1 addition & 1 deletion tools/toolchains/remote_config/configs.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Configurations of RBE builds used with remote config."""

load("@//tools/toolchains/remote_config:rbe_config.bzl", "sigbuild_tf_configs", "tensorflow_local_config", "tensorflow_rbe_config", "tensorflow_rbe_win_config")
load("//tools/toolchains/remote_config:rbe_config.bzl", "sigbuild_tf_configs", "tensorflow_local_config", "tensorflow_rbe_config", "tensorflow_rbe_win_config")

def initialize_rbe_configs():
tensorflow_local_config(
Expand Down
2 changes: 1 addition & 1 deletion tools/toolchains/remote_config/rbe_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ load("//third_party/gpus:cuda_configure.bzl", "remote_cuda_configure")
load("//third_party/nccl:nccl_configure.bzl", "remote_nccl_configure")
load("//third_party/gpus:rocm_configure.bzl", "remote_rocm_configure")
load("//third_party/tensorrt:tensorrt_configure.bzl", "remote_tensorrt_configure")
load("@//tools/toolchains/remote_config:containers.bzl", "containers")
load("//tools/toolchains/remote_config:containers.bzl", "containers")
load("//third_party/remote_config:remote_platform_configure.bzl", "remote_platform_configure")

def _container_image_uri(container_name):
Expand Down

0 comments on commit a5443fa

Please sign in to comment.