-
Notifications
You must be signed in to change notification settings - Fork 808
Expand file tree
/
Copy pathemscripten_build_file.bzl
More file actions
100 lines (92 loc) · 2.34 KB
/
emscripten_build_file.bzl
File metadata and controls
100 lines (92 loc) · 2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
"""A templated build file for emscripten repositories"""
EMSCRIPTEN_BUILD_FILE_CONTENT_TEMPLATE = """
package(default_visibility = ['//visibility:public'])
filegroup(
name = "all",
srcs = glob(["**"]),
)
filegroup(
name = "includes",
srcs = glob([
"emscripten/cache/sysroot/include/c++/v1/**",
"emscripten/cache/sysroot/include/compat/**",
"emscripten/cache/sysroot/include/**",
"lib/clang/**/include/**",
]),
)
filegroup(
name = "builtin_cache",
srcs = glob([
"emscripten/cache/**",
]),
)
filegroup(
name = "emcc_common",
srcs = [
"emscripten/emcc.py",
"emscripten/embuilder.py",
"emscripten/emscripten-version.txt",
"emscripten/cache/sysroot_install.stamp",
"emscripten/src/settings.js",
"emscripten/src/settings_internal.js",
] + glob(
include = [
"emscripten/third_party/**",
"emscripten/tools/**",
],
exclude = [
"**/__pycache__/**",
],
),
)
filegroup(
name = "compiler_files",
srcs = [
"bin/clang{bin_extension}",
"bin/clang++{bin_extension}",
":emcc_common",
":includes",
],
)
filegroup(
name = "linker_files",
srcs = [
"bin/clang{bin_extension}",
"bin/llvm-ar{bin_extension}",
"bin/llvm-dwarfdump{bin_extension}",
"bin/llvm-nm{bin_extension}",
"bin/llvm-objcopy{bin_extension}",
"bin/wasm-ctor-eval{bin_extension}",
"bin/wasm-emscripten-finalize{bin_extension}",
"bin/wasm-ld{bin_extension}",
"bin/wasm-metadce{bin_extension}",
"bin/wasm-opt{bin_extension}",
"bin/wasm-split{bin_extension}",
"bin/wasm2js{bin_extension}",
":emcc_common",
] + glob(
include = [
"emscripten/cache/sysroot/lib/**",
"emscripten/node_modules/**",
"emscripten/src/**",
],
),
)
filegroup(
name = "ar_files",
srcs = [
"bin/llvm-ar{bin_extension}",
"emscripten/emar.py",
"emscripten/emscripten-version.txt",
"emscripten/src/settings.js",
"emscripten/src/settings_internal.js",
] + glob(
include = [
"emscripten/tools/**",
],
exclude = [
"**/__pycache__/**",
],
),
)
"""