From 0ea8f8a8707070e9a7c83fbb4a3065683bcf1799 Mon Sep 17 00:00:00 2001 From: Piotr Sikora Date: Wed, 9 Mar 2022 09:09:39 -0600 Subject: [PATCH] Provide "executable" in wasm_cc_binary's DefaultInfo. (#998) This is needed to allow custom rules and/or transitions on top of wasm_cc_binary (e.g. to workaround #972). It's debatable whether .wasm is the correct executable target for non-standalone Wasm builds, but we don't have a way to differentiate those in wasm_cc_binary, and considering that this attribute isn't exported now, it shouldn't break anything. --- bazel/emscripten_toolchain/wasm_cc_binary.bzl | 1 + 1 file changed, 1 insertion(+) diff --git a/bazel/emscripten_toolchain/wasm_cc_binary.bzl b/bazel/emscripten_toolchain/wasm_cc_binary.bzl index 96101a5..dbdb238 100644 --- a/bazel/emscripten_toolchain/wasm_cc_binary.bzl +++ b/bazel/emscripten_toolchain/wasm_cc_binary.bzl @@ -80,6 +80,7 @@ def _wasm_binary_impl(ctx): ) return DefaultInfo( + executable = ctx.outputs.wasm, files = depset(outputs), # This is needed since rules like web_test usually have a data # dependency on this target.