Skip to content

Commit 4a176a3

Browse files
committed
Use toolchains_llvm for objcopy
Signed-off-by: Matt Leon <mattleon@google.com>
1 parent 6c46390 commit 4a176a3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

bazel/external/wasmtime.BUILD

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,15 @@ genrule(
3636
outs = [
3737
"prefixed_wasmtime_c_api.a",
3838
],
39+
tools = [
40+
"@llvm_toolchain_llvm//:objcopy"
41+
],
3942
cmd = """
4043
for symbol in $$(nm -P $(<) 2>/dev/null | grep -E ^_?wasm_ | cut -d" " -f1); do
4144
echo $$symbol | sed -r 's/^(_?)(wasm_[a-z_]+)$$/\\1\\2 \\1wasmtime_\\2/' >>prefixed
4245
done
4346
# This should be OBJCOPY, but bazel-zig-cc doesn't define it.
44-
objcopy --redefine-syms=prefixed $(<) $@
47+
$(location @llvm_toolchain_llvm//:objcopy) --redefine-syms=prefixed $(<) $@
4548
""",
4649
toolchains = ["@bazel_tools//tools/cpp:current_cc_toolchain"],
4750
)

0 commit comments

Comments
 (0)