vendor: EMSDK 6.0.6 scripts at e26beb67ef18a37d71d522d8b7096b20a4d3d0f9

This commit is contained in:
Gitea Mirror Bot
2026-08-22 00:06:30 +08:00
commit c47b3c2696
138 changed files with 14232 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
bazel-bin
bazel-out
bazel-test_prebuilt_cache
bazel-testlogs
+23
View File
@@ -0,0 +1,23 @@
load("@emsdk//emscripten_toolchain:wasm_rules.bzl", "wasm_cc_binary")
load("@rules_cc//cc:defs.bzl", "cc_binary")
cc_binary(
name = "hello-world",
srcs = ["hello-world.cc"],
copts = [
"-flto=thin",
],
linkopts = [
"-sAUTO_NATIVE_LIBRARIES=0",
"-flto=thin",
],
)
wasm_cc_binary(
name = "hello-world-wasm",
cc_target = ":hello-world",
outputs = [
"hello-world.js",
"hello-world.wasm",
],
)
+29
View File
@@ -0,0 +1,29 @@
bazel_dep(name = "rules_cc", version = "0.2.16")
bazel_dep(name = "emsdk")
local_path_override(
module_name = "emsdk",
path = "..",
)
emscripten_deps = use_extension(
"@emsdk//:emscripten_deps.bzl",
"emscripten_deps",
)
# Need to use the same version of Emscripten as the prebuilt cache was built with to ensure compatibility even when future versions of Emscripten are released.
emscripten_deps.config(
version = "5.0.7",
)
emscripten_cache = use_extension(
"@emsdk//:emscripten_cache.bzl",
"emscripten_cache",
)
# This cache was built with Emscripten 5.0.7, and contains opt-thinlto build.
# It has been built according to these instructions: https://github.com/DoDoENT/bazel-playground/blob/master/tools/emsdk-cache-builder/README.md
emscripten_cache.prebuilt_cache(
http_archive_url = "https://github.com/DoDoENT/bazel-playground/releases/download/emsdk-cache/emsdk-cache-5.0.7.tar.gz",
sha256 = "bbfdab09ae64769c4aa977b1d88f776490c459c87e7ed7e31fe00190cd56b14a",
strip_prefix = "emsdk-cache",
)
+6
View File
@@ -0,0 +1,6 @@
#include <iostream>
int main(int argc, char** argv) {
std::cout << "hello world!" << std::endl;
return 0;
}