Skip to content

Commit

Permalink
emscripten
Browse files Browse the repository at this point in the history
  • Loading branch information
jamison-lahman-ai committed Jul 16, 2024
1 parent 2a0d517 commit 6115d95
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
2 changes: 2 additions & 0 deletions distdir_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ DIST_DEPS = {
"https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.5/platforms-0.0.5.tar.gz",
"https://github.com/bazelbuild/platforms/releases/download/0.0.5/platforms-0.0.5.tar.gz",
],
"patch_args": ["-p1"],
"patches": ["//third_party/platforms:emscripten.patch"],
"used_in": [
"additional_distfiles",
"test_WORKSPACE_files",
Expand Down
Empty file added third_party/platforms/BUILD
Empty file.
26 changes: 26 additions & 0 deletions third_party/platforms/emscripten.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From a0a45fa9810f8b72066bcdd2540e81a6e3654ae0 Mon Sep 17 00:00:00 2001
From: Walter Lee <waltl@google.com>
Date: Fri, 5 Jan 2024 22:08:40 -0500
Subject: [PATCH] Define constraint for emscripten os

This is to be used for Web Assembly, with cpus wasm32/wasm64.
---
os/BUILD | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/os/BUILD b/os/BUILD
index ae6e8b0..8e9f990 100644
--- a/os/BUILD
+++ b/os/BUILD
@@ -106,6 +106,11 @@ constraint_value(
constraint_setting = ":os",
)

+constraint_value(
+ name = "emscripten",
+ constraint_setting = ":os",
+)
+
# WASI (WebAssembly System Interface)
# https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-overview.md
constraint_value(

0 comments on commit 6115d95

Please sign in to comment.