aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-framework/tensorflow/files/yocto_compiler_configure.bzl
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-framework/tensorflow/files/yocto_compiler_configure.bzl')
-rw-r--r--recipes-framework/tensorflow/files/yocto_compiler_configure.bzl14
1 files changed, 11 insertions, 3 deletions
diff --git a/recipes-framework/tensorflow/files/yocto_compiler_configure.bzl b/recipes-framework/tensorflow/files/yocto_compiler_configure.bzl
index 19c7cd1..2635da4 100644
--- a/recipes-framework/tensorflow/files/yocto_compiler_configure.bzl
+++ b/recipes-framework/tensorflow/files/yocto_compiler_configure.bzl
@@ -9,11 +9,19 @@ def _tpl(repository_ctx, tpl, substitutions={}, out=None):
Label("//third_party/toolchains/yocto:%s.tpl" % tpl),
substitutions)
-
def _yocto_compiler_configure_impl(repository_ctx):
- _tpl(repository_ctx, "CROSSTOOL")
- repository_ctx.symlink(repository_ctx.attr.build_file, "BUILD")
+ if "CT_NAME" in repository_ctx.os.environ:
+ cross_tool_name = repository_ctx.os.environ["CT_NAME"]
+ else:
+ cross_tool_name = "x86_64-wrs-linux"
+ _tpl(repository_ctx, "cc_config.bzl", {
+ "%{YOCTO_COMPILER_PATH}%": str(repository_ctx.path(
+ repository_ctx.attr.remote_config_repo,
+ )),
+ "%{CT_NAME}%": cross_tool_name,
+ })
+ repository_ctx.symlink(repository_ctx.attr.build_file, "BUILD")
yocto_compiler_configure = repository_rule(
implementation = _yocto_compiler_configure_impl,