blob: dd304e18a2abbb730d5e6a949e6daba779ed4f63 [file] [log] [blame]
James Kuszmaul27da8142019-07-21 16:13:55 -07001package(default_visibility = ["//visibility:public"])
2
3filegroup(
4 name = "all",
5 srcs = [
6 "emar.sh",
7 "emcc.sh",
8 ":emscripten_cache_content",
9 "@emscripten_clang//:all",
10 "@emscripten_toolchain//:all",
11 "@nodejs//:bin/node",
12 ],
13)
14
15# TODO(james): There is a set of static files that emscripten will always
16# attempt to either rebuild or source from a cache. Ideally, we would make
17# the build of these files part of the normal build process; however, the
18# emscripten compiler handles sandboxing poorly for these files and so it
19# is simplest to just manually run emscripten outside of the sandbox and
20# copy over the cache folder for now.
21filegroup(
22 name = "emscripten_cache_content",
23 srcs = glob(["emscripten_cache/**/*"]),
24)
25
26cc_toolchain(
27 name = "cc_emscripten",
28 all_files = ":all",
29 compiler_files = ":all",
30 cpu = "web",
31 dwp_files = ":empty",
32 dynamic_runtime_libs = [":empty"],
33 linker_files = ":all",
34 objcopy_files = ":empty",
35 static_runtime_libs = [":empty"],
36 strip_files = ":empty",
37 supports_param_files = 0,
38)