Skip to content

Commit 331a8ea

Browse files
committed
fix bins
1 parent 0d48b18 commit 331a8ea

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

toolchain/BUILD.toolchain.tpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ filegroup(
3131

3232
filegroup(
3333
name = "internal-use-tools-legacy",
34-
srcs = glob(["%{tools_dir}/**"]),
34+
srcs = [%{symlinked_tools}
35+
"%{tools_dir}/cc_wrapper.sh",
36+
],
3537
visibility = ["//visibility:private"],
3638
)
3739

toolchain/internal/configure.bzl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ def llvm_config_impl(rctx):
136136
tools = _toolchain_tools(os)
137137
for tool_name, symlink_name in tools.items():
138138
rctx.symlink(llvm_dist_rel_path + "bin/" + tool_name, tools_path_prefix + symlink_name)
139+
symlinked_tools_str = "".join([
140+
"\n" + (" " * 8) + "\"" + tools_path_prefix + symlink_name + "\","
141+
for symlink_name in tools.values()
142+
])
139143
else:
140144
llvm_dist_rel_path = llvm_dist_path_prefix
141145
llvm_dist_label_prefix = llvm_dist_path_prefix
@@ -144,6 +148,7 @@ def llvm_config_impl(rctx):
144148
# No symlinking necessary when using absolute paths.
145149
wrapper_bin_prefix = "bin/"
146150
tools_path_prefix = llvm_dist_path_prefix + "bin/"
151+
symlinked_tools_str = ""
147152

148153
sysroot_paths_dict, sysroot_labels_dict = _sysroot_paths_dict(
149154
rctx,
@@ -226,6 +231,7 @@ def llvm_config_impl(rctx):
226231
{
227232
"%{cc_toolchain_config_bzl}": str(rctx.attr._cc_toolchain_config_bzl),
228233
"%{cc_toolchains}": cc_toolchains_str,
234+
"%{symlinked_tools}": symlinked_tools_str,
229235
"%{tools_dir}": wrapper_bin_prefix.removesuffix("/"),
230236
"%{convenience_targets}": convenience_targets_str,
231237
},

0 commit comments

Comments
 (0)