wasm_cc_binary: Specify a default OS. Allow users to override platform. (#1262)

* wasm_cc_binary: Specify a default OS. Allow users to override platform.

Problem: https://github.com/proxy-wasm/proxy-wasm-cpp-sdk/pull/157#discussion_r1277763118

This is solving the problem in two different ways. Please let me know
your thoughts about both approaches, as either will work.

Signed-off-by: Martijn Stevenson <mstevenson@google.com>

* Rework platform selection to trigger os:wasi off standalone attr

Signed-off-by: Martijn Stevenson <mstevenson@google.com>

---------

Signed-off-by: Martijn Stevenson <mstevenson@google.com>
This commit is contained in:
martijneken
2023-07-28 17:08:04 -04:00
committed by GitHub
parent a896e3d066
commit ef2a8e929d
2 changed files with 11 additions and 1 deletions

View File

@@ -84,3 +84,11 @@ platform(
"@platforms//cpu:wasm32",
],
)
platform(
name = "platform_wasi",
constraint_values = [
"@platforms//cpu:wasm32",
"@platforms//os:wasi",
],
)