Skip to content

Commit 082a0ad

Browse files
committed
Use $(OBJCOPY) in wasmtime build
Signed-off-by: Matt Leon <mattleon@google.com>
1 parent b38ad81 commit 082a0ad

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

bazel/external/wasmtime.BUILD

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,9 @@ genrule(
5252
for symbol in $$(nm -P $(<) 2>/dev/null | grep -E ^_?wasm_ | cut -d" " -f1); do
5353
echo $$symbol | perl -p -e 's!^(_?)(wasm_[a-z_0-9.:-]+)$$!\\1\\2 \\1wasmtime_\\2!' >>prefixed
5454
done
55-
# This should be OBJCOPY, but bazel-zig-cc doesn't define it.
56-
""" +
57-
# MacOS runners for GitHub do not ship with objcopy. Use the version bundled with the vendored toolchain.
58-
select({
59-
"@platforms//os:macos": "$(location @llvm_toolchain_llvm//:objcopy) --redefine-syms=prefixed $(<) $@ ",
60-
"//conditions:default": "objcopy --redefine-syms=prefixed $(<) $@ ",
61-
}),
55+
$(OBJCOPY) --redefine-syms=prefixed $(<) $@
56+
""",
6257
toolchains = ["@bazel_tools//tools/cpp:current_cc_toolchain"],
63-
tools = select({
64-
"@platforms//os:macos": ["@llvm_toolchain_llvm//:objcopy"],
65-
"//conditions:default": [],
66-
}),
6758
)
6859

6960
# This must match the features defined in `bazel/cargo/wasmtime/Cargo.toml` for

0 commit comments

Comments
 (0)