-
Notifications
You must be signed in to change notification settings - Fork 2
/
BUILD.bazel
46 lines (42 loc) · 1.11 KB
/
BUILD.bazel
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
load("//lib:defs.bzl", "dep_path", "runtime_path")
load("//lib:lib.bzl", "package_lib")
load("//toolchains:utils.bzl", "no_error")
load("//toolchains/make:configure.bzl", "configure_make_lib")
load(":package.bzl", "NAME")
package(default_visibility = ["//:__subpackages__"])
package_lib()
BUILD_DEPS_K8 = [
"//lib/yasm:runtime",
]
configure_make_lib(
name = NAME,
args = [
"HAVE_GNU_STRIP=",
],
build_data = {
"//config:wasm": [],
"//conditions:default": BUILD_DEPS_K8,
},
configure_options = [
"--disable-docs",
"--disable-examples",
"--disable-tools",
"--enable-pic",
"--target=generic-gnu",
],
copts = select({
"//config:wasm": [
"-sSHARED_MEMORY", # for -pthread support
no_error(["unused-but-set-variable"]),
],
"//conditions:default": [],
}),
env = {
"//config:wasm": {},
"//conditions:default": {
"PATH": runtime_path(BUILD_DEPS_K8),
"ASFLAGS": "", # override toolchain flags
},
},
env_override = ["ASFLAGS"],
)